@@ -2,6 +2,8 @@ documentation_complete: true
22
33title : Verify that Control Plane Nodes are not schedulable for workloads
44
5+ {{% set jqfilter = '[ .items[] | select(.spec.taints[]?.key == "node-role.kubernetes.io/master" and .spec.taints[]?.effect == "NoSchedule") | .metadata.name ]' %}}
6+
57description : -|
68 <p>
79 User workloads should not be colocated with control plane workloads. To ensure that the scheduler won't
@@ -25,22 +27,22 @@ rationale: -|
2527 In some setups it might be necessary to make the control plane schedulable for workloads i.e.
2628 Single Node Openshift (SNO) or Compact Cluster (Three Node Cluster) setups.
2729
28- {{% set jqfilter = '.items[] | select(.metadata.labels."node-role.kubernetes.io/master" == "" or .metadata.labels."node-role.kubernetes.io/control-plane" == "" ) | .spec.taints[] | select(.key == "node-role.kubernetes.io/master" and .effect == "NoSchedule")' %}}
29-
3030identifiers :
3131 cce@ocp4 : CCE-88731-5
3232
3333severity : medium
3434
35+ platform : not ocp4-on-hypershift-hosted
36+
3537ocil_clause : ' Control Plane is schedulable'
3638
3739ocil : |-
3840 Run the following command to see if control planes are schedulable
39- <pre>$oc get --raw /api/v1/nodes | jq '.items[] | select(.metadata.labels."node-role.kubernetes.io/master" == "" or .metadata.labels."node-role.kubernetes.io/control-plane" == "" ) | . spec.taints[] | select( .key == "node-role.kubernetes.io/master" and .effect == "NoSchedule" ) '</pre>
40- for each master node, there should be an output of a key with the NoSchedule effect .
41+ <pre>$oc get --raw /api/v1/nodes | jq '[ .items[] | select(.spec.taints[]? .key == "node-role.kubernetes.io/master" and .spec.taints[]?. effect == "NoSchedule") | .metadata.name ] '</pre>
42+ for each non-schedulable master node, there should be the name in the output .
4143
42- By editing the cluster scheduler you can centrally configure the masters as schedulable or not
43- by setting .spec.mastersSchedulable to true .
44+ By editing the cluster scheduler you can centrally configure the masters as not schedulable
45+ by setting .spec.mastersSchedulable to false .
4446 Use <pre>$oc edit schedulers.config.openshift.io cluster</pre> to configure the scheduling.
4547
4648warnings :
@@ -53,9 +55,9 @@ template:
5355 ocp_data : " true"
5456 filepath : |-
5557 {{{ openshift_filtered_path('/api/v1/nodes', jqfilter) }}}
56- yamlpath : " .effect "
58+ yamlpath : " [:] "
5759 check_existence : " at_least_one_exists"
5860 entity_check : " at least one"
5961 values :
60- - value : " NoSchedule "
62+ - value : " (.*?) "
6163 operation : " pattern match"
0 commit comments