Chart: added basic support git-sync v4.0.0+#34342
Chart: added basic support git-sync v4.0.0+#34342mnacharov wants to merge 1 commit intoapache:mainfrom mnacharov:32335
Conversation
|
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 Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
airflow/providers/cncf/kubernetes/pod_template_file_examples/git_sync_template.yaml
Outdated
Show resolved
Hide resolved
chart/templates/_helpers.yaml
Outdated
There was a problem hiding this comment.
We can't just change what key we use like this, another breaking change.
There was a problem hiding this comment.
I think that this breaking change must be made by anyone who wants to use git-sync v4.0.0+, but we can keep git-sync tag =~v3.9 in chart's values.yaml.
but for those who put v4.0.0+ in their values file it's necessary to upgrade their credentialsSecret as well
There was a problem hiding this comment.
No, we don't have to change the key in the secret, just the env var we are mounting it to (line 265). That makes it a non-breaking change. Alternatively, we could support both (edit: maybe, didn't think that one through completely).
|
@jedcunningham review please |
airflow/providers/cncf/kubernetes/pod_template_file_examples/git_sync_v4_template.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actually, in these templates we can do whatever we want (no backcompat concerns). So let's just keep the v4 one.
| imagePullPolicy: {{ .Values.images.gitSync.pullPolicy }} | ||
| securityContext: {{- include "localContainerSecurityContext" .Values.dags.gitSync | nindent 4 }} | ||
| env: | ||
| {{- if semverCompare "<4.0.0" .Values.images.gitSync.tag }} |
There was a problem hiding this comment.
I don't think we can just compare against the tag like this. Sure, works for the upstream images, but we shouldn't restrict how folks can retag in their own registry.
If we want to do branching logic like this, we'll have to add an equivalent to airflowVersion somewhere.
There was a problem hiding this comment.
Alternatively, can we just set both the old and new env vars? A little messier, but no new version config either...
There was a problem hiding this comment.
Moving @hussein-awala's question here from a resolved thread, I'd say that will dictate whether the old + new approach is palatable:
Will we have deprecation warning if we provide both old and new styles to git-sync v4.0.0+ image?
There was a problem hiding this comment.
yes, we will have deprecation warning if we provide both old and new env vars
| "images": { | ||
| "gitSync": { | ||
| "repository": "test-registry/test-repo", | ||
| "tag": "test-tag", |
There was a problem hiding this comment.
Yep, this is an example of why inferring the version from the tag isn't safe.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Allow to use git-sync v4.0.0+: specify new variables if a new version is specified
closes: #32335