monitoring ca-secret logic allows for invalid vlaue for ca.pem key
this line of the monitoring secret-ca.yaml
allows for a situation in which an empty string is set as the value for ca.pem
, which since Helm v3.0.0 will result in the following error:
Helm upgrade failed: error validating "": error validating data: unknown object type "nil" in Secret.data.ca.pem
This can be reproduced by setting .Values.monitoring.sso.enabled: true
and .Values.monitoring.enabled: true
, but leaving .Values.sso.certificateAuthority.cert: ""
. The conditional at the line linked above is satisfied by .Values.monitoring.sso.enabled: true
and .Values.monitoring.enabled: true
, which results in the creation of a secret with ca.pem: nil
. The logic should be updated as follows:
{{- if and (or (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.grafana.enabled .Values.grafana.sso.enabled)) (or .Values.sso.certificate_authority (dig "certificateAuthority" "cert" false .Values.sso)) }}