fgalind1 commented on code in PR #31066:
URL: https://github.com/apache/airflow/pull/31066#discussion_r1237880398


##########
chart/templates/_helpers.yaml:
##########
@@ -23,7 +23,40 @@ We truncate at 63 chars because some Kubernetes name fields 
are limited to this
 If release name contains chart name it will be used as a full name.
 */}}
 {{- define "airflow.fullname" -}}
-  {{- if .Values.fullnameOverride }}
+  {{- if not .Values.useStandardNaming }}
+    {{- .Release.Name }}
+  {{- else if .Values.fullnameOverride }}
+    {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+  {{- else }}
+    {{- $name := default .Chart.Name .Values.nameOverride }}
+    {{- if contains $name .Release.Name }}
+      {{- .Release.Name | trunc 63 | trimSuffix "-" }}
+    {{- else }}
+      {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+    {{- end }}
+  {{- end }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name for objects that already contained 
airflow in the name
+We truncate at 63 chars because some Kubernetes name fields are limited to 
this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "airflow.name" -}}
+  {{ if .Values.fullnameOverride }}
+    {{- printf "%s" .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+  {{- else }}
+    {{- $name := default .Chart.Name .Values.nameOverride }}
+    {{- if contains $name .Release.Name }}
+      {{- .Release.Name | trunc 63 | trimSuffix "-" }}
+    {{- else }}
+      {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}

Review Comment:
   yeah I think we can use fullname for all instead. I've removed airflow.name 
and kept consistency in 
https://github.com/apache/airflow/pull/31066/commits/b790f98d5a2634fa30e115d2ceb1598869cebcf9
 😃 



-- 
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]

Reply via email to