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

Helm Chart uses .Chart.Version as a label #3772

Open
4 tasks done
frekw opened this issue Oct 14, 2024 · 3 comments
Open
4 tasks done

Helm Chart uses .Chart.Version as a label #3772

frekw opened this issue Oct 14, 2024 · 3 comments
Labels
bug Something isn't working gha-runner-scale-set Related to the gha-runner-scale-set mode needs triage Requires review from the maintainers

Comments

@frekw
Copy link

frekw commented Oct 14, 2024

Checks

Controller Version

0.9.3

Deployment Method

Helm

Checks

  • This isn't a question or user support case (For Q&A and community support, go to Discussions).
  • I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes

To Reproduce

1. Deploy a HelmRelease via FluxCD (as an OCI container in my case)
2. Observe

Helm upgrade failed for release github-actions-system/gha-runner-scale-set-controller with chart [email protected]+b4e577166191: failed to create resource: Deployment.apps "gha-runner-scale-set-controller-gha-rs-controller" is invalid: spec.template.labels: Invalid value: "0.9.3+b4e577166191": 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])?')


### Describe the bug

This is a case of the chart using `.Chart.Version` as a label, directly. Since SemVer supports `+`, this can result [in invalid Kubernetes labels](https://helm.sh/docs/chart_best_practices/conventions/#version-numbers).

### Describe the expected behavior

The labels [here](https://github.com/actions/actions-runner-controller/blob/master/charts/gha-runner-scale-set-controller/templates/deployment.yaml#L28) need to be properly escaped.

In other places of the chart, this is done already, by replacing `+` with `_`, e.g here [[1](https://github.com/actions/actions-runner-controller/blob/master/charts/gha-runner-scale-set-controller/templates/deployment.yaml#L7)], [[2](https://github.com/actions/actions-runner-controller/blob/master/charts/gha-runner-scale-set-controller/templates/_helpers.tpl#L35-L37)].

### Additional Context

```yaml
n/a

Controller Logs

n/a

Runner Pod Logs

n/a
@frekw frekw added bug Something isn't working gha-runner-scale-set Related to the gha-runner-scale-set mode needs triage Requires review from the maintainers labels Oct 14, 2024
Copy link
Contributor

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.

@lexdevelop
Copy link

I can confirm same issue

@lexdevelop
Copy link

@frekw take a look here #3728 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gha-runner-scale-set Related to the gha-runner-scale-set mode needs triage Requires review from the maintainers
Projects
None yet
Development

No branches or pull requests

2 participants