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

ArgoCD creates cronjob with default paramethers #15284

Closed
3 tasks done
EsDmitrii opened this issue Aug 30, 2023 · 1 comment
Closed
3 tasks done

ArgoCD creates cronjob with default paramethers #15284

EsDmitrii opened this issue Aug 30, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@EsDmitrii
Copy link

EsDmitrii commented Aug 30, 2023

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

Hi!
I noticed that when I trigger cronjob via ArgoCD, it creates job with default jobTemplate.spec values.
See this kubectl explain cronjob.spec.jobTemplate.spec
When I trigger it via kubernetes, all works well.

I researched and found that lua script is the root cause of this issue: https://github.com/argoproj/argo-cd/blob/master/resource_customizations/batch/CronJob/actions/create-job/action.lua#L50-L54
There are no lines to configure whole jobTemplate.spec. There are only two lines that configures deepCopy(obj.spec.jobTemplate.spec.template.metadata) and deepCopy(obj.spec.jobTemplate.spec.template.spec).
I'm not a pro in lua and I don't know syntax, but I know that this is the root cause:)

To Reproduce

  1. Create cronjob and check that you defined jobTemplate.spec:
    264266303-bd3d3dc0-ba26-4ecf-b9bb-26ed568f0bad\
  2. Trigger cronjob via ArgoCD:
    264266317-be537ea4-6d78-4444-b25e-afc8d728adef
    image\
  3. Check created job:
    264266322-eb2e2983-a026-4283-b684-c6f283338fc5
    It doesn't contain our custom jobTemplate.spec paramethers:
    264266325-0ffbdf1c-90e0-44d1-a789-3a4a114170ea\

Expected behavior

jobTemplate.spec in job defined the same as in cronjob.

Version

{
    "Version": "v2.8.1+2bc94af",
    "BuildDate": "2023-08-22T20:08:23Z",
    "GitCommit": "2bc94af7bd081bc4682c2c6dc005f6336c754c2b",
    "GitTreeState": "clean",
    "GoVersion": "go1.20.6",
    "Compiler": "gc",
    "Platform": "linux/amd64",
    "KustomizeVersion": "v5.1.0 2023-06-19T16:58:18Z",
    "HelmVersion": "v3.12.1+gf32a527",
    "KubectlVersion": "v0.24.2",
    "JsonnetVersion": "v0.20.0"
}

Logs
No relevant logs, you can see all stuff on screenshots.

@EsDmitrii EsDmitrii added the bug Something isn't working label Aug 30, 2023
@afrancis101
Copy link
Contributor

This issue looks like it was resolved in #15259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants