Bug 1884601 - Drop kube-system role binding to extension-apiserver-authentication-reader (invalid to create role binding in kube-system by OLM)
Summary: Drop kube-system role binding to extension-apiserver-authentication-reader (i...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-scheduler
Version: 4.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.6.0
Assignee: Jan Chaloupka
QA Contact: RamaKasturi
Depends On:
TreeView+ depends on / blocked
Reported: 2020-10-02 12:14 UTC by Jan Chaloupka
Modified: 2020-10-27 16:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-10-27 16:47:41 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift cluster-kube-descheduler-operator pull 141 0 None closed bug 1884601: Drop kube-system role binding to extension-apiserver-authentication-reader 2021-02-07 08:29:13 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:48:11 UTC

Description Jan Chaloupka 2020-10-02 12:14:13 UTC
time="2020-09-29T22:22:56Z" level=error msg="Error: Value openshift-kube-descheduler-operator: error validating object: metadata.namespace: Forbidden: not allowed on this type. &{map[apiVersion:rbac.authorization.k8s.io/v1 kind:RoleBinding metadata:map[name:openshift-kube-descheduler-operator namespace:kube-system] roleRef:map[apiGroup:rbac.authorization.k8s.io kind:Role name:extension-apiserver-authentication-reader] subjects:[map[kind:ServiceAccount name:openshift-descheduler namespace:openshift-kube-descheduler-operator]]]}"

Your rolebinding is invalid because it specifies the "kube-system" namespace.  OLM cannot create your rolebinding there, it is going to create it in your operator's namespace.  That's probably what was already happening in 4.5, and probably what you want, but with the new linting you need to actually define it properly.

Comment 3 RamaKasturi 2020-10-08 16:27:20 UTC
Verified with csv below and i see that descheduler works fine.

[knarra@knarra verification-tests]$ oc get csv -n openshift-kube-descheduler-operator
NAME                                                   DISPLAY                     VERSION                 REPLACES   PHASE
clusterkubedescheduleroperator.4.6.0-202010061132.p0   Kube Descheduler Operator   4.6.0-202010061132.p0              Succeeded

[knarra@knarra verification-tests]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-10-08-043318   True        False         3h5m    Cluster version is 4.6.0-0.nightly-2020-10-08-043318

Below are the steps followed to verify the bug:
1) Install latest descheduler operator
2) Add strategies like RemovePodswithTooManyRestarts and see that pods are evicted.
3) Add strategies removeDuplicates with exclude ownerkinds as ReplicaSet and see that pods does not get evicted which has the owner as ReplicaSet
4) changed excludeOwnerkinds to DeploymentConfig and i see that pods get evicted as the owner is Replicaset

In addition to the above did not see any errors in the link below

http://external-ci-coldstorage.datahub.redhat.com/cvp/cvp-redhat-operator-bundle-image-validation-test/ose-cluster-kube-descheduler-operator-metadata-container-v4.6.0.202010061132.p0-9/f6a485c2-fab2-4813-baf6-af5ca908b4ca/operator-metadata-linting-bundle-image-output.txt -> All validations completed successfuly.

http://external-ci-coldstorage.datahub.redhat.com/cvp/cvp-redhat-operator-bundle-image-validation-test/ose-cluster-kube-descheduler-operator-metadata-container-v4.6.0.202010061132.p0-9/f6a485c2-fab2-4813-baf6-af5ca908b4ca/cvp-test-report.html -> shows success

Based on the above moving the bug to verified state.

Comment 5 errata-xmlrpc 2020-10-27 16:47:41 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 (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

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


Note You need to log in before you can comment on or make changes to this bug.