-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chart: Tighten
securityContext
s and Pod Security Policies.
- Loading branch information
Showing
14 changed files
with
316 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 29 additions & 18 deletions
47
helm/ingress-nginx/templates/admission-webhooks/job-patch/psp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,52 @@ | ||
{{- if (semverCompare "<1.25.0-0" .Capabilities.KubeVersion.Version) }} | ||
{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled .Values.podSecurityPolicy.enabled (empty .Values.controller.admissionWebhooks.existingPsp) -}} | ||
{{- if and .Values.podSecurityPolicy.enabled .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled (empty .Values.controller.admissionWebhooks.existingPsp) -}} | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: {{ include "ingress-nginx.fullname" . }}-admission | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
seccomp.security.alpha.kubernetes.io/allowedProfileNames: "*" | ||
labels: | ||
{{- include "ingress-nginx.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: admission-webhook | ||
{{- with .Values.controller.admissionWebhooks.patch.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
allowPrivilegeEscalation: false | ||
privileged: false | ||
hostPID: false | ||
hostIPC: false | ||
hostNetwork: false | ||
volumes: | ||
- configMap | ||
- downwardAPI | ||
- emptyDir | ||
- secret | ||
- projected | ||
fsGroup: | ||
ranges: | ||
- max: 65535 | ||
min: 1 | ||
rule: MustRunAs | ||
requiredDropCapabilities: | ||
- ALL | ||
ranges: | ||
- min: 1 | ||
max: 65535 | ||
readOnlyRootFilesystem: true | ||
runAsUser: | ||
rule: MustRunAsNonRoot | ||
seLinux: | ||
rule: RunAsAny | ||
supplementalGroups: | ||
runAsGroup: | ||
rule: MustRunAs | ||
ranges: | ||
- max: 65535 | ||
min: 1 | ||
- min: 1 | ||
max: 65535 | ||
supplementalGroups: | ||
rule: MustRunAs | ||
volumes: | ||
- configMap | ||
- emptyDir | ||
- projected | ||
- secret | ||
- downwardAPI | ||
ranges: | ||
- min: 1 | ||
max: 65535 | ||
allowPrivilegeEscalation: false | ||
requiredDropCapabilities: | ||
- ALL | ||
seLinux: | ||
rule: RunAsAny | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.