Skip to content

[helm] allow digest for pod_template image#42348

Closed
josedev-union wants to merge 1 commit intoapache:mainfrom
josedev-union:helm/support-digest-for-pod-template-image
Closed

[helm] allow digest for pod_template image#42348
josedev-union wants to merge 1 commit intoapache:mainfrom
josedev-union:helm/support-digest-for-pod-template-image

Conversation

@josedev-union
Copy link


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg
Copy link

boring-cyborg bot commented Sep 19, 2024

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@josedev-union josedev-union force-pushed the helm/support-digest-for-pod-template-image branch from 6f46a98 to fb61594 Compare September 19, 2024 10:40
Comment on lines +342 to +346
{{- if $digest }}
{{- printf "%s@%s" $repository $digest -}}
{{- else }}
{{- printf "%s:%s" $repository $tag -}}
{{- end }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that if we already fix this, we should also check if there's a tag, and if both (digest and tag) are missing, it would raise an error.

Copy link
Contributor

@romsharon98 romsharon98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests?

@josedev-union
Copy link
Author

I tested with this patch in staging env and realized that worker container image is decided by kubernetes.worker_container_repository and kubernetes.worker_container_tag. instead of the ref in pod_template file.

So I don't think this is needed. My intention was to use digest without a certain tag for worker containers.
I will close this PR now and tag all images and use worker_container_tag

@romsharon98
Copy link
Contributor

I think this is another way to get what you want.
I think that your PR is needed and your changes are good and only ut is need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants