Bug 1961081

Summary: policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget in CMO logs
Product: OpenShift Container Platform Reporter: Damien Grisonnet <dgrisonn>
Component: MonitoringAssignee: Filip Petkovski <fpetkovs>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: low    
Version: 4.8CC: alegrand, anpicker, aos-bugs, erooth, janantha, kakkoyun, lcosic, pkrupa, spasquie
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:08:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
cluster-monitoring-operator pod logs
none
apirequestcount which use poddisruptionbudgets.v1beta1.policy none

Description Damien Grisonnet 2021-05-17 07:55:21 UTC
Description of problem:

In cluster-monitoring-operator logs, we can see warnings about the PodDisruptionBudget API group being deprecated.

```
W0517 07:46:55.596278       1 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
```

The PodDisruptionBudget manifests need to be updated to use `policy/v1` instead of the deprecated `policy/v1beta1`.

Version-Release number of selected component (if applicable):
4.8

How reproducible:
always

Steps to Reproduce:
1. launch a 4.8 cluster
2. inspect CMO's logs

Comment 6 Junqi Zhao 2021-05-27 01:20:02 UTC
fix is in 4.8.0-0.nightly-2021-05-26-172234, issue is not fixed, I think we should also fix in CMO
# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-05-26-172234   True        False         43m     Cluster version is 4.8.0-0.nightly-2021-05-26-172234

# oc -n openshift-monitoring logs $(oc -n openshift-monitoring get po | grep cluster-monitoring-operator | awk '{print $1}') -c cluster-monitoring-operator | grep "policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1" | head -n 3
W0526 23:48:40.734867       1 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0526 23:50:20.801679       1 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0526 23:55:39.439655       1 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget

# oc -n openshift-monitoring logs $(oc -n openshift-monitoring get po | grep cluster-monitoring-operator | awk '{print $1}') -c cluster-monitoring-operator | grep "policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1" | wc -l
149

# oc api-resources | grep PodDisruptionBudget
poddisruptionbudgets                  pdb              policy/v1                                     true         PodDisruptionBudget

Comment 7 Junqi Zhao 2021-05-27 01:20:35 UTC
Created attachment 1787406 [details]
cluster-monitoring-operator pod logs

Comment 8 Junqi Zhao 2021-05-27 01:21:34 UTC
Created attachment 1787407 [details]
apirequestcount which use poddisruptionbudgets.v1beta1.policy

Comment 9 Filip Petkovski 2021-05-27 08:20:17 UTC
Thanks for the thorough review Junqi. I made further changes and ran the checks you provided in your previous comment. I did not notice any more warnings related to PDBs with the new change.

Comment 11 Junqi Zhao 2021-05-31 02:04:30 UTC
no warnings about the PodDisruptionBudget API group being deprecated now
# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-05-29-114625   True        False         129m    Cluster version is 4.8.0-0.nightly-2021-05-29-114625

# oc -n openshift-monitoring logs $(oc -n openshift-monitoring get po | grep cluster-monitoring-operator | awk '{print $1}') -c cluster-monitoring-operator | grep -i deprecated
no result

Comment 14 errata-xmlrpc 2021-07-27 23:08:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438