Add support for annotations on job resource
What was changed
Added support for adding annotations to the schema Job resource. I have leveraged the temporal.resourceAnnotations template for consistency. If preferred, we could use the 'direct' approach as used with the annotations in the Job's pod specification, .e.g:
{{- with $.Values.schema.jobAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
Why?
We deploy our manifests using ArgoCD and it fails when we make a change to the Job's pod specification (e.g. the secrets being mounted or the environment variables set) as by default ArgoCD uses apply. However this behaviour can be reconfigured via resource annotations. This PR allows us to set that annotation.
Checklist
-
Closes n/a
-
How was this tested: I ran
helm templatelocally -
Any docs updates needed? n/a
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Any updates @stephen-harris ?
Hey! What would be the steps to get it merged? I can see that there are couple of related issues related to the "schema" job when using argocd and this one has quite a lot of thumbs up :)
Besides current PR I can see one more trying to solve the same: https://github.com/temporalio/helm-charts/pull/743 but according to discussion in this issue: https://github.com/temporalio/helm-charts/pull/555, helm hooks were already present at some point in time.
And one more related feature request: https://github.com/temporalio/helm-charts/issues/735
But.. on the topic again. This approach seems to be the least intrusive and safest one. If there is something more to be done I am glad to further improve this PR, but would need to know what exactly. @robholland could you guide me?