pegasystems / pega-helm-charts

Orchestrate a Pega Platform™ deployment by using Docker, Kubernetes, and Helm to take advantage of Pega Platform Cloud Choice flexibility.
https://community.pega.com/knowledgebase/articles/cloud-choice
Apache License 2.0
124 stars 198 forks source link

Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1" #502

Closed cz-hong closed 4 months ago

cz-hong commented 1 year ago

Describe the bug helm install backingservices fails with error messages. Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"

To Reproduce follow the instruction described on https://github.com/pegasystems/pega-helm-charts

Chart version pega/pega 2.6.2 Pega installation on kubernetes pega/addons 2.6.2 1.0 A Helm chart for Kubernetes pega/backingservices 2.6.2 Helm Chart to provision the latest Search and R...

Server (if applicable, please complete the following information):

Additional context

~$ helm version
version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"clean", GoVersion:"go1.15.11"}

~$ minikube version
minikube version: v1.28.0
commit: 986b1ebd987211ed16f8cc10aed7d2c42fc8392f

~$ kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.26.0
Kustomize Version: v4.5.7
Server Version: v1.25.3

~$ helm install backingservices pega/backingservices --namespace pegabackingservices --values pega_backingservices.yaml
Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"

~$ kubectl api-resources | sed -e '1p' -e '/poddisruptionbudgets/!d'
NAME                              SHORTNAMES   APIVERSION                             NAMESPACED   KIND
poddisruptionbudgets              pdb          policy/v1                              true         PodDisruptionBudget
cz-hong commented 1 year ago

it seems that elasticsearch helm chart template included in backingservices-2.6.2.tgz does not compatible with kubernetes v1.25.

~$ tar -xzvf /home/pega/.cache/helm/repository/backingservices-2.6.2.tgz
~$ find backingservices/ -name "*.yaml" -exec grep -Hn "policy/v1beta1" {} \;
backingservices/charts/elasticsearch/templates/podsecuritypolicy.yaml:3:apiVersion: policy/v1beta1
backingservices/charts/elasticsearch/templates/poddisruptionbudget.yaml:3:apiVersion: policy/v1beta1
backingservices/charts/srs/templates/srsservice_poddisruptionbudget.yaml:6:apiVersion: policy/v1beta1
~$ cat backingservices/charts/elasticsearch/templates/poddisruptionbudget.yaml
---
{{- if .Values.maxUnavailable }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: "{{ template "elasticsearch.uname" . }}-pdb"
spec:
  maxUnavailable: {{ .Values.maxUnavailable }}
  selector:
    matchLabels:
      app: "{{ template "elasticsearch.uname" . }}"
{{- end }}
kishorv10 commented 4 months ago

The issue is addressed in #454 Kindly try the deployment on the latest version and revert to us in case of further issues.