-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
commontech-issuesThe user has a technical issue about an applicationThe user has a technical issue about an applicationtriageTriage is neededTriage is needed
Description
Name and Version
bitnami/common 2.2.0
What steps will reproduce the bug?
When using common.names.chart for label (which is normal), following error can happen:
message: 'Helm upgrade failed for release <namespace>/<app-with-particular-length>
with chart <app-with-particular-length>@2.1.13-SNAPSHOT-20260126-095732+ba14b1c07afe:
cannot patch "<app-with-particular-length>" with kind Service: Service "<app-with-particular-length>"
is invalid: metadata.labels: Invalid value: "<app-with-particular-length>-2.1.13-SNAPSHOT-20260126-095732_":
a valid label must be an empty string or consist of alphanumeric characters,
This is combination of flux OCIRepository (which adds + character) and exact length of application name + version + timestamp.
{{- define "common.names.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
grid-checkout-internal-gateway@2.1.13-SNAPSHOT-20260126-095732+ba14b1c07afe
becomes
grid-checkout-internal-gateway-2.1.13-SNAPSHOT-20260126-095732_
Function correctly replaces + with _, but the _ ends up being last character (63rd), which is not allowed in labels/DNS.
Correction is e.g. to add | trimSuffix "_".
Are you using any custom parameters or values?
No response
What is the expected behavior?
_ not being last character after trimming
What do you see instead?
_ is last character after trimming, which is not DNS conform (can't be used in labels, names, etc.)
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
commontech-issuesThe user has a technical issue about an applicationThe user has a technical issue about an applicationtriageTriage is neededTriage is needed