Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-1484

Remove policy/v1beta1 in 4.11 and later

XMLWordPrintable

    • Critical
    • None
    • Approved
    • False
    • Hide

      Should be backported to 4.11 to allow smooth upgrade to 4.12

      Show
      Should be backported to 4.11 to allow smooth upgrade to 4.12
    • Hide
      * The `v1beta1` version of the `PodDisruptionBudget` object is now deprecated in Kubernetes. With this release, internal references to `v1beta1` are replaced with `v1`. This change is internal to the cluster autoscaler and does not require user action beyond the advice in the link:https://access.redhat.com/articles/6955381[Preparing to upgrade to OpenShift Container Platform 4.12] Red Hat Knowledgebase Article.
      (link:https://issues.redhat.com/browse/OCPBUGS-1484[*OCPBUGS-1484*])
      Show
      * The `v1beta1` version of the `PodDisruptionBudget` object is now deprecated in Kubernetes. With this release, internal references to `v1beta1` are replaced with `v1`. This change is internal to the cluster autoscaler and does not require user action beyond the advice in the link: https://access.redhat.com/articles/6955381 [Preparing to upgrade to OpenShift Container Platform 4.12] Red Hat Knowledgebase Article. (link: https://issues.redhat.com/browse/OCPBUGS-1484 [* OCPBUGS-1484 *])
    • Deprecated Functionality

      OCPBUGS-1251 landed an admin-ack gate in 4.11.z to help admins prepare for Kubernetes 1.25 API removals which are coming in OpenShift 4.12. Poking around in a 4.12.0-ec.2 cluster where APIRemovedInNextReleaseInUse is firing:

      $ oc --as system:admin adm must-gather -- /usr/bin/gather_audit_logs
      $ zgrep -h v1beta1/poddisruptionbudget must-gather.local.1378724704026451055/quay*/audit_logs/kube-apiserver/*.log.gz | jq -r '.verb + " " + (.user | .username + " " + (.extra["authentication.kubernetes.io/pod-name"] | tostr
      ing))' | sort | uniq -c
      parse error: Invalid numeric literal at line 29, column 6
           28 watch system:serviceaccount:openshift-machine-api:cluster-autoscaler ["cluster-autoscaler-default-5cf997b8d6-ptgg7"]
      

      Finding the source for that container:

      $ oc --as system:admin -n openshift-machine-api get -o json pod cluster-autoscaler-default-5cf997b8d6-ptgg7 | jq -r '.status.containerStatuses[].image'
      quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f81ab7ce0c851ba5e5169bba717cb54716ce5457cbe89d159c97a5c25fd820ed
      $ oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f81ab7ce0c851ba5e5169bba717cb54716ce5457cbe89d159c97a5c25fd820ed | grep github
                   SOURCE_GIT_URL=https://github.com/openshift/kubernetes-autoscaler
                   io.openshift.build.commit.url=https://github.com/openshift/kubernetes-autoscaler/commit/1dac0311b9842958ec630273428b74703d51c1c9
                   io.openshift.build.source-location=https://github.com/openshift/kubernetes-autoscaler
      

      Poking about in the source:

      $ git clone --depth 30 --branch master https://github.com/openshift/kubernetes-autoscaler.git
      $ cd kubernetes-autoscaler
      $ find . -name vendor
      ./addon-resizer/vendor
      ./cluster-autoscaler/vendor
      ./vertical-pod-autoscaler/e2e/vendor
      ./vertical-pod-autoscaler/vendor
      

      Lots of vendoring. I haven't checked to see how new the client code is in the various vendor packages. But the main issue seems to be the v1beta1 in:

      $ git grep policy cluster-autoscaler/core cluster-autoscaler/utils | grep policy.*v1beta1
      cluster-autoscaler/core/scaledown/actuation/actuator_test.go:   policyv1beta1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/core/scaledown/actuation/actuator_test.go:                                   eviction := createAction.GetObject().(*policyv1beta1.Eviction)
      cluster-autoscaler/core/scaledown/actuation/drain.go:   policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/core/scaledown/actuation/drain_test.go:      policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/core/scaledown/legacy/legacy.go:     policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/core/scaledown/legacy/wrapper.go:    policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/core/scaledown/scaledown.go: policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/core/static_autoscaler_test.go:      policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/utils/drain/drain.go:        policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/utils/drain/drain_test.go:   policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/utils/kubernetes/listers.go: policyv1 "k8s.io/api/policy/v1beta1"
      cluster-autoscaler/utils/kubernetes/listers.go: v1policylister "k8s.io/client-go/listers/policy/v1beta1"
      

      The main change from v1beta1 to v1 involves spec.selector; I dunno if that's relevant to the autoscaler use-case or not.

      Do we run autoscaler CI? I was poking around a bit, but did not find a 4.12 periodic excercising the autoscaler that might have turned up this alert and issue.

            mimccune@redhat.com Michael McCune
            trking W. Trevor King
            Zhaohua Sun Zhaohua Sun
            Jeana Routh Jeana Routh
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: