cloudnative-pg / charts

CloudNativePG Helm Charts
Apache License 2.0
138 stars 62 forks source link

Unable to upgrade to cloudnative-pg chart `v0.21.0` due to grafana dashboard being enabled #267

Closed onedr0p closed 2 months ago

onedr0p commented 2 months ago

I had to disable the grafana dashboard option or else I would get this error:

  Warning  UpgradeFailed     4s (x3 over 10s)  helm-controller  (combined from similar events): Helm upgrade failed for release database/cloudnative-pg with chart cloudnative-pg@0.21.0: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:
  line 9: mapping key "grafana_dashboard" already defined at line 8

helm values:

    crds:
      create: true
    monitoring:
      podMonitorEnabled: false
      grafanaDashboard:
        create: true
onedr0p commented 2 months ago

It appears maybe the dependency chart was not updated? This one still looks to still be using https://github.com/cloudnative-pg/grafana-dashboards/blob/cluster-v0.0.1/charts/cluster/values.yaml and not https://github.com/cloudnative-pg/grafana-dashboards/blob/cluster-v0.0.2/charts/cluster/values.yaml

dexter136 commented 2 months ago

I tracked this down and it appears to be the label grafana_dashboard being applied in two different places.

In chart cloudnative-pg-0.21.0 > values.yaml line 153 sidecarLabel: "grafana_dashboard" In the imported Chart grafana-dashboards 0.0 > values.yaml line 19 grafana_dashboard: "1"

Both of these try to apply to the "sidecar-configmap.yaml' template in the dashboards chart and conflict.

Adding monitoring.grafanaDashboard.sidecarLabel: '' to the values I pass to the cloudnative-pg chart seems to be a good workaround for now.

Edit The label is defined in the grafana-dashboards chart here https://github.com/cloudnative-pg/grafana-dashboards/blob/cluster-v0.0.1/charts/cluster/values.yaml#L18-L19 And in the cloudnative-pg chart here https://github.com/cloudnative-pg/charts/blob/main/charts/cloudnative-pg/values.yaml#L153-L155

dexter136 commented 2 months ago

Bumping the dependency version here to 0.2 fixes this.

phisco commented 2 months ago

Awesome! PRs are welcome, we'll make sure to cut a fixed release asap 🙏