You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/22 14:11:40 UTC

[GitHub] [airflow] shmyer opened a new issue, #24604: Plus sign in chart label should be replaced with an underscore

shmyer opened a new issue, #24604:
URL: https://github.com/apache/airflow/issues/24604

   ### Official Helm Chart version
   
   1.6.0 (latest released)
   
   ### Apache Airflow version
   
   2.2.3
   
   ### Kubernetes Version
   
   1.22
   
   ### Helm Chart configuration
   
   We're using Flux Helm controller v0.22.1 for deploying our helm releases.
   
   ### Docker Image customisations
   
   Yes, but this should be irrelevant for this issue.
   
   ### What happened
   
   In the newest version the Flux helm controller is appending a plus sign and a number to the chart version like so:
   
   `airflow-2.2.3+1`
   
   This chart version is set in the chart label for all deployed resources:
   
   ```
   metadata:
     name: {{ .Release.Name }}-worker
     labels:
       tier: airflow
       component: worker
       release: {{ .Release.Name }}
       chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
       heritage: {{ .Release.Service }}
   ```
   
   The issue is, that kubernetes does not allow a plus sign, in labels, resulting in the helm upgrade to fail with an error:
   
   `metadata.labels: Invalid value: "airflow-2.2.3+1": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')`
   
   
   ### What you think should happen instead
   
   In standard helm charts this is handled by the _helpers.tpl file as follows:
   
   ```
   {{/*
   Create chart name and version as used by the chart label.
   */}}
   {{- define "esc.chart" -}}
   {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
   {{- end }}
   ```
   
   The airflow helm chart should handle the plus sign in the chart version aswell by replacing it with an underscore.
   
   ### How to reproduce
   
   Deploy airflow via Flux helmcontroller and upgrade the helm release.
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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.apache.org

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


[GitHub] [airflow] boring-cyborg[bot] commented on issue #24604: Plus sign in chart label should be replaced with an underscore

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #24604:
URL: https://github.com/apache/airflow/issues/24604#issuecomment-1163154160

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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


[GitHub] [airflow] potiuk commented on issue #24604: Plus sign in chart label should be replaced with an underscore

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24604:
URL: https://github.com/apache/airflow/issues/24604#issuecomment-1163165134

   Please raise issue to flux to fix it. We cannot account for anything "extra" added by Flux or any other controllers. In the meantime downgrade to the version of Flux that has no such issue and raise an issue to them.  You can refer to this issue - this way we will know when they fix it.


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


[GitHub] [airflow] potiuk commented on issue #24604: Plus sign in chart label should be replaced with an underscore

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24604:
URL: https://github.com/apache/airflow/issues/24604#issuecomment-1163169804

   I mean - if this is anything defined by CNCF and fouindation as an expected behaviour - then we are happy to implement it, but if this is a Flux-only specific quirk, then I believe we should not. 
   
   Is there any other solution than Fliux that behaves in similar way ? 
   
   If you find answers to those questions, I believe we might reconsider this but until then I am converting it to a discussion.


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


[GitHub] [airflow] potiuk commented on issue #24604: Plus sign in chart label should be replaced with an underscore

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24604:
URL: https://github.com/apache/airflow/issues/24604#issuecomment-1163166639

   Btw. What do you mean "standard helm charts" ? Who defined the standard ? Any examples?


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


[GitHub] [airflow] potiuk closed issue #24604: Plus sign in chart label should be replaced with an underscore

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #24604: Plus sign in chart label should be replaced with an underscore
URL: https://github.com/apache/airflow/issues/24604


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