Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for kubernetes 1.25 #289

Closed
astylos opened this issue Sep 19, 2022 · 2 comments · Fixed by #260
Closed

Support for kubernetes 1.25 #289

astylos opened this issue Sep 19, 2022 · 2 comments · Fixed by #260
Labels
Milestone

Comments

@astylos
Copy link

astylos commented Sep 19, 2022

I am unable to upgrade Pulsar version after upgrading kubernetes to 1.25.0

$ microk8s kubectl get nodes
NAME          STATUS   ROLES    AGE    VERSION
centos8vm02   Ready    <none>   348d   v1.25.0
centos8vm03   Ready    <none>   348d   v1.25.0
centos8vm01   Ready    <none>   348d   v1.25.0
centos8vm04   Ready    <none>   348d   v1.25.0
$ microk8s.helm3 --namespace pulsar upgrade pulsar-mini apache/pulsar --version 2.9.4 -f pulsar.yaml
Error: UPGRADE FAILED: [resource mapping not found for name: "pulsar-mini-bookie" namespace: "pulsar" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "pulsar-mini-broker" namespace: "pulsar" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "pulsar-mini-proxy" namespace: "pulsar" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "pulsar-mini-zookeeper" namespace: "pulsar" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"
ensure CRDs are installed first]

I'm no kubernetes/helm expert, so may have done this incorrectly, but I pulled the chart from git, edited all policy/v1beta1 to policy/v1 and tried installing from local chart, but it still gave same errors.

@relief-melone
Copy link

relief-melone commented Oct 6, 2022

Fix should be straight forward. As workaround you can just disable the policy (do this for broker proxy and zookeeper) by

bookie:
  pdb:
    usePolicy: false

This worked for me. In the chart as PodDisruptionBudget has been moved out of beta and has been stable since v1.21 all the .pdb charts should look something like this

{{- if semverCompare ">=1.21" .Capabilities.KubeVersion.GitVersion }}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget

Haven't tested this yet. But it should work. Are you sure you caught all the deprecated policy/v1beta kinds?

@michaeljmarshall michaeljmarshall linked a pull request Oct 19, 2022 that will close this issue
1 task
@michaeljmarshall
Copy link
Member

This will be fixed by #260.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants