Description of problem: ClusterAutoscaler is a singleton resource, only one should be allowed to create. If the resource name is not "default",there should be a prompt. Version-Release number of selected component (if applicable): $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.0.0-0.alpha-2019-01-09-005354 True False 3h Cluster version is 4.0.0-0.alpha-2019-01-09-005354 How reproducible: Always Steps to Reproduce: 1. Create a clusterautoscaler named "default" $ oc get clusterautoscaler default -o yaml apiVersion: "autoscaling.openshift.io/v1alpha1" kind: "ClusterAutoscaler" metadata: name: "default" spec: scaleDown: enabled: true delayAfterAdd: 10s delayAfterDelete: 10s delayAfterFailure: 10s 2. Create a clusterautoscaler named "default1" $ oc get clusterautoscaler default1 -o yaml apiVersion: "autoscaling.openshift.io/v1alpha1" kind: "ClusterAutoscaler" metadata: name: "default1" spec: scaleDown: enabled: true delayAfterAdd: 10s delayAfterDelete: 10s delayAfterFailure: 10s 3. $ oc logs -f cluster-autoscaler-operator-58d4c9cfc4-lzfzd I0109 05:32:21.329716 1 clusterautoscaler_controller.go:114] Reconciling ClusterAutoscaler default W0109 05:32:43.431104 1 clusterautoscaler_controller.go:167] Not processing ClusterAutoscaler default1 Actual results: Two clusterautoscalers were created, the resource named "default" triggered the deployment of autoscaler. Expected results: Only the clusterautoscaler resource named "default" could be created. Additional info:
This will require an admission webhook, which definitely isn't going to make it in before the 4.0 feature freeze. The operator will only actually deploy the autoscaler for the resource named "default" -- but yes, you can create additional ClusterAutoscaler resources at the moment unfortunately, they just have no effect. Not sure what the appropriate status for this bug is.
Verified clusterversion: 4.2.0-0.nightly-2019-07-25-053632 $ oc create -f clusterautoscaler.yml Error from server (Name "default1" is invalid, only "default" is allowed): error when creating "clusterautoscaler.yml": admission webhook "clusterautoscalers.autoscaling.openshift.io" denied the request: Name "default1" is invalid, only "default" is allowed
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