helm-controller
helm-controller copied to clipboard
SecretKeyRef for kubeconfig doesn't actually have `key`
I have a generated kubeconfig in a secret and it decided to call the key kubeconfig
. FluxCD Helm Controller expects the key to be values.yaml
or values
.
Here is the kubeConfig secret ref I made:
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
spec:
kubeConfig:
secretRef:
name: some-staging
Here is the status on HelmRelease when I just ref the secret by name.
KubeConfig secret 'clusters/some-staging' does not contain a 'value' or 'value.yaml' key with data
Here is the error I get from kubectl when I add key to the ref like this:
kubeConfig:
secretRef:
name: some-staging
key: kubeconfig
error: error validating "out.yaml": error validating data: ValidationError(HelmRelease.spec.kubeConfig.secretRef): unknown field "key" in io.fluxcd.toolkit.helm.v2beta1.HelmRelease.spec.kubeConfig.secretRef; if you choose to ignore these errors, turn validation off with --validate=false
I found the docs that say I can here: https://fluxcd.io/docs/components/helm/api/#helm.toolkit.fluxcd.io/v2beta1.KubeConfig
Which directs me to here: https://pkg.go.dev/github.com/fluxcd/pkg/apis/meta#SecretKeyReference
My feature request is simply to expose the key
field on the kubeconfig reference.