Description of problem: When trying to create pdb via oc create i still see that request, post & resposne body has policy/v1beta1 instead of policy/v1 [knarra@knarra openshift-client-linux-4.8.0-0.nightly-2021-04-13-171608]$ ./oc create poddisruptionbudget my-pdb --selector=deploymentconfig=hello --min-available=11 --loglevel=9 I0414 16:28:47.130829 43568 loader.go:372] Config loaded from file: /home/knarra/Downloads/kubeconfig_48 I0414 16:28:47.131551 43568 request.go:1123] Request Body: {"kind":"PodDisruptionBudget","apiVersion":"policy/v1beta1","metadata":{"name":"my-pdb","creationTimestamp":null},"spec":{"minAvailable":11,"selector":{"matchLabels":{"deploymentconfig":"hello"}}},"status":{"disruptionsAllowed":0,"currentHealthy":0,"desiredHealthy":0,"expectedPods":0}} I0414 16:28:47.131595 43568 round_trippers.go:435] curl -k -v -XPOST -H "Accept: application/json, */*" -H "Content-Type: application/json" -H "User-Agent: oc/4.8.0 (linux/amd64) kubernetes/783a74f" -H "Authorization: Bearer <masked>" 'https://api.knarra0414.qe.devcluster.openshift.com:6443/apis/policy/v1beta1/namespaces/knara/poddisruptionbudgets?fieldManager=kubectl-create' I0414 16:28:48.466403 43568 round_trippers.go:454] POST https://api.knarra0414.qe.devcluster.openshift.com:6443/apis/policy/v1beta1/namespaces/knara/poddisruptionbudgets?fieldManager=kubectl-create 201 Created in 1334 milliseconds I0414 16:28:48.466425 43568 round_trippers.go:460] Response Headers: I0414 16:28:48.466431 43568 round_trippers.go:463] Warning: 299 - "policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget" I0414 16:28:48.466434 43568 round_trippers.go:463] X-Kubernetes-Pf-Flowschema-Uid: 5f2c4147-a9e5-455d-9e61-3ae093809956 I0414 16:28:48.466442 43568 round_trippers.go:463] X-Kubernetes-Pf-Prioritylevel-Uid: 571186e9-c789-4d3c-ad17-655b7133b48a I0414 16:28:48.466445 43568 round_trippers.go:463] Content-Length: 623 I0414 16:28:48.466450 43568 round_trippers.go:463] Date: Wed, 14 Apr 2021 10:58:48 GMT I0414 16:28:48.466452 43568 round_trippers.go:463] Audit-Id: f40770de-1d45-4dfb-960d-e09f59d7752b I0414 16:28:48.466468 43568 round_trippers.go:463] Cache-Control: no-cache, private I0414 16:28:48.466470 43568 round_trippers.go:463] Content-Type: application/json I0414 16:28:48.466507 43568 request.go:1123] Response Body: {"kind":"PodDisruptionBudget","apiVersion":"policy/v1beta1","metadata":{"name":"my-pdb","namespace":"knara","uid":"e123b0c3-7404-4ae3-b10e-5080fd18a6e4","resourceVersion":"90185","generation":1,"creationTimestamp":"2021-04-14T10:58:48Z","managedFields":[{"manager":"kubectl-create","operation":"Update","apiVersion":"policy/v1beta1","time":"2021-04-14T10:58:48Z","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{"f:minAvailable":{},"f:selector":{}}}}]},"spec":{"minAvailable":11,"selector":{"matchLabels":{"deploymentconfig":"hello"}}},"status":{"disruptionsAllowed":0,"currentHealthy":0,"desiredHealthy":0,"expectedPods":0}} W0414 16:28:48.466529 43568 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget poddisruptionbudget.policy/my-pdb created Version-Release number of selected component (if applicable): [knarra@knarra openshift-client-linux-4.8.0-0.nightly-2021-04-13-171608]$ ./oc version -o yaml clientVersion: buildDate: "2021-04-13T12:34:44Z" compiler: gc gitCommit: 783a74fd112c8f8bd12a7d6e7696d0eb49f09fe5 gitTreeState: clean gitVersion: 4.8.0-202104131208.p0-783a74f goVersion: go1.16.1 major: "" minor: "" platform: linux/amd64 openshiftVersion: 4.8.0-0.nightly-2021-04-13-171608 releaseClientVersion: 4.8.0-0.nightly-2021-04-13-171608 serverVersion: buildDate: "2021-04-12T22:28:57Z" compiler: gc gitCommit: e22a836a8b265968caa56b0fd30aa92a2594af9c gitTreeState: clean gitVersion: v1.21.0-rc.0+e22a836 goVersion: go1.16.1 major: "1" minor: 21+ platform: linux/amd64 How reproducible: always Steps to Reproduce: 1. Run the command "oc create pdb <pdbname> --selector=deploymentconfig=hello --min-available=11 --loglevel=9 2. 3. Actual results: Request, Post & Response body still have policy/v1beta1 instead of policy/v1 Expected results: Request, Post & Response body should have policy/v1 instead of policy/v1beta1 Additional info: oc get pdb request works fine and do not see any issues with that.
We'll get that in the next version of OCP when bringing in https://github.com/kubernetes/kubernetes/pull/101613
This bug hasn't had any activity in the last 30 days. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're marking this bug as "LifecycleStale" and decreasing the severity/priority. If you have further information on the current state of the bug, please update it, otherwise this bug can be closed in about 7 days. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. Additionally, you can add LifecycleFrozen into Keywords if you think this bug should never be marked as stale. Please consult with bug assignee before you do that.
k8s bump landed in https://github.com/openshift/oc/pull/890
the issue has fixed : [root@localhost ~]# oc create poddisruptionbudget my-pdb --selector=deploymentconfig=hello --min-available=11 --loglevel=9 I0819 18:47:19.992011 68318 loader.go:372] Config loaded from file: /root/kubeconfig I0819 18:47:19.993415 68318 request.go:1181] Request Body: {"kind":"PodDisruptionBudget","apiVersion":"policy/v1","metadata":{"name":"my-pdb","creationTimestamp":null},"spec":{"minAvailable":11,"selector":{"matchLabels":{"deploymentconfig":"hello"}}},"status":{"disruptionsAllowed":0,"currentHealthy":0,"desiredHealthy":0,"expectedPods":0}} I0819 18:47:19.993505 68318 round_trippers.go:435] curl -v -XPOST -H "Accept: application/json, */*" -H "Content-Type: application/json" -H "User-Agent: oc/4.9.0 (linux/amd64) kubernetes/ddd7170" 'https://api.yinzhou819.qe.devcluster.openshift.com:6443/apis/policy/v1/namespaces/testzy/poddisruptionbudgets?fieldManager=kubectl-create' I0819 18:47:20.795781 68318 round_trippers.go:454] POST https://api.yinzhou819.qe.devcluster.openshift.com:6443/apis/policy/v1/namespaces/testzy/poddisruptionbudgets?fieldManager=kubectl-create 201 Created in 802 milliseconds I0819 18:47:20.795804 68318 round_trippers.go:460] Response Headers: I0819 18:47:20.795815 68318 round_trippers.go:463] Content-Length: 615 I0819 18:47:20.795823 68318 round_trippers.go:463] Date: Thu, 19 Aug 2021 10:48:03 GMT I0819 18:47:20.795830 68318 round_trippers.go:463] Audit-Id: fbf54447-a112-4ae6-9b4e-49686477e33a I0819 18:47:20.795836 68318 round_trippers.go:463] Cache-Control: no-cache, private I0819 18:47:20.795843 68318 round_trippers.go:463] Content-Type: application/json I0819 18:47:20.795849 68318 round_trippers.go:463] X-Kubernetes-Pf-Flowschema-Uid: 5daa77c6-58fd-4e75-a645-982da607da38 I0819 18:47:20.795856 68318 round_trippers.go:463] X-Kubernetes-Pf-Prioritylevel-Uid: 34c2559c-6182-4e73-b865-cdb8a5a11c75 I0819 18:47:20.795884 68318 request.go:1181] Response Body: {"kind":"PodDisruptionBudget","apiVersion":"policy/v1","metadata":{"name":"my-pdb","namespace":"testzy","uid":"f46e4f65-38fa-402c-8689-79740d062936","resourceVersion":"236433","generation":1,"creationTimestamp":"2021-08-19T10:48:03Z","managedFields":[{"manager":"kubectl-create","operation":"Update","apiVersion":"policy/v1","time":"2021-08-19T10:48:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{"f:minAvailable":{},"f:selector":{}}}}]},"spec":{"minAvailable":11,"selector":{"matchLabels":{"deploymentconfig":"hello"}}},"status":{"disruptionsAllowed":0,"currentHealthy":0,"desiredHealthy":0,"expectedPods":0}} poddisruptionbudget.policy/my-pdb created [root@localhost ~]# oc version Client Version: 4.9.0-202108181430.p0.git.ddd7170.assembly.stream-ddd7170 Server Version: 4.9.0-0.nightly-2021-08-18-144658 Kubernetes Version: v1.22.0-rc.0+f967870
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.9.0 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:3759