potiuk commented on issue #23895: URL: https://github.com/apache/airflow/issues/23895#issuecomment-1142261423
This is not how Kubernetes/Helm chart works, from the point of view of the definition of the pods have not changed, so it will not update them - hence they will notbe restarted. Your expectations for "Always" is far beyond its meaning. "Always" for image means "always when pod is star ted" not "always when helm is updated". If you want to keep same image name for your dag updates, you will have to include manual restart whenever you updated your dags. However, this is absolutely terrible in terms of your traceabiliity of what is going on, because (like in this case) you can never be sure if your image used actually contains newer or older version of your dags. This is very wrong - because there will be more reasons why the image is not updated (for example if your registry is not reachable K8S will not pull the newer image). It's not good for poduction setup. Also if you update the image and one of your pods gets restarted, it will pull the newer image on its own - without you touching the helm and then you will end up with different DAGs in different pods. That's pretty terrible to debug and manage. The proper solution is to build-in tagging/versioning your images in your image build pipeline - rather than using same tag, you need to update the tag every time when you update DAGs in it (for exampel by adding date/time or increasing version number) and update it in the tag used in Helm (via values file or env var or flag - depending how you deploy it). That completely solves the problem, makes sure that all your components use the same image and make sure all components get restarted when you deploy a new version -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
