Skip to content

Commit 2b8b056

Browse files
Merge pull request #567 from tmshort/use-httpd
OPRUN-4300: Use busybox/httpd to simulate probes
2 parents 888c7e9 + 4b226c8 commit 2b8b056

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

openshift/tests-extension/test/olmv1.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
//nolint:staticcheck // ST1001: dot-imports for readability
1010
. "github.com/onsi/gomega"
1111

12-
"github.com/openshift/origin/test/extended/util/image"
1312
corev1 "k8s.io/api/core/v1"
1413
apiextclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
1514
"k8s.io/apimachinery/pkg/api/meta"
@@ -134,7 +133,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 operator installation
134133

135134
// Using the shell image provided by origin as the controller image.
136135
// The image is mirrored into disconnected environments for testing.
137-
"{{ TEST-CONTROLLER }}": image.ShellImage(),
136+
"{{ TEST-CONTROLLER }}": "registry.k8s.io/e2e-test-images/busybox:1.36.1-1",
138137
}
139138
unique, nsName, ccName, opName = helpers.NewCatalogAndClusterBundles(ctx, replacements,
140139
catalogdata.AssetNames, catalogdata.Asset,

openshift/tests-extension/testdata/operator/manifests/registry.clusterserviceversion.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,21 @@ spec:
5252
labels:
5353
control-plane: controller-manager
5454
spec:
55+
volumes:
56+
- name: scripts
57+
configMap:
58+
name: httpd-script
59+
defaultMode: 0755
5560
containers:
5661
- args:
57-
command:
58-
- sleep
59-
- "1000"
62+
command: ["/scripts/httpd.sh"]
6063
image: "{{ TEST-CONTROLLER }}"
64+
ports:
65+
- containerPort: 8081
66+
volumeMounts:
67+
- name: scripts
68+
mountPath: /scripts
69+
readOnly: true
6170
livenessProbe:
6271
httpGet:
6372
path: /healthz
@@ -83,6 +92,12 @@ spec:
8392
capabilities:
8493
drop:
8594
- ALL
95+
startupProbe:
96+
httpGet:
97+
path: /started
98+
port: 8081
99+
failureThreshold: 30
100+
periodSeconds: 10
86101
securityContext:
87102
runAsNonRoot: true
88103
serviceAccountName: default
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: httpd-script
5+
data:
6+
httpd.sh: |
7+
#!/bin/sh
8+
echo "Version 1.2.0"
9+
echo true > /var/www/started
10+
echo true > /var/www/ready
11+
echo true > /var/www/live
12+
exec httpd -f -h /var/www -p 8081

0 commit comments

Comments
 (0)