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

fix: Apply workflow level PodSpecPatch in agent pod. Fixes #12387 #12440

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

jswxstw
Copy link
Member

@jswxstw jswxstw commented Jan 2, 2024

Fixes #12387

Motivation

We want to schedule the agent pod directly to the virtual node, so we set a workflow-level podSpecPatch nodeName: virtual-node.
However, podSpecPatch was not applied to the agent pod.

Modifications

I apply workflow-level podSpecPatch to the agent pod like the workflowpod does.

Verification

workflow spec demo

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: http-template-
  labels:
    workflows.argoproj.io/test: "true"
  annotations:
    workflows.argoproj.io/description: |
      Http template will demostrate http template functionality
    workflows.argoproj.io/version: '>= 3.2.0'
spec:
  podSpecPatch: |
    nodeName: virtual-node
  entrypoint: main
  templates:
    - name: main
      steps:
        - - name: good
            template: http
            arguments:
              parameters: [{name: url, value: "https://raw.githubusercontent.com/argoproj/argo-workflows/4e450e250168e6b4d51a126b784e90b11a0162bc/pkg/apis/workflow/v1alpha1/generated.swagger.json"}]
  
    - name: http
      inputs:
        parameters:
          - name: url
      http:
       # url: http://dummy.restapiexample.com/api/v1/employees
       url: "{{inputs.parameters.url}}"

@jswxstw jswxstw force-pushed the fix-12387 branch 2 times, most recently from db623dd to 7b66861 Compare January 3, 2024 03:16
workflow/controller/agent.go Outdated Show resolved Hide resolved
workflow/controller/agent.go Show resolved Hide resolved
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

Thanks!

@terrytangyuan terrytangyuan merged commit 198818b into argoproj:main Jan 3, 2024
27 checks passed
hittingray pushed a commit to atlassian-forks/argo-workflows that referenced this pull request Jan 4, 2024
hittingray pushed a commit to atlassian-forks/argo-workflows that referenced this pull request Jan 4, 2024
@agilgur5 agilgur5 added area/controller Controller issues, panics area/spec Changes to the workflow specification. area/templates/http labels Jan 4, 2024
sarabala1979 pushed a commit that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics area/spec Changes to the workflow specification. area/templates/http
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workflow-level PodSpecPatch is not applied to agent pod
3 participants