-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.17.0
-
None
-
Workloads Sprint 258
-
1
-
False
-
Description of problem:
Scheduler Plugins changes the entrypoint
❯ oc logs pod/secondary-scheduler-545b79fb79-4w5hj Error: "kube-scheduler" does not take any arguments, got ["/bin/kube-scheduler"]
Version-Release number of selected component (if applicable):
1.3.0
How reproducible:
each time with registry.k8s.io/scheduler-plugins/kube-scheduler:v0.29.7
Steps to Reproduce:
1. Navigate to Operator Hub 2. Find `Secondary Scheduler Operator for Red Hat OpenShift` `1.3.0`. 3. Install into the `openshift-secondary-scheduler-operato` namespace. `oc adm new-project openshift-secondary-scheduler-operator` 4. When the Operator is installed, create a configmap ``` apiVersion: v1 kind: ConfigMap metadata: name: "secondary-scheduler-config" namespace: "openshift-secondary-scheduler-operator" data: "config.yaml": | apiVersion: kubescheduler.config.k8s.io/v1 kind: KubeSchedulerConfiguration leaderElection: leaderElect: false profiles: - schedulerName: secondary-scheduler plugins: score: disabled: - name: NodeResourcesBalancedAllocation - name: NodeResourcesLeastAllocated ``` 5. Create a SecondaryScheduler ``` kind: SecondaryScheduler apiVersion: operator.openshift.io/v1 metadata: name: cluster namespace: openshift-secondary-scheduler-operator spec: managementState: Managed schedulerConfig: secondary-scheduler-config schedulerImage: registry.k8s.io/scheduler-plugins/kube-scheduler:v0.29.7 ``` 6. You are going to see the pods enter an error state: ``` ❯ oc get pods NAME READY STATUS RESTARTS AGE secondary-scheduler-545b79fb79-4w5hj 0/1 Error 0 5s secondary-scheduler-7df94788d4-9n8gz 0/1 Error 0 5s secondary-scheduler-operator-7474bf64b7-pbmkq 1/1 Running 0 8s ``` 7. The logs show the following: ``` ❯ oc logs pod/secondary-scheduler-545b79fb79-4w5hj Error: "kube-scheduler" does not take any arguments, got ["/bin/kube-scheduler"] ``` To fix this, you have to remove the line from .spec.template.spec.containers.args `- /bin/kube-scheduler`
Actual results:
secondary-scheduler-7d6d4d78d5-vfplt 0/1 CrashLoopBackOff
Expected results:
secondary-scheduler-7b9d855bbd-nfc8k 1/1 Running
Additional info:
The SIG switched to using DISTROLESS images and also switched in https://github.com/kubernetes-sigs/scheduler-plugins/blob/d67d2c15199595ccc6218574bd8e07b68b7146f4/build/scheduler/Dockerfile#L29
- links to
- mentioned on