Skip to content

Commit a7e705e

Browse files
committed
add default podSecurityContext in helm/values.yaml
1 parent e74b161 commit a7e705e

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

deploy/manifests/oci-native-ingress-controller/templates/deployment.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,18 @@ spec:
4343
defaultMode: 420
4444
secretName: oci-native-ingress-controller-tls
4545
securityContext:
46-
{}
46+
runAsNonRoot: true
47+
runAsUser: 1000
48+
seccompProfile:
49+
type: RuntimeDefault
4750
containers:
4851
- name: oci-native-ingress-controller
4952
securityContext:
5053
allowPrivilegeEscalation: false
54+
capabilities:
55+
drop:
56+
- ALL
5157
readOnlyRootFilesystem: true
52-
runAsNonRoot: true
53-
runAsUser: 1000
5458
image: "ghcr.io/oracle/oci-native-ingress-controller:v1.3.9"
5559
imagePullPolicy: Always
5660
args:

deploy/manifests/oci-native-ingress-controller/templates/rbac.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ rules:
4141
- apiGroups: [""]
4242
resources: [pods/status]
4343
verbs: [patch]
44+
- apiGroups: [""]
45+
resources: [serviceaccounts]
46+
verbs: [list, watch]
4447
---
4548
# Source: oci-native-ingress-controller/templates/rbac.yaml
4649
apiVersion: rbac.authorization.k8s.io/v1

helm/oci-native-ingress-controller/values.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,18 @@ serviceAccount:
4545

4646
podAnnotations: {}
4747

48-
podSecurityContext: {}
49-
# fsGroup: 2000
48+
podSecurityContext:
49+
runAsNonRoot: true
50+
runAsUser: 1000
51+
seccompProfile:
52+
type: RuntimeDefault
5053

51-
securityContext:
54+
securityContext:
5255
readOnlyRootFilesystem: true
53-
runAsNonRoot: true
5456
allowPrivilegeEscalation: false
55-
runAsUser: 1000
57+
capabilities:
58+
drop:
59+
- ALL
5660

5761
rbac:
5862
create: true

0 commit comments

Comments
 (0)