feat: create SecurityContext for k3s scheduler from docker-options
Closes #7664
This commit is contained in:
7 files changed
+199
-14
No files matched your search
@@ -102,6 +102,26 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey $.Values.global "security_context" }}
|
||||
securityContext:
|
||||
{{- if $.Values.global.security_context.privileged }}
|
||||
privileged: true
|
||||
{{- end }}
|
||||
{{- if hasKey $.Values.global.security_context "capabilities" }}
|
||||
capabilities:
|
||||
{{- if hasKey $.Values.global.security_context.capabilities "add" }}
|
||||
add:
|
||||
{{- range $.Values.global.security_context.capabilities.add }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey $.Values.global.security_context.capabilities "drop" }}
|
||||
drop:
|
||||
{{- range $.Values.global.security_context.capabilities.drop }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $.Values.global.image.working_dir }}
|
||||
workingDir: {{ $.Values.global.image.working_dir }}
|
||||
{{- end }}
|
||||
|
||||
@@ -117,6 +117,27 @@ spec:
|
||||
readinessProbe:
|
||||
{{ $config.healthchecks.readiness | toJson | indent 10 }}
|
||||
{{- end }}
|
||||
{{- if hasKey $.Values.global "security_context" }}
|
||||
securityContext:
|
||||
{{- if $.Values.global.security_context.privileged }}
|
||||
privileged: true
|
||||
{{- end }}
|
||||
{{- if hasKey $.Values.global.security_context "capabilities" }}
|
||||
capabilities:
|
||||
{{- if hasKey $.Values.global.security_context.capabilities "add" }}
|
||||
add:
|
||||
{{- range $.Values.global.security_context.capabilities.add }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey $.Values.global.security_context.capabilities "drop" }}
|
||||
drop:
|
||||
{{- range $.Values.global.security_context.capabilities.drop }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $.Values.global.image.working_dir }}
|
||||
workingDir: {{ $.Values.global.image.working_dir }}
|
||||
{{- end }}
|
||||
|
||||
Reference in new issue
Block a user