Skip to content

Commit bf17ecc

Browse files
fix: Add health probes to rbac-escalation-operator deployment
Add startup, liveness, and readiness probes to rbac-escalation-operator deployment so the pod can report ready status and the ClusterExtension can reach Available condition. Without probes, the deployment never reports ready, causing the test to timeout waiting for 'ClusterExtension is available'. Fixes: rbac-escalation.feature test availability check
1 parent 39e8526 commit bf17ecc

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

test/e2e/features/rbac-escalation.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Feature: RBAC Permissions for Extension Installation
3232
matchLabels:
3333
"olm.operatorframework.io/metadata.name": test-catalog
3434
"""
35-
Then ClusterExtension is available
35+
Then ClusterExtension is rolled out
36+
And ClusterExtension is available
3637
And bundle "rbac-escalation-operator.1.0.0" is installed in version "1.0.0"
3738

testdata/images/bundles/rbac-escalation-operator/v1.0.0/manifests/rbac-escalation-operator.clusterserviceversion.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,26 @@ spec:
2727
containers:
2828
- name: manager
2929
image: busybox:1.37
30-
command: ["/bin/sh", "-c", "sleep 3600"]
30+
command: ["/bin/sh"]
31+
args: ["-c", "mkdir -p /tmp && (while true; do echo 'OK' | nc -l -p 8080; done)"]
32+
ports:
33+
- containerPort: 8080
34+
protocol: TCP
35+
startupProbe:
36+
tcpSocket:
37+
port: 8080
38+
failureThreshold: 30
39+
periodSeconds: 1
40+
livenessProbe:
41+
tcpSocket:
42+
port: 8080
43+
failureThreshold: 1
44+
periodSeconds: 2
45+
readinessProbe:
46+
tcpSocket:
47+
port: 8080
48+
initialDelaySeconds: 1
49+
periodSeconds: 1
3150
serviceAccountName: rbac-escalation-sa
3251
# These permissions differ from test-operator's requirements to validate
3352
# that the installer SA can handle operators with diverse RBAC needs

0 commit comments

Comments
 (0)