Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app.kubernetes.io/version label value is rendered with an invalid character #3741

Open
frossi-git opened this issue Dec 13, 2024 · 0 comments · May be fixed by #3742
Open

app.kubernetes.io/version label value is rendered with an invalid character #3741

frossi-git opened this issue Dec 13, 2024 · 0 comments · May be fixed by #3742
Labels
bug Something isn't working

Comments

@frossi-git
Copy link

What steps did you take and what happened:
I am upgrading Gatekeeper to v3.18.0 via Helm chart using Flux CD HelmRelease with the reconcileStrategy parameter set to Revision.
helm upgrade fails with the error:

ServiceAccount "gatekeeper-admin-upgrade-crds" is invalid: metadata.labels: Invalid value: "3.18.0+95f1806eb07f": 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])?')

The label with the problematic value is app.kubernetes.io/version, which is created in the helm chart template _helpers.tpl.

What did you expect to happen:
The label value should be populated with accepted values only.
The character + should be converted to _ as it is done for the gatekeeper.chart value.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
I am submitting a PR for the fix that I tested.

Environment:

  • Gatekeeper version: 3.18.0
  • Kubernetes version: (use kubectl version): v1.31.3-gke.1006000
@frossi-git frossi-git added the bug Something isn't working label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant