kots
kots copied to clipboard
Helm chart string value coerced to bool
The stable/grafana helm chart will not render with the values provided. I get the following error in the kotsadm pod.
2020-05-26T14:02:46.197Z ERROR handlers/update.go:156 failed to pull: failed to render upstream: failed to render helm chart in upstream: failed to render chart: render error in "grafana/templates/ingress.yaml": template: grafana/templates/ingress.yaml:23:23: executing "grafana/templates/ingress.yaml" at <$value>: wrong type for value; expected string; got bool
github.com/replicatedhq/kotsadm/pkg/logger.Error
/go/src/github.com/replicatedhq/kotsadm/pkg/logger/logger.go:21
github.com/replicatedhq/kotsadm/pkg/handlers.AppUpdateCheck.func1
/go/src/github.com/replicatedhq/kotsadm/pkg/handlers/update.go:156
helm pull stable/grafana --version=5.0.25
grafana.yaml
apiVersion: kots.io/v1beta1
kind: HelmChart
metadata:
name: grafana
spec:
# chart identifies a matching chart from a .tgz
chart:
name: grafana
chartVersion: 5.0.25
# values are used in the customer environment, as a pre-render step
# these values will be supplied to helm template
values:
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/enable-access-log: "false"
# builder values provide a way to render the chart with all images
# and manifests. this is used in replicated to create airgap packages
builder: {}
looks like this should be using ParseIntoString here for string values. this will require some re-architecting.
https://github.com/replicatedhq/kots/blob/8d5da1c27d410fc90017a2158ac4638acf858459/pkg/base/helm.go#L44
https://github.com/helm/helm/issues/2848
I've run into this again and it looks like the issue is specific to values that look like booleans in annotations. Not sure if this helps or not :slightly_smiling_face: