redpanda-data / helm-charts

Redpanda Helm Chart
http://redpanda.com
Apache License 2.0
77 stars 96 forks source link

Annotations for post_install_job and post_upgrade_job are not passed to the job template #1474

Closed zs-ko closed 3 months ago

zs-ko commented 3 months ago

What would you like to be added?

Add annotations from the job to the jobtemplate so the pods created inherit the annotations or allow for customizing the job template annotations.

When running with a service mesh like istio the injected sidecar needs to start up before the job tries to connec or else the job fails since it has no retry. adding an annotation can allow istio to hold the job until its sidecar is started up

Why is this needed?

Allow for service meshes to read the annotation and hold jobs until its ready to serve traffic. Istio can hold a job until the proxy is runnig so that the job can communicate with the nodes.

post_install_job:
        annotations:
          proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }'

JIRA Link: K8S-312

chrisseto commented 3 months ago

I think this will be fixed once https://github.com/redpanda-data/helm-charts/pull/1477 lands.

To apply annotations to the Job's Pod you'd specify:

post_install_job:
  podTemplate:
    annotations:
      proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }'
zs-ko commented 3 months ago

@chrisseto thanks, seems to solve the problem