Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/test/nginx-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.volumes.hostPath.enabled }}
volumes:
- name: {{ .Values.volumes.hostPath.name }}
Expand All @@ -35,6 +40,11 @@ spec:
{{- end }}
securityContext:
privileged: {{ .Values.securityContext.privileged }}
allowPrivilegeEscalation: {{ .Values.securityContext.allowPrivilegeEscalation }}
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
runAsUser: {{ .Values.securityContext.runAsUser }}
seccompProfile:
type: {{ .Values.securityContext.seccompProfile.type }}
{{- if .Values.securityContext.capabilities }}
capabilities:
{{- toYaml .Values.securityContext.capabilities | nindent 12 }}
Expand Down
29 changes: 22 additions & 7 deletions apps/test/nginx-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,40 @@ service:

# Security context settings
securityContext:
privileged: true
privileged: false
capabilities:
add:
- SYS_ADMIN
drop:
- ALL
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault

# Container port configuration
containerPort: 81
hostPort: 81
hostPort: 0

# Volume configuration
volumes:
hostPath:
enabled: true
enabled: false
path: /etc
name: host-vol

# Pod annotations
podAnnotations:
container.apparmor.security.beta.kubernetes.io/nginx-chart: unconfined
podAnnotations: {}

# Pod-level security context
podSecurityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault

# Service account configuration
serviceAccount:
automountServiceAccountToken: false

# Resource limits and requests
resources: {}
Expand Down