Skip to content

Commit

Permalink
Fix test instrumentation-apache-httpd to work on OpenShift. (#2310)
Browse files Browse the repository at this point in the history
  • Loading branch information
IshwarKanse authored Nov 16, 2023
1 parent ff4ffa6 commit b353f36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ spec:
receivers: [otlp]
processors: []
exporters: [debug]
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
# Annotate the namespace to allow the application to run using an specific group and user in OpenShift
# https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html
# This annotation has no effect in Kubernetes
- command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite
- command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
fsGroup: 3000
containers:
- name: myapp
image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-apache-httpd:main
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
ports:
- containerPort: 8080
resources:
Expand Down

0 comments on commit b353f36

Please sign in to comment.