Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added affinity spec #4

Merged
merged 1 commit into from
Feb 7, 2023
Merged

Added affinity spec #4

merged 1 commit into from
Feb 7, 2023

Conversation

josecastillolema
Copy link
Contributor

Changes introduced with this PR

Added pod affinity/antiaffinity spec.

A workflow.yaml example with pod affinity:

...
  pcp:
    plugin: quay.io/dustinblack/arcaflow-plugin-pcp-test:latest
    step: start-pcp
    input:
      pmlogger_interval: !expr $.input.pmlogger_interval
      run_duration: !expr $.input.uperf_server_timeout_seconds
    deploy:
      type: kubernetes
      connection: !expr $.steps.kubeconfig.outputs.success.connection
      pod:
        metadata:
          namespace: default
          labels:
            arcaflow: pcp
        spec:
          pluginContainer:
            imagePullPolicy: IfNotPresent
          affinity:
            podAffinity:
              requiredDuringSchedulingIgnoredDuringExecution:
              - labelSelector:
                  matchExpressions:
                  - key: arcaflow
                    operator: In
                    values:
                    - uperf-client
                topologyKey: node-role.kubernetes.io/worker

A workflow.yaml example with pod antiaffinity:

...
  pcp:
    plugin: quay.io/dustinblack/arcaflow-plugin-pcp-test:latest
    step: start-pcp
    input:
      pmlogger_interval: !expr $.input.pmlogger_interval
      run_duration: !expr $.input.uperf_server_timeout_seconds
    deploy:
      type: kubernetes
      connection: !expr $.steps.kubeconfig.outputs.success.connection
      pod:
        metadata:
          namespace: default
          labels:
            arcaflow: pcp
        spec:
          pluginContainer:
            imagePullPolicy: IfNotPresent
          affinity:
            podAntiAffinity:
              requiredDuringSchedulingIgnoredDuringExecution:
              - labelSelector:
                  matchExpressions:
                  - key: arcaflow
                    operator: In
                    values:
                    - uperf-client
                topologyKey: node-role.kubernetes.io/worker

Copy link
Contributor

@jaredoconnell jaredoconnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Janos may be able to provide more valuable feedback.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants