Some updates

This commit is contained in:
2024-05-13 17:20:21 +02:00
parent 4b5a4e493b
commit ac6751d3da
16 changed files with 424 additions and 0 deletions

View File

@ -0,0 +1,34 @@
{{- define "lib.securityContext" -}}
{{- if not .Values.workload.securityContext -}}
# ---------------------------------------------------------------------
# Using the default security context, if it doesn't work for you,
# please update `.Values.workload.securityContext`
# ---------------------------------------------------------------------
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
seccompProfile:
type: RuntimeDefault
{{- else -}}
{{- with .Values.workload.securityContext -}}
securityContext:
{{ toYaml . | indent 2 }}
{{- end }}
{{- end -}}
{{- end -}}
{{- define "lib.containerSecurityContext" -}}
securityContext:
{{- if not .securityContext }}
runAsUser: 2000
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
{{- else }}
{{- with .securityContext }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- end -}}
{{- end -}}