Skip to content

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

@rlafferty

Description

@rlafferty

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggha-runner-scale-setRelated to the gha-runner-scale-set modeneeds triageRequires review from the maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions