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

policy/v1beta1 PodDisruptionBudget Deprecated in v1.21+, unavailable in v1.25+ #4570

Closed
darkhonor opened this issue Apr 27, 2021 · 7 comments

Comments

@darkhonor
Copy link

When applying the Calico manifest on a native Kubernetes cluster running v1.21.0, the following warning is shown:

Warning: policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget

The PodDisruptionBudget is created as expected for the time being. This is a new warning as of v1.21 and is not displayed on earlier releases of Kubernetes.

Expected Behavior

The poddisruptionbudget.policy/calico-kube-controllers should be created without a warning. Ideal would be if you could check Kubernetes version before declaring the Policy.

Current Behavior

On versions earlier than 1.21.0, no warning is generated. Versions 1.21+ will generate a warning. Versions 1.25+ will fail to create the object.

Possible Solution

Update Installation documentation to have users using version 1.21+ edit calico.yaml line 3850 prior to applying the configuration. They need to change:

apiVersion: policy/v1beta1

to:

apiVersion: policy/v1

Steps to Reproduce (for bugs)

N/A. The system is working as expected given the prevalence of Kubernetes deployments earlier than 1.21.

Context

This will become an issue as more users upgrade to Kubernetes 1.21 and beyond. It will need to be corrected once 1.25 is released.

Your Environment

  • Calico version: 3.17.4
  • Orchestrator version (e.g. kubernetes, mesos, rkt): Kubernetes 1.21.0
  • Operating System and version: Ubuntu 20.04
  • Link to your project (optional): N/A
@caseydavenport
Copy link
Member

@darkhonor yep, we'll definitely need to update those manfiests.

It will still work fine to use the v1beta1 API for now. We'll want to switch the default in a release or so in order to make sure we're compatible with +/- a Kubernetes release.

@vzuevsky
Copy link

vzuevsky commented Nov 3, 2021

Any news on this yet?

@pacoxu
Copy link

pacoxu commented Nov 4, 2021

See #4926

We probably want to merge this PR when v1.23 comes out, since then we'll support v1.21, v1.22, and v1.23.

@Alceatraz
Copy link

Hello, And I'm super new of k8s. I follow the k8s install guide, And I choose calico as network implements, I see this warning

Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+

This make me little bit anxiety. Then I check my version, I'm using:

So I found this issue, Can I use this current version calico guide safely?

@caseydavenport
Copy link
Member

@Alceatraz you can use the guide safely - we'll update to remove the PSP objects from Calico in v3.23, at which point the warning will go away.

@caseydavenport
Copy link
Member

Update here - PodDisruptionBudgets have been updated to v1 for the upcoming v3.23 release. PodSecurityPolicy removal is still in progress.

@caseydavenport
Copy link
Member

Made a new issue to track PSPs, PDB will be done in v3.23

openstack-mirroring pushed a commit to openstack/magnum that referenced this issue May 10, 2023
PodDisruptionBudget is `policy/v1` since 1.21.

projectcalico/calico#4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue May 10, 2023
* Update magnum from branch 'master'
  to 034c1e5491edc5d5d6698469f4e1e93670ca45c6
  - Merge "Support k8s 1.25 in Calico Manifest"
  - Support k8s 1.25 in Calico Manifest
    
    PodDisruptionBudget is `policy/v1` since 1.21.
    
    projectcalico/calico#4570
    
    Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
nectar-gerrit pushed a commit to NeCTAR-RC/magnum that referenced this issue May 31, 2023
PodDisruptionBudget is `policy/v1` since 1.21.

projectcalico/calico#4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
(cherry picked from commit 5abcab4)
mheler pushed a commit to mheler/magnum that referenced this issue Aug 28, 2023
PodDisruptionBudget is `policy/v1` since 1.21.

projectcalico/calico#4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
mnasiadka pushed a commit to stackhpc/magnum that referenced this issue Dec 18, 2023
PodDisruptionBudget is `policy/v1` since 1.21.

projectcalico/calico#4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
mheler pushed a commit to mheler/magnum that referenced this issue Feb 17, 2024
PodDisruptionBudget is `policy/v1` since 1.21.

projectcalico/calico#4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
mnasiadka pushed a commit to stackhpc/magnum that referenced this issue Mar 28, 2024
PodDisruptionBudget is `policy/v1` since 1.21.

projectcalico/calico#4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
(cherry picked from commit 5abcab4)
mnasiadka pushed a commit to stackhpc/magnum that referenced this issue Mar 28, 2024
PodDisruptionBudget is `policy/v1` since 1.21.

projectcalico/calico#4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
(cherry picked from commit 5abcab4)
nectar-gerrit pushed a commit to NeCTAR-RC/magnum that referenced this issue Jun 11, 2024
PodDisruptionBudget is `policy/v1` since 1.21.

projectcalico/calico#4570

Change-Id: I07786095a30ae15fe856fd3966fc073267d2ae9d
(cherry picked from commit 5abcab4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants