mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-02-22 04:22:14 +00:00
Update all TCs in etcd.yaml
This commit is contained in:
parent
b7b566d634
commit
f8d3aae808
@ -16,11 +16,11 @@ groups:
|
|||||||
# Get the pod name in the openshift-etcd namespace
|
# Get the pod name in the openshift-etcd namespace
|
||||||
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
||||||
if [ -z "$POD_NAME" ]; then
|
if [ -z "$POD_NAME" ]; then
|
||||||
echo "No matching file found on the current node."
|
echo "No matching file found on the current node."
|
||||||
else
|
else
|
||||||
# Execute the stat command
|
# Execute the stat command
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--cert-file=[^ ]*\).*/\1/'
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--cert-file=[^ ]*\).*/\1/'
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--key-file=[^ ]*\).*/\1/'
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--key-file=[^ ]*\).*/\1/'
|
||||||
fi
|
fi
|
||||||
use_multiple_values: true
|
use_multiple_values: true
|
||||||
tests:
|
tests:
|
||||||
@ -42,10 +42,10 @@ groups:
|
|||||||
# Get the pod name in the openshift-etcd namespace
|
# Get the pod name in the openshift-etcd namespace
|
||||||
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
||||||
if [ -z "$POD_NAME" ]; then
|
if [ -z "$POD_NAME" ]; then
|
||||||
echo "No matching file found on the current node."
|
echo "No matching file found on the current node."
|
||||||
else
|
else
|
||||||
# Execute the stat command
|
# Execute the stat command
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--client-cert-auth=[^ ]*\).*/\1/'
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--client-cert-auth=[^ ]*\).*/\1/'
|
||||||
fi
|
fi
|
||||||
use_multiple_values: true
|
use_multiple_values: true
|
||||||
tests:
|
tests:
|
||||||
@ -67,10 +67,10 @@ groups:
|
|||||||
# Get the pod name in the openshift-etcd namespace
|
# Get the pod name in the openshift-etcd namespace
|
||||||
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
||||||
if [ -z "$POD_NAME" ]; then
|
if [ -z "$POD_NAME" ]; then
|
||||||
echo "No matching file found on the current node."
|
echo "No matching file found on the current node."
|
||||||
else
|
else
|
||||||
# Execute the stat command
|
# Execute the stat command
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | grep -- --auto-tls=true 2>/dev/null ; echo exit_code=$?
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | grep -- --auto-tls=true 2>/dev/null ; echo exit_code=$?
|
||||||
fi
|
fi
|
||||||
use_multiple_values: true
|
use_multiple_values: true
|
||||||
tests:
|
tests:
|
||||||
@ -91,11 +91,11 @@ groups:
|
|||||||
# Get the pod name in the openshift-etcd namespace
|
# Get the pod name in the openshift-etcd namespace
|
||||||
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
||||||
if [ -z "$POD_NAME" ]; then
|
if [ -z "$POD_NAME" ]; then
|
||||||
echo "No matching file found on the current node."
|
echo "No matching file found on the current node."
|
||||||
else
|
else
|
||||||
# Execute the stat command
|
# Execute the stat command
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--peer-cert-file=[^ ]*\).*/\1/'
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--peer-cert-file=[^ ]*\).*/\1/'
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--peer-key-file=[^ ]*\).*/\1/'
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--peer-key-file=[^ ]*\).*/\1/'
|
||||||
fi
|
fi
|
||||||
use_multiple_values: true
|
use_multiple_values: true
|
||||||
tests:
|
tests:
|
||||||
@ -116,10 +116,10 @@ groups:
|
|||||||
# Get the pod name in the openshift-etcd namespace
|
# Get the pod name in the openshift-etcd namespace
|
||||||
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
||||||
if [ -z "$POD_NAME" ]; then
|
if [ -z "$POD_NAME" ]; then
|
||||||
echo "No matching file found on the current node."
|
echo "No matching file found on the current node."
|
||||||
else
|
else
|
||||||
# Execute the stat command
|
# Execute the stat command
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--peer-client-cert-auth=[^ ]*\).*/\1/'
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--peer-client-cert-auth=[^ ]*\).*/\1/'
|
||||||
fi
|
fi
|
||||||
use_multiple_values: true
|
use_multiple_values: true
|
||||||
tests:
|
tests:
|
||||||
@ -141,10 +141,10 @@ groups:
|
|||||||
# Get the pod name in the openshift-etcd namespace
|
# Get the pod name in the openshift-etcd namespace
|
||||||
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
||||||
if [ -z "$POD_NAME" ]; then
|
if [ -z "$POD_NAME" ]; then
|
||||||
echo "No matching file found on the current node."
|
echo "No matching file found on the current node."
|
||||||
else
|
else
|
||||||
# Execute the stat command
|
# Execute the stat command
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | grep -- --peer-auto-tls=true 2>/dev/null ; echo exit_code=$?
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | grep -- --peer-auto-tls=true 2>/dev/null ; echo exit_code=$?
|
||||||
fi
|
fi
|
||||||
use_multiple_values: true
|
use_multiple_values: true
|
||||||
tests:
|
tests:
|
||||||
@ -165,11 +165,11 @@ groups:
|
|||||||
# Get the pod name in the openshift-etcd namespace
|
# Get the pod name in the openshift-etcd namespace
|
||||||
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
POD_NAME=$(oc get pods -n openshift-etcd -l app=etcd --field-selector spec.nodeName="$NODE_NAME" -o jsonpath='{.items[0].metadata.name}' 2>/dev/null)
|
||||||
if [ -z "$POD_NAME" ]; then
|
if [ -z "$POD_NAME" ]; then
|
||||||
echo "No matching file found on the current node."
|
echo "No matching file found on the current node."
|
||||||
else
|
else
|
||||||
# Execute the stat command
|
# Execute the stat command
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--trusted-ca-file=[^ ]*\).*/\1/'
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--trusted-ca-file=[^ ]*\).*/\1/'
|
||||||
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--peer-trusted-ca-file=[^ ]*\).*/\1/'
|
oc exec -n openshift-etcd -c etcd "$POD_NAME" -- ps -o command= -C etcd | sed 's/.*\(--peer-trusted-ca-file=[^ ]*\).*/\1/'
|
||||||
fi
|
fi
|
||||||
use_multiple_values: true
|
use_multiple_values: true
|
||||||
tests:
|
tests:
|
||||||
|
Loading…
Reference in New Issue
Block a user