You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OCPBUGS-17216: Update rotate certificates check for OCP 4.14
By default, the rotate certificates rules for CIS 1.4.0 (section 4.2)
fail on OpenShift 4.14.
This commit updates the rule to check for the proper configuration so
that it passes by default, since certificate rotation is enabled by
default. This patch also updates the instructions to use a valid command
for users looking to verify the configuration manually. The old command
didn't return anything because it was looking in the wrong configuration
section.
Copy file name to clipboardExpand all lines: applications/openshift/kubelet/kubelet_enable_server_cert_rotation/rule.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ ocil_clause: 'the kubelet cannot rotate server certificate'
33
33
34
34
ocil: |-
35
35
Run the following command on the kubelet node(s):
36
-
<pre>$ for NODE_NAME in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$NODE_NAME/proxy/configz | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' | grep RotateKubeletServerCertificate; done</pre>
36
+
<pre>$ for node in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$node/proxy/configz | jq '.kubeletconfig.rotateCertificates' done</pre>
Copy file name to clipboardExpand all lines: applications/openshift/kubelet/kubelet_enable_server_cert_rotation_master/rule.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ ocil_clause: 'the kubelet cannot rotate server certificate'
33
33
34
34
ocil: |-
35
35
Run the following command on the kubelet node(s):
36
-
<pre>$ for NODE_NAME in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$NODE_NAME/proxy/configz | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' | grep RotateKubeletServerCertificate; done</pre>
36
+
<pre>$ for node in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$node/proxy/configz | jq '.kubeletconfig.rotateCertificates' done</pre>
Copy file name to clipboardExpand all lines: applications/openshift/kubelet/kubelet_enable_server_cert_rotation_worker/rule.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ ocil_clause: 'the kubelet cannot rotate server certificate'
33
33
34
34
ocil: |-
35
35
Run the following command on the kubelet node(s):
36
-
<pre>$ for NODE_NAME in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$NODE_NAME/proxy/configz | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' | grep RotateKubeletServerCertificate; done</pre>
36
+
<pre>$ for node in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$node/proxy/configz | jq '.kubeletconfig.rotateCertificates' done</pre>
0 commit comments