You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "fgalind1 (via GitHub)" <gi...@apache.org> on 2023/09/08 15:58:13 UTC

[GitHub] [airflow] fgalind1 commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility

fgalind1 commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1711895617

   > I think the problem is that if you use "airflow" as Release.Name the new "airflow.fullname" macro shortens to just .Release.Name.
   
   yep that's correct
   
   > Was there any particular reason to shorten the fullname in this case @fgalind1 other than avoiding accidental duplication? I am not sure if there ia any way to avoid backwards compatibilty problems, but my vote would go to removing the shortening and leaving "airflow-airflow" if someone uses "airflow" release name (even if it looks duplicate).
   
   Just to make it standard as that is the most common pattern I've seen in mostly all upstream charts for the `fullname` implementation, e.g:
   
   - https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_names.tpl#L31-L32
   - https://github.com/jfrog/charts/blob/master/stable/artifactory/templates/_helpers.tpl#L25-L26
   - https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus/templates/_helpers.tpl#L56-L57
   
   Maybe if we want to keep it for backwards compatibility we could add an option that opts-in/out that if condition like `.Values.disableShortenFullname` or `.Values.allowShortenFullname`? Maybe to something like:
   
   ```
   {{- define "airflow.fullname" -}}
     {{- if not .Values.useStandardNaming }}
       {{- .Release.Name }}
     {{- else if .Values.fullnameOverride }}
       {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
     {{- else }}
       {{- $name := default .Chart.Name .Values.nameOverride }}
       {{- if and .Values.disableShortenFullname (contains $name .Release.Name) }}.
         {{- .Release.Name | trunc 63 | trimSuffix "-" }}
       {{- else }}
         {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
       {{- end }}
     {{- end }}
   {{- end }}
   ```
   
   


-- 
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-unsubscribe@airflow.apache.org

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