Add run As user in ix chart

This commit is contained in:
M. Rehan
2022-08-11 16:56:52 +05:00
parent 3432f36f77
commit f8a249c2d4
36 changed files with 52 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2207.2.0
version: 2208.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to

View File

@@ -600,6 +600,27 @@ questions:
label: "Add Capability"
schema:
type: string
- variable: enableRunAsUser
label: "Configure Container User and Group ID"
description: "Configure security context runAsUser and runAsGroup variables"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: runAsUser
label: "Run Container As User"
description: "Configure user id for container."
schema:
type: int
default: 568
- variable: runAsGroup
label: "Run Container As Group"
description: "Configure group id for container."
schema:
type: int
default: 568
- variable: enableResourceLimits
label: "Enable Pod resource limits"

View File

@@ -60,6 +60,10 @@ containers:
stdin: {{ .Values.stdin }}
securityContext:
privileged: {{ .Values.securityContext.privileged }}
{{ if .Values.securityContext.enableRunAsUser }}
runAsUser: {{ .Values.securityContext.runAsUser }}
runAsGroup: {{ .Values.securityContext.runAsGroup }}
{{ end }}
{{ if .Values.securityContext.capabilities }}
capabilities:
add: {{ toYaml .Values.securityContext.capabilities | nindent 8 }}

View File

@@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2207.2.0
version: 2208.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to

View File

@@ -600,6 +600,27 @@ questions:
label: "Add Capability"
schema:
type: string
- variable: enableRunAsUser
label: "Configure Container User and Group ID"
description: "Configure security context runAsUser and runAsGroup variables"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: runAsUser
label: "Run Container As User"
description: "Configure user id for container."
schema:
type: int
default: 568
- variable: runAsGroup
label: "Run Container As Group"
description: "Configure group id for container."
schema:
type: int
default: 568
- variable: enableResourceLimits
label: "Enable Pod resource limits"

View File

@@ -60,6 +60,10 @@ containers:
stdin: {{ .Values.stdin }}
securityContext:
privileged: {{ .Values.securityContext.privileged }}
{{ if .Values.securityContext.enableRunAsUser }}
runAsUser: {{ .Values.securityContext.runAsUser }}
runAsGroup: {{ .Values.securityContext.runAsGroup }}
{{ end }}
{{ if .Values.securityContext.capabilities }}
capabilities:
add: {{ toYaml .Values.securityContext.capabilities | nindent 8 }}