amoghrajesh commented on code in PR #35748:
URL: https://github.com/apache/airflow/pull/35748#discussion_r1423386253


##########
chart/templates/workers/worker-deployment.yaml:
##########
@@ -342,9 +347,13 @@ spec:
           {{- if $containerLifecycleHooksKerberosSidecar }}
           lifecycle: {{- tpl (toYaml $containerLifecycleHooksKerberosSidecar) 
. | nindent 12 }}
           {{- end }}
-          args: ["kerberos"]
+          args: {{ include "airflowKerberosContainerArgs" . | nindent 12 }}
           resources: {{- toYaml .Values.workers.kerberosSidecar.resources | 
nindent 12 }}
           volumeMounts:
+            {{- if and (semverCompare ">=2.8.0" .Values.airflowVersion) 
(semverCompare "<1.28" $kubeVersion) }}

Review Comment:
   @potiuk maybe we should actually remove the checks everywhere tbh.



##########
chart/templates/_helpers.yaml:
##########
@@ -997,3 +997,27 @@ capabilities:
             app: keda-operator
   {{- end }}
 {{- end }}
+
+{{- define "kubernetesVersion" -}}
+{{ printf "%s" .Capabilities.KubeVersion.Version | trimPrefix "v" }}
+{{- end -}}
+
+{{- define "airflowKerberosContainerArgs" -}}
+{{- $kubectl_version := include "kubernetesVersion" . -}}
+{{- if and (semverCompare ">=2.8.0" .Values.airflowVersion) (semverCompare 
"<1.28" $kubectl_version) }}

Review Comment:
   Thank you. Taking care of myself :)



##########
chart/templates/workers/worker-deployment.yaml:
##########
@@ -387,6 +396,10 @@ spec:
         {{- if .Values.workers.extraVolumes }}
           {{- tpl (toYaml .Values.workers.extraVolumes) . | nindent 8 }}
         {{- end }}
+        {{- if and (semverCompare ">=2.8.0" .Values.airflowVersion) 
.Values.workers.kerberosSidecar.enabled (semverCompare "<1.28" $kubeVersion) }}

Review Comment:
   Not needed here as well



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to