mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 11:44:38 +00:00
tests: k8s-policy-pod: use prometheus container
Change quay.io/prometheus/busybox to quay.io/prometheus/prometheus in this test. The prometheus image will be helpful for testing the future fix for #9928 because it specifies user = "nobody". Also, change: sh -c "ls -l /" to: echo -n "readinessProbe with space characters" as the test readinessProbe command line. Both include a command line argument containing space characters, but "sh -c" behaves differently when using the prometheus container image (causes the readinessProbe to time out, etc.). Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
parent
614328f342
commit
71ede4ea3f
@ -216,7 +216,7 @@ test_pod_policy_error() {
|
|||||||
|
|
||||||
# Execute commands allowed by the policy.
|
# Execute commands allowed by the policy.
|
||||||
pod_exec_allowed_command "${pod_name}" "echo" "livenessProbe" "test"
|
pod_exec_allowed_command "${pod_name}" "echo" "livenessProbe" "test"
|
||||||
pod_exec_allowed_command "${pod_name}" "sh" "-c" "ls -l /"
|
pod_exec_allowed_command "${pod_name}" "echo" "-n" "readinessProbe with space characters"
|
||||||
pod_exec_allowed_command "${pod_name}" "echo" "startupProbe" "test"
|
pod_exec_allowed_command "${pod_name}" "echo" "startupProbe" "test"
|
||||||
|
|
||||||
# Try to execute commands disallowed by the policy.
|
# Try to execute commands disallowed by the policy.
|
||||||
|
@ -11,8 +11,10 @@ spec:
|
|||||||
terminationGracePeriodSeconds: 0
|
terminationGracePeriodSeconds: 0
|
||||||
runtimeClassName: kata
|
runtimeClassName: kata
|
||||||
containers:
|
containers:
|
||||||
- name: busybox
|
- name: prometheus
|
||||||
image: quay.io/prometheus/busybox:latest
|
image: quay.io/prometheus/prometheus:latest
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
env:
|
env:
|
||||||
- name: KUBE_CONFIG_1
|
- name: KUBE_CONFIG_1
|
||||||
valueFrom:
|
valueFrom:
|
||||||
@ -40,9 +42,9 @@ spec:
|
|||||||
readinessProbe:
|
readinessProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
- "sh"
|
- "echo"
|
||||||
- "-c"
|
- "-n"
|
||||||
- "ls -l /"
|
- "readinessProbe with space characters"
|
||||||
startupProbe:
|
startupProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
|
Loading…
Reference in New Issue
Block a user