Skip to content

switch to policy API v1 for PDBs #2008

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

Merged
merged 5 commits into from
Oct 6, 2022
Merged

switch to policy API v1 for PDBs #2008

merged 5 commits into from
Oct 6, 2022

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Aug 23, 2022

PodDisruptionBudget API v1beta1 is deprecated since K8s v 1.21 and is removed starting from v 1.25.
Note, with this change the Postgres Operator will not work for users on K8s 1.20 and lower.

closes #1999

@FxKu FxKu added this to the 1.9 milestone Aug 23, 2022
@FxKu
Copy link
Member Author

FxKu commented Oct 6, 2022

👍

1 similar comment
@idanovinda
Copy link
Member

👍

@FxKu FxKu merged commit 2aa5209 into master Oct 6, 2022
@FxKu FxKu deleted the pdb-v1 branch October 6, 2022 07:43
@Deepanshu6dec
Copy link

Deepanshu6dec commented Oct 18, 2022

@FxKu
I'm using helm charts to deploy Operator and getting similar issue in Kubernetes v1.25
Operator Logs

time="2022-10-17T13:36:00Z" level=debug msg="syncing pod disruption budgets" cluster-name=default/csmsc-cluster pkg=cluster worker=0
time="2022-10-17T13:36:00Z" level=info msg="could not find the cluster's pod disruption budget" cluster-name=default/csmsc-cluster pkg=cluster worker=0
time="2022-10-17T13:36:00Z" level=warning msg="error while syncing cluster state: could not sync pod disruption budget: could not create pod disruption budget: the server could not find the requested resource" cluster-name=default/csmsc-cluster pkg=cluster worker=0
time="2022-10-17T13:36:00Z" level=error msg="could not sync cluster: could not sync pod disruption budget: could not create pod disruption budget: the server could not find the requested resource" cluster-name=default/csmsc-cluster pkg=controller worker=0

What changes we have to do for fixing this issue, as Zalando is working fine for us in 1.24 version.

Image:
  registry: registry.opensource.zalan.do
  repository: acid/postgres-operator
  tag: v1.8.2
  pullPolicy: "IfNotPresent"

@FxKu
Copy link
Member Author

FxKu commented Oct 18, 2022

v1.25 support is not included in any release yet. You might use the latest image tag v1.8.2-26-gacb3ffd7

@Deepanshu6dec
Copy link

Deepanshu6dec commented Oct 18, 2022

@FxKu
With latest tag same issue

Events:
  Type     Reason     Age   From               Message
  ----     ------     ----  ----               -------
  Normal   Create     67s   postgres-operator  Started creation of new cluster resources
  Normal   Endpoints  67s   postgres-operator  Endpoint "default/csmsc-cluster" has been successfully created
  Normal   Services   67s   postgres-operator  The service "default/csmsc-cluster" for role master has been successfully created
  Normal   Services   67s   postgres-operator  The service "default/csmsc-cluster-repl" for role replica has been successfully created
  Normal   Secrets    66s   postgres-operator  The secrets have been successfully created
  Warning  Create     66s   postgres-operator  could not create cluster: could not create pod disruption budget: the server could not find the requested resource

If we do not upgrade Kubernetes to 1.25, Zalando will work fine. If we use 1.24, it will work. 

@Deepanshu6dec
Copy link

Deepanshu6dec commented Nov 1, 2022

@FxKu

I have degrade the kubernetes version from 1.25 to 1.24 and still getting the same issue -could not create pod disruption budget.

time="2022-11-01T07:01:55Z" level=info msg="syncing secrets" cluster-name=default/c-cluster pkg=cluster worker=0
time="2022-11-01T07:01:56Z" level=info msg="secrets have been successfully created" cluster-name=default/c-cluster pkg=cluster worker=0
time="2022-11-01T07:01:56Z" level=error msg="could not create cluster: could not create pod disruption budget: the server could not find the requested resource" cluster-name=default/c-cluster pkg=controller worker=0

Kubernetes version

k8smn    Ready      control-plane,master   39d   v1.24.0
k8swn1   Ready      worker                         39d   v1.24.0
k8swn2   Ready      worker                         39d   v1.24.0

Is this really issue with version specific or some different issues.

Postgresql logs

  Normal   Create     18s   postgres-operator  Started creation of new cluster resources
  Normal   Endpoints  18s   postgres-operator  Endpoint "default/c-cluster" has been successfully created
  Normal   Services   18s   postgres-operator  The service "default/c-cluster" for role master has been successfully created
  Normal   Services   18s   postgres-operator  The service "default/c-cluster-repl" for role replica has been successfully created
  Normal   Secrets    17s   postgres-operator  The secrets have been successfully created
  Warning  Create     17s   postgres-operator  could not create cluster: could not create pod disruption budget: the server could not find the requested resource

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

Successfully merging this pull request may close these issues.

Support for Kubernetes 1.25
3 participants