jedcunningham commented on code in PR #31066:
URL: https://github.com/apache/airflow/pull/31066#discussion_r1237853341
##########
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:
I guess I misunderstood the intent of this helper. I thought it existed to
keep airflow in the existing object names (which, as written, we aren't, per
the tests).
If we consider the non-standard naming case, we are already renaming the
objects, so why don't we just start using `airflow.fullname`? Do we need to
have this special helper?
--
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]