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

temaplateDefaults: container/script: image does nothing #9633

Closed
2 of 3 tasks
Maciej-Zwolinski opened this issue Sep 20, 2022 · 7 comments · Fixed by #10784
Closed
2 of 3 tasks

temaplateDefaults: container/script: image does nothing #9633

Maciej-Zwolinski opened this issue Sep 20, 2022 · 7 comments · Fixed by #10784
Labels
P3 Low priority type/bug

Comments

@Maciej-Zwolinski
Copy link

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?

I wanted to set default image to use in script or container sections in templates using templateDefault feature on workflow(template). Instead of setting the default value I received an error message:

Internal Server Error: templates.default-workflow-template-poc.tasks.step-one templates.step-one.script.image may not be empty

There is no mention in docs of this field being prohibited.

Version

v3.3.9

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: default-workflow-template-poc
spec:
  entrypoint: mian-poc
  templateDefaults:
    script:
      image: my-private-repo/my_image:latest

  templates:
  - name: main-poc
    dag:
      tasks:
      - name: step-one
        template: step-one


  - name: step-one
    script:
      #image: my-private-repo/my_image:latest # <- commented out
      command: ["bash"]
      source: |
        set -euo pipefail
        echo "$PWD"

Logs from the workflow controller

n/a

Logs from in your workflow's wait container

n/a

@Maciej-Zwolinski
Copy link
Author

The workaround is to supply parameter with default value for an image and reference it via workflow.parameters.image-name, but still, it does not solve the code replication issue.

@sarabala1979 sarabala1979 added solution/workaround There's a workaround, might not be great, but exists P3 Low priority and removed solution/workaround There's a workaround, might not be great, but exists labels Sep 23, 2022
@terrytangyuan
Copy link
Member

This seems like a bug. Would anyone like to submit a PR to fix it?

@stale
Copy link

stale bot commented Oct 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions.

@stale stale bot added the problem/stale This has not had a response in some time label Oct 15, 2022
@jakemiller649
Copy link

Is there a list of fields that can/cannot be used with templateDefaults?

@stale stale bot removed the problem/stale This has not had a response in some time label Oct 27, 2022
@stale
Copy link

stale bot commented Nov 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions.

@stale stale bot added the problem/stale This has not had a response in some time label Nov 12, 2022
@RoryDoherty
Copy link
Contributor

Also running into this on version v3.4.3, could we remove the stale label
I'd also like to be able to template out the command field as well

@stale stale bot removed the problem/stale This has not had a response in some time label Mar 29, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Mar 30, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Mar 30, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Mar 30, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Mar 31, 2023
@RoryDoherty
Copy link
Contributor

This seems like a bug. Would anyone like to submit a PR to fix it?

@terrytangyuan I have opened a PR with a fix for this
#10784

RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Apr 11, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Apr 11, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Apr 11, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Apr 11, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Apr 11, 2023
RoryDoherty added a commit to RoryDoherty/argo-workflows that referenced this issue Apr 11, 2023
terrytangyuan pushed a commit that referenced this issue Apr 11, 2023
…ixes #9633 (#10784)

Signed-off-by: Rory Doherty <rory@tigera.io>
terrytangyuan pushed a commit that referenced this issue May 25, 2023
…ixes #9633 (#10784)

Signed-off-by: Rory Doherty <rory@tigera.io>
JPZ13 pushed a commit to pipekit/argo-workflows that referenced this issue Jul 4, 2023
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this issue May 9, 2024
…ixes argoproj#9633 (argoproj#10784)

Signed-off-by: Rory Doherty <rory@tigera.io>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority type/bug
Projects
None yet
5 participants