jedcunningham commented on code in PR #34342:
URL: https://github.com/apache/airflow/pull/34342#discussion_r1337848677
##########
airflow/providers/cncf/kubernetes/pod_template_file_examples/git_sync_v4_template.yaml:
##########
Review Comment:
Actually, in these templates we can do whatever we want (no backcompat
concerns). So let's just keep the v4 one.
##########
chart/templates/_helpers.yaml:
##########
@@ -197,6 +197,7 @@ If release name contains chart name it will be used as a
full name.
imagePullPolicy: {{ .Values.images.gitSync.pullPolicy }}
securityContext: {{- include "localContainerSecurityContext"
.Values.dags.gitSync | nindent 4 }}
env:
+ {{- if semverCompare "<4.0.0" .Values.images.gitSync.tag }}
Review 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.
##########
chart/templates/_helpers.yaml:
##########
@@ -197,6 +197,7 @@ If release name contains chart name it will be used as a
full name.
imagePullPolicy: {{ .Values.images.gitSync.pullPolicy }}
securityContext: {{- include "localContainerSecurityContext"
.Values.dags.gitSync | nindent 4 }}
env:
+ {{- if semverCompare "<4.0.0" .Values.images.gitSync.tag }}
Review Comment:
Alternatively, can we just set both the old and new env vars? A little
messier, but no new version config either...
##########
helm_tests/airflow_aux/test_pod_template_file.py:
##########
@@ -62,7 +62,7 @@ def
test_should_add_an_init_container_if_git_sync_is_true(self):
"images": {
"gitSync": {
"repository": "test-registry/test-repo",
- "tag": "test-tag",
Review Comment:
Yep, this is an example of why inferring the version from the tag isn't safe.
--
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]