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

Newer versions of Kustomize fail to override githubConfigSecret to String #3819

Open
4 tasks done
rlafferty opened this issue Nov 21, 2024 · 1 comment
Open
4 tasks done
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

@rlafferty
Copy link

Checks

Controller Version

Chart version 0.9.3

Deployment Method

Kustomize

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

Kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonLabels:
  app.kubernetes.io/name: arc

helmCharts:
  - name: gha-runner-scale-set-controller
    repo: oci://ghcr.io/actions/actions-runner-controller-charts
    version: 0.9.3
    releaseName: gha-runner-scale-set-controller
    namespace: arc-systems
    includeCRDs: true
  - name: gha-runner-scale-set
    repo: oci://ghcr.io/actions/actions-runner-controller-charts
    version: 0.9.3
    namespace: arc-runners
    valuesInline:
      githubConfigUrl: https://github.com/
      githubConfigSecret: gha-runner-scale-set
      controllerServiceAccount:
        namespace: arc-systems
        name: gha-runner-scale-set-controller-gha-rs-controller
      runnerGroup: foo-bar-baz
      runnerScaleSetName: foo-bar-baz

Using Kustomize v.5.4.0 or greater:
kustomize build --enable-helm

Will lead to this error:

Error: could not merge values: wrong node kind: expected MappingNode but got ScalarNode: node contents:
gha-runner-scale-set


### Describe the bug

This begins breaking in _Kustomize_ `v.5.4.0` and later.

It seems this could be related to a change in behavior in _Kustomize_ that begins unmarshalling the yaml with Strict typing prior to applying the values and requires the `valuesInLine` types to match what is in values.yaml.
https://github.com/kubernetes-sigs/kustomize/pull/5550

In the resource templates, for the `gha-runner-scale-set` chart, there are expectations made around this value being overridden to a String in order to use your own provided secret.

### Describe the expected behavior

I would expect to be able to set `githubConfigSecret` to the name of a secret in Kubernetes and have it patched appropriately.

### Additional Context

```yaml
Tested on Kustomize versions:
* v5.2.1 - works as expected
* v5.3.0 - works as expected
* v5.4.0 - patching githubConfigSecret with String value no longer works
* v5.5.0 - patching githubConfigSecret with String value no longer works

Controller Logs

Not a runtime issue.

Runner Pod Logs

Not a runtime issue.
@rlafferty rlafferty 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 Nov 21, 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.

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

1 participant