Skip to content

Commit

Permalink
Add seccompProfile to Helm chart (nginx#2323)
Browse files Browse the repository at this point in the history
Problem: Not specifying the seccompProfile gives warnings in certain
enviroments

Solution: Set the seccompProfile
  • Loading branch information
lucacome authored Aug 1, 2024
1 parent 01c46ae commit edb9add
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/nginx-gateway-fabric/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ spec:
periodSeconds: 1
{{- end }}
securityContext:
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: {{ .Values.nginxGateway.securityContext.allowPrivilegeEscalation }}
capabilities:
add:
Expand Down Expand Up @@ -151,6 +153,8 @@ spec:
- containerPort: 443
name: https
securityContext:
seccompProfile:
type: RuntimeDefault
capabilities:
add:
- NET_BIND_SERVICE
Expand Down
2 changes: 2 additions & 0 deletions charts/nginx-gateway-fabric/templates/scc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ supplementalGroups:
max: 1001
seLinuxContext:
type: MustRunAs
seccompProfiles:
- runtime/default
volumes:
- emptyDir
- secret
Expand Down
4 changes: 4 additions & 0 deletions config/tests/static-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ spec:
initialDelaySeconds: 3
periodSeconds: 1
securityContext:
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
capabilities:
add:
Expand Down Expand Up @@ -87,6 +89,8 @@ spec:
- containerPort: 443
name: https
securityContext:
seccompProfile:
type: RuntimeDefault
capabilities:
add:
- NET_BIND_SERVICE
Expand Down
4 changes: 4 additions & 0 deletions deploy/manifests/nginx-gateway-experimental.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ spec:
initialDelaySeconds: 3
periodSeconds: 1
securityContext:
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
capabilities:
add:
Expand Down Expand Up @@ -243,6 +245,8 @@ spec:
- containerPort: 443
name: https
securityContext:
seccompProfile:
type: RuntimeDefault
capabilities:
add:
- NET_BIND_SERVICE
Expand Down
4 changes: 4 additions & 0 deletions deploy/manifests/nginx-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ spec:
initialDelaySeconds: 3
periodSeconds: 1
securityContext:
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
capabilities:
add:
Expand Down Expand Up @@ -239,6 +241,8 @@ spec:
- containerPort: 443
name: https
securityContext:
seccompProfile:
type: RuntimeDefault
capabilities:
add:
- NET_BIND_SERVICE
Expand Down
4 changes: 4 additions & 0 deletions deploy/manifests/nginx-plus-gateway-experimental.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ spec:
initialDelaySeconds: 3
periodSeconds: 1
securityContext:
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
capabilities:
add:
Expand Down Expand Up @@ -250,6 +252,8 @@ spec:
- containerPort: 443
name: https
securityContext:
seccompProfile:
type: RuntimeDefault
capabilities:
add:
- NET_BIND_SERVICE
Expand Down
4 changes: 4 additions & 0 deletions deploy/manifests/nginx-plus-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ spec:
initialDelaySeconds: 3
periodSeconds: 1
securityContext:
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
capabilities:
add:
Expand Down Expand Up @@ -246,6 +248,8 @@ spec:
- containerPort: 443
name: https
securityContext:
seccompProfile:
type: RuntimeDefault
capabilities:
add:
- NET_BIND_SERVICE
Expand Down
2 changes: 2 additions & 0 deletions deploy/manifests/scc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ supplementalGroups:
max: 1001
seLinuxContext:
type: MustRunAs
seccompProfiles:
- runtime/default
volumes:
- emptyDir
- secret
Expand Down

0 comments on commit edb9add

Please sign in to comment.