grafana / helm-charts

Apache License 2.0
1.66k stars 2.27k forks source link

grafana chart fails on Kubernetes 1.25/OKD 4.12 no matches for kind PodSecurityPolicy in version policy/v1beta1 #2175

Open elfelip opened 1 year ago

elfelip commented 1 year ago

When I try to deploy Grafana on my OKD 4.12 cluster using the helm chart I have the following error message "Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: resource mapping not found for name: \"my-release\" namespace: \"\" from \"\": no matches for kind \"PodSecurityPolicy\" in version \"policy/v1beta1\"\nensure CRDs are installed first\n

It seems that podsecuritypolicy have been deprecated since Kubernetes 1.21 and removed in 1.25

https://kubernetes.io/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/

Is it possible to use the chart without PodSecurtityPolicy?

Jdavid77 commented 1 year ago

Facing the same exact issue, would love to know a possible fix for this

rafaribe commented 1 year ago

Please try to set .Values.pspEnabled to false to avoid this.

elfelip commented 1 year ago

I tried this in in my values.yaml but does not seem to fix the issue: rbac: pspEnabled: false

Do I have to set more values in this section?

mllab-nl commented 1 year ago

@elfelip @Jdavid77 Deleting helm releases history in ConfigMaps/Secrets(depending on your HELM_DRIVER) solved it. It is not ideal. But it works for some cases. Apparently it is something related to how helm updates things

tillig commented 1 year ago

Possible duplicate of #1746