Net 5229 create dedicated argocd stanza#2785
Conversation
|
I don't think you need those annotations on all the jobs, just the jobs that don't have helm hook annotations already: https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#helm-hooks
Also how can we ensure Jobs in the future get this hook added? Can you write a test that ensures |
Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com>
|
Have you tried this out? I don't think it will work as written. For example, the gateway cleanup job is marked as a pre-delete job but this change maps it to an argocd The gateway-resources job is marked at post-install,post-upgrade which based on the docs is automatically mapped to an argocd I think you don't need to touch the gateway resources or server-acl-init-cleaup jobs but would be best to test that and verify. For the gateway-cleanup job I'm not exactly sure what that does so will need to investigate. In terms of testing, I was thinking a test similar to consul-k8s/charts/consul/test/unit/helpers.bats Lines 90 to 134 in e5ad447 Job either have helm hook annotations or the argocd templating. So that if someone adds a Job in the future without either of those annotations that the test will fail to remind them to add one of the annotations.
|
|
I think this needs to be tested with a Kind cluster and ArgoCD, there are too many unknowns. Here is a script that you can use as a starting point for setting everything up... |
|
Added backports to the PR. |
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
|
@absolutelightning Could you make sure this gets backported? Thank you! |
|
sure @david-yu will do it today. Thanks. |
* enable argocd * adds bats test and setting argo annotations if global.argocd.enabled = true * update comment * added change log * Update charts/consul/templates/gateway-cleanup-job.yaml Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> * comments fixes * fix line diff * change log fix * fix comment * Update .changelog/2785.txt Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com> --------- Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
* enable argocd * adds bats test and setting argo annotations if global.argocd.enabled = true * update comment * added change log * Update charts/consul/templates/gateway-cleanup-job.yaml Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> * comments fixes * fix line diff * change log fix * fix comment * Update .changelog/2785.txt Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com> --------- Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
* enable argocd * adds bats test and setting argo annotations if global.argocd.enabled = true * update comment * added change log * Update charts/consul/templates/gateway-cleanup-job.yaml Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> * comments fixes * fix line diff * change log fix * fix comment * Update .changelog/2785.txt Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com> --------- Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
…e 1.2.x (#2872) Net 5229 create dedicated argocd stanza (#2785) * enable argocd * adds bats test and setting argo annotations if global.argocd.enabled = true * update comment * added change log * Update charts/consul/templates/gateway-cleanup-job.yaml * comments fixes * fix line diff * change log fix * fix comment * Update .changelog/2785.txt --------- Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
… 1.1.x (#2873) Net 5229 create dedicated argocd stanza (#2785) * enable argocd * adds bats test and setting argo annotations if global.argocd.enabled = true * update comment * added change log * Update charts/consul/templates/gateway-cleanup-job.yaml * comments fixes * fix line diff * change log fix * fix comment * Update .changelog/2785.txt --------- Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
… 1.0.x (#2874) Net 5229 create dedicated argocd stanza (#2785) * enable argocd * adds bats test and setting argo annotations if global.argocd.enabled = true * update comment * added change log * Update charts/consul/templates/gateway-cleanup-job.yaml * comments fixes * fix line diff * change log fix * fix comment * Update .changelog/2785.txt --------- Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com> Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
Changes proposed in this PR:
in the jobs -
server-acl-init-job
How I've tested this PR:
Manual Tests -
bash argocd.shdemoargocd.mov
Checklist: