Description of problem: The IngressController custom resource definition (CRD) specifies an incorrect label selector path in the scale subresource. As a consequence, clients will see an empty value for the label selector on the scale subresource. Version-Release number of selected component (if applicable): 4.1 and 4.2. How reproducible: 100%. Steps to Reproduce: Run the following command while logged in to a v4 cluster: oc get --raw /apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default/scale | jq . Alternatively, run the attached Go program, which uses the scale client from client-go to get the default ingresscontroller's scale resource and prints the label selector. Actual results: % go run scale-test.go scale status.selector: "" % oc get --raw /apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default/scale | jq . { "kind": "Scale", "apiVersion": "autoscaling/v1", "metadata": { "name": "default", "namespace": "openshift-ingress-operator", "selfLink": "/apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default/scale", "uid": "15c66196-d016-11e9-b1af-42010a000004", "resourceVersion": "35527", "creationTimestamp": "2019-09-05T19:48:08Z" }, "spec": { "replicas": 2 }, "status": { "replicas": 2 } } % Expected results: % go run scale-test.go scale status.selector: "ingresscontroller.operator.openshift.io/deployment-ingresscontroller=default" % oc get --raw /apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default/scale | jq . { "kind": "Scale", "apiVersion": "autoscaling/v1", "metadata": { "name": "default", "namespace": "openshift-ingress-operator", "selfLink": "/apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default/scale", "uid": "15c66196-d016-11e9-b1af-42010a000004", "resourceVersion": "35527", "creationTimestamp": "2019-09-05T19:48:08Z" }, "spec": { "replicas": 2 }, "status": { "replicas": 2, "selector": "ingresscontroller.operator.openshift.io/deployment-ingresscontroller=default" } } % Additional info: The label selector path will need to be fixed for the horizontal pod autoscaler (HPA). I am not aware of anything else that the incorrect path could break.
Created attachment 1612093 [details] Go program that uses client-go to get the default ingresscontroller's scale subresource and prints the label selector path
verified with 4.2.0-0.nightly-2019-09-15-052022 and issue has been fixed. $ oc get --raw /apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default/scale | jq . { "kind": "Scale", "apiVersion": "autoscaling/v1", "metadata": { "name": "default", "namespace": "openshift-ingress-operator", "selfLink": "/apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default/scale", "uid": "80d8539f-d81d-11e9-ab02-000d3a979766", "resourceVersion": "13689", "creationTimestamp": "2019-09-16T01:01:23Z" }, "spec": { "replicas": 2 }, "status": { "replicas": 2, "selector": "ingresscontroller.operator.openshift.io/deployment-ingresscontroller=default" } }
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, 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/RHBA-2019:2922