Skip to content

Commit 3ce7c88

Browse files
yhwangTomcli
authored andcommitted
fix(backend): Add securitycontext for k8s 1.25 (kubeflow#1132)
For k8s 1.25, a securityContext definition is needed for a pod. Add proper security context to pipelineloop controler and webhook Signed-off-by: Yihong Wang <[email protected]> Signed-off-by: Yihong Wang <[email protected]>
1 parent 08da8cc commit 3ce7c88

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

manifests/kustomize/third-party/tekton-custom-task/pipeline-loops/500-controller.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,13 @@ spec:
5454
value: config-observability
5555
- name: METRICS_DOMAIN
5656
value: tekton.dev/pipeline
57+
securityContext:
58+
allowPrivilegeEscalation: false
59+
capabilities:
60+
drop:
61+
- ALL
62+
runAsGroup: 65532
63+
runAsNonRoot: true
64+
runAsUser: 65532
65+
seccompProfile:
66+
type: RuntimeDefault

manifests/kustomize/third-party/tekton-custom-task/pipeline-loops/500-webhook.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ spec:
6464
containerPort: 8008
6565
- name: https-webhook
6666
containerPort: 8443
67+
securityContext:
68+
allowPrivilegeEscalation: false
69+
capabilities:
70+
drop:
71+
- ALL
72+
runAsGroup: 65532
73+
runAsNonRoot: true
74+
runAsUser: 65532
75+
seccompProfile:
76+
type: RuntimeDefault
6777
---
6878
apiVersion: v1
6979
kind: Service

0 commit comments

Comments
 (0)