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

Add a Values structured field #140

Open
gbonnefille opened this issue Apr 7, 2022 · 3 comments
Open

Add a Values structured field #140

gbonnefille opened this issue Apr 7, 2022 · 3 comments

Comments

@gbonnefille
Copy link
Contributor

Currently, in order to pass values to HelmChart or HelmChartConfig, we have to use the ValuesContent field. This field is a string, generally used as a block:

apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: myapp
  namespace: kube-system
spec:
  valuesContent: |-
    ingress:
      enabled: true

Having a Values structured field would be much more usefull as we will be able to play with kustomize to patch subparts of this field in overlays.

apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: myapp
  namespace: kube-system
spec:
  values:
    ingress:
      enabled: true
@gbonnefille
Copy link
Contributor Author

The helm-controller of fluxcd has such approach: https://github.com/fluxcd/helm-controller/blob/main/api/v2beta1/helmrelease_types.go#L162

@aiyengar2
Copy link
Contributor

aiyengar2 commented Apr 12, 2022

ProjectHelmCharts supports this with a construct called a GenericMap https://github.com/aiyengar2/helm-project-operator/blob/3032ca2bb64964f96bb446657d246826ce78a670/pkg/apis/helm.cattle.io/v1alpha1/project.go#L20, which also implements toYaml.

If k3s-io/helm-controller wants to introduce this feature, I could move it over the rancher/wrangler as a generic type that can be used to define this field. Should be a straightforward feature request.

Could also look into using *apiextensionsv1.JSON the way that fluxcd does as well.

@rkesters
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants