more changes

This commit is contained in:
Stavros kois
2023-01-28 20:46:48 +02:00
parent 105d648ad4
commit 667da2ee40
38 changed files with 1658 additions and 930 deletions
+15 -11
View File
@@ -10,14 +10,18 @@ service:
protocol: HTTP
port: 8080
args:
- --port
- "8080"
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
controllers:
main:
pod:
containers:
main:
args:
- --port
- "8080"
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
+15 -11
View File
@@ -9,18 +9,22 @@ service:
main:
protocol: HTTP
port: 8080
controllers:
main:
pod:
containers:
main:
args:
- --port
- "8080"
args:
- --port
- "8080"
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
k1: value1
k2: 80
+16 -17
View File
@@ -3,13 +3,6 @@ image:
pullPolicy: IfNotPresent
tag: latest
controller:
# -- Enable the controller.
enabled: true
# -- Set the controller type.
# Valid options are: Deployment | DaemonSet | StatefulSet
type: DaemonSet
service:
main:
ports:
@@ -17,14 +10,20 @@ service:
protocol: HTTP
port: 8080
args:
- --port
- "8080"
controllers:
main:
type: DaemonSet
pod:
containers:
main:
args:
- --port
- "8080"
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
+15 -10
View File
@@ -9,17 +9,22 @@ service:
main:
port: 8080
args:
- --port
- '8080'
controllers:
main:
pod:
containers:
main:
args:
- --port
- '8080'
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
persistence:
pvc-stock:
+15 -10
View File
@@ -9,17 +9,22 @@ service:
main:
port: 8080
args:
- --port
- '8080'
controllers:
main:
pod:
containers:
main:
args:
- --port
- '8080'
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
rbac:
main:
+15 -10
View File
@@ -10,17 +10,22 @@ service:
protocol: HTTP
port: 8080
args:
- --port
- "8080"
controllers:
main:
pod:
containers:
main:
args:
- --port
- "8080"
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
k1: value1
k2: 80
+17 -19
View File
@@ -3,15 +3,6 @@ image:
pullPolicy: IfNotPresent
tag: latest
controller:
# -- Enable the controller.
enabled: true
# -- Set the controller type.
# Valid options are: Deployment | DaemonSet | StatefulSet
type: StatefulSet
# -- Number of desired pods
replicas: 2
volumeClaimTemplates:
test:
mountPath: /test
@@ -25,14 +16,21 @@ service:
protocol: HTTP
port: 8080
args:
- --port
- "8080"
controllers:
main:
type: StatefulSet
replicas: 2
pod:
containers:
main:
args:
- --port
- "8080"
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
@@ -13,7 +13,12 @@ tests:
- it: should pass with command set single value
documentIndex: *deploymentDoc
set:
command: entrypoint.sh
controllers:
main:
pod:
containers:
main:
command: entrypoint.sh
asserts:
- equal:
path: spec.template.spec.containers[0].command
@@ -24,7 +29,12 @@ tests:
documentIndex: *deploymentDoc
set:
cmd: entrypoint.sh
command: "{{ .Values.cmd }}"
controllers:
main:
pod:
containers:
main:
command: "{{ .Values.cmd }}"
asserts:
- equal:
path: spec.template.spec.containers[0].command
@@ -34,9 +44,14 @@ tests:
- it: should pass with command set
documentIndex: *deploymentDoc
set:
command:
- /bin/bash
- test
controllers:
main:
pod:
containers:
main:
command:
- /bin/bash
- test
asserts:
- equal:
path: spec.template.spec.containers[0].command
@@ -47,12 +62,17 @@ tests:
- it: should pass with command block set
documentIndex: *deploymentDoc
set:
command:
- /bin/bash
- -c
- |
echo "works!"
exit
controllers:
main:
pod:
containers:
main:
command:
- /bin/bash
- -c
- |
echo "works!"
exit
asserts:
- equal:
path: spec.template.spec.containers[0].command
@@ -67,9 +87,14 @@ tests:
documentIndex: *deploymentDoc
set:
some_key: some_value
command:
- /bin/bash
- "{{ .Values.some_key }}"
controllers:
main:
pod:
containers:
main:
command:
- /bin/bash
- "{{ .Values.some_key }}"
asserts:
- equal:
path: spec.template.spec.containers[0].command
@@ -80,7 +105,12 @@ tests:
- it: should pass with args set with single value
documentIndex: *deploymentDoc
set:
args: --worker
controllers:
main:
pod:
containers:
main:
args: --worker
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -91,7 +121,12 @@ tests:
documentIndex: *deploymentDoc
set:
some_arg: --worker
args: "{{ .Values.some_arg }}"
controllers:
main:
pod:
containers:
main:
args: "{{ .Values.some_arg }}"
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -101,9 +136,14 @@ tests:
- it: should pass with args set
documentIndex: *deploymentDoc
set:
args:
- --port
- 8000
controllers:
main:
pod:
containers:
main:
args:
- --port
- 8000
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -115,9 +155,14 @@ tests:
documentIndex: *deploymentDoc
set:
some_port: 9000
args:
- --port
- "{{ .Values.some_port }}"
controllers:
main:
pod:
containers:
main:
args:
- --port
- "{{ .Values.some_port }}"
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -128,7 +173,12 @@ tests:
- it: should pass with extraArgs set single value
documentIndex: *deploymentDoc
set:
extraArgs: --worker
controllers:
main:
pod:
containers:
main:
extraArgs: --worker
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -139,7 +189,12 @@ tests:
documentIndex: *deploymentDoc
set:
some_extra_arg: --worker
extraArgs: "{{ .Values.some_extra_arg }}"
controllers:
main:
pod:
containers:
main:
extraArgs: "{{ .Values.some_extra_arg }}"
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -149,9 +204,14 @@ tests:
- it: should pass with extraArgs set
documentIndex: *deploymentDoc
set:
extraArgs:
- --port
- 8000
controllers:
main:
pod:
containers:
main:
extraArgs:
- --port
- 8000
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -163,9 +223,14 @@ tests:
documentIndex: *deploymentDoc
set:
some_port: 9000
extraArgs:
- --port
- "{{ .Values.some_port }}"
controllers:
main:
pod:
containers:
main:
extraArgs:
- --port
- "{{ .Values.some_port }}"
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -176,12 +241,17 @@ tests:
- it: should pass with args and extraArgs set
documentIndex: *deploymentDoc
set:
args:
- --port
- 8000
extraArgs:
- --photos
- /photos
controllers:
main:
pod:
containers:
main:
args:
- --port
- 8000
extraArgs:
- --photos
- /photos
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -196,12 +266,17 @@ tests:
set:
some_port: 9000
some_path: /photos
args:
- --port
- "{{ .Values.some_port }}"
extraArgs:
- --photos
- "{{ .Values.some_path }}"
controllers:
main:
pod:
containers:
main:
args:
- --port
- "{{ .Values.some_port }}"
extraArgs:
- --photos
- "{{ .Values.some_path }}"
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -214,8 +289,13 @@ tests:
- it: should pass with args and extraArgs set - single values
documentIndex: *deploymentDoc
set:
args: --path
extraArgs: /photos
controllers:
main:
pod:
containers:
main:
args: --path
extraArgs: /photos
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -228,8 +308,13 @@ tests:
set:
some_arg: --path
some_path: /photos
args: "{{ .Values.some_arg }}"
extraArgs: "{{ .Values.some_path }}"
controllers:
main:
pod:
containers:
main:
args: "{{ .Values.some_arg }}"
extraArgs: "{{ .Values.some_path }}"
asserts:
- equal:
path: spec.template.spec.containers[0].args
@@ -12,45 +12,70 @@ tests:
- it: should fail with envFrom configMapRef has empty name
set:
envFrom:
- configMapRef:
name: ""
controllers:
main:
pod:
containers:
main:
envFrom:
- configMapRef:
name: ""
asserts:
- failedTemplate:
errorMessage: Name is required for configMapRef in envFrom.
- it: should fail with envFrom secretRef has empty name
set:
envFrom:
- secretRef:
name: ""
controllers:
main:
pod:
containers:
main:
envFrom:
- secretRef:
name: ""
asserts:
- failedTemplate:
errorMessage: Name is required for secretRef in envFrom.
- it: should fail with envFrom secretRef has missing name
set:
envFrom:
- secretRef:
controllers:
main:
pod:
containers:
main:
envFrom:
- secretRef:
asserts:
- failedTemplate:
errorMessage: Not valid Ref or <name> key is missing in envFrom.
- it: should fail with envFrom configMapRef has missing name
set:
envFrom:
- configMapRef:
controllers:
main:
pod:
containers:
main:
envFrom:
- configMapRef:
asserts:
- failedTemplate:
errorMessage: Not valid Ref or <name> key is missing in envFrom.
- it: should fail with envFrom configMapRef and secretRef on the same item
set:
envFrom:
- configMapRef:
name: something
secretRef:
name: something
controllers:
main:
pod:
containers:
main:
envFrom:
- configMapRef:
name: something
secretRef:
name: something
asserts:
- failedTemplate:
errorMessage: You can't define both secretRef and configMapRef on the same item.
@@ -58,9 +83,14 @@ tests:
- it: should pass with envFrom configMapRef entry added
documentIndex: *deploymentDoc
set:
envFrom:
- configMapRef:
name: some_name
controllers:
main:
pod:
containers:
main:
envFrom:
- configMapRef:
name: some_name
asserts:
- equal:
path: spec.template.spec.containers[0].envFrom
@@ -73,11 +103,16 @@ tests:
set:
some_name: a_name
some_name2: a_name2
envFrom:
- configMapRef:
name: "{{ .Values.some_name }}"
- configMapRef:
name: "{{ .Values.some_name2 }}"
controllers:
main:
pod:
containers:
main:
envFrom:
- configMapRef:
name: "{{ .Values.some_name }}"
- configMapRef:
name: "{{ .Values.some_name2 }}"
asserts:
- equal:
path: spec.template.spec.containers[0].envFrom
@@ -90,9 +125,14 @@ tests:
- it: should pass with envFrom secretRef entry added
documentIndex: *deploymentDoc
set:
envFrom:
- secretRef:
name: some_name
controllers:
main:
pod:
containers:
main:
envFrom:
- secretRef:
name: some_name
asserts:
- equal:
path: spec.template.spec.containers[0].envFrom
@@ -105,11 +145,16 @@ tests:
set:
some_name: a_name
some_name2: a_name2
envFrom:
- secretRef:
name: "{{ .Values.some_name }}"
- secretRef:
name: "{{ .Values.some_name2 }}"
controllers:
main:
pod:
containers:
main:
envFrom:
- secretRef:
name: "{{ .Values.some_name }}"
- secretRef:
name: "{{ .Values.some_name2 }}"
asserts:
- equal:
path: spec.template.spec.containers[0].envFrom
@@ -124,11 +169,16 @@ tests:
set:
some_name: a_name
some_name2: a_name2
envFrom:
- secretRef:
name: "{{ .Values.some_name }}"
- configMapRef:
name: "{{ .Values.some_name2 }}"
controllers:
main:
pod:
containers:
main:
envFrom:
- secretRef:
name: "{{ .Values.some_name }}"
- configMapRef:
name: "{{ .Values.some_name2 }}"
asserts:
- equal:
path: spec.template.spec.containers[0].envFrom
@@ -12,56 +12,86 @@ tests:
- it: should fail with envList missing name
set:
envList:
- value: some_value
controllers:
main:
pod:
containers:
main:
envList:
- value: some_value
asserts:
- failedTemplate:
errorMessage: Please specify both name and value for environment variable
- it: should fail with envList missing value
set:
envList:
- name: some_name
controllers:
main:
pod:
containers:
main:
envList:
- name: some_name
asserts:
- failedTemplate:
errorMessage: Please specify both name and value for environment variable
- it: should fail with envList name as a map
set:
envList:
- name:
some_key: some_value
value: some_value
controllers:
main:
pod:
containers:
main:
envList:
- name:
some_key: some_value
value: some_value
asserts:
- failedTemplate:
errorMessage: Name in envList cannot be a map or slice
- it: should fail with envList name as a slice
set:
envList:
- name:
- some_key: some_value
value: some_value
controllers:
main:
pod:
containers:
main:
envList:
- name:
- some_key: some_value
value: some_value
asserts:
- failedTemplate:
errorMessage: Name in envList cannot be a map or slice
- it: should fail with envList value as a map
set:
envList:
- name: some_name
value:
some_key: some_value
controllers:
main:
pod:
containers:
main:
envList:
- name: some_name
value:
some_key: some_value
asserts:
- failedTemplate:
errorMessage: Value in envList cannot be a map or slice
- it: should fail with envList value as a slice
set:
envList:
- name: some_name
value:
- some_key: some_value
controllers:
main:
pod:
containers:
main:
envList:
- name: some_name
value:
- some_key: some_value
asserts:
- failedTemplate:
errorMessage: Value in envList cannot be a map or slice
@@ -69,9 +99,14 @@ tests:
- it: should pass with envList entry added
documentIndex: *deploymentDoc
set:
envList:
- name: some_name
value: some_value
controllers:
main:
pod:
containers:
main:
envList:
- name: some_name
value: some_value
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -92,11 +127,16 @@ tests:
- it: should pass with envList entries added
documentIndex: *deploymentDoc
set:
envList:
- name: some_name
value: some_value
- name: some_name2
value: some_value2
controllers:
main:
pod:
containers:
main:
envList:
- name: some_name
value: some_value
- name: some_name2
value: some_value2
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -121,9 +161,14 @@ tests:
set:
some_name: a_name
some_value: a_value
envList:
- name: "{{ .Values.some_name }}"
value: "{{ .Values.some_value }}"
controllers:
main:
pod:
containers:
main:
envList:
- name: "{{ .Values.some_name }}"
value: "{{ .Values.some_value }}"
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -148,11 +193,16 @@ tests:
some_value: a_value
some_name2: a_name2
some_value2: a_value2
envList:
- name: "{{ .Values.some_name }}"
value: "{{ .Values.some_value }}"
- name: "{{ .Values.some_name2 }}"
value: "{{ .Values.some_value2 }}"
controllers:
main:
pod:
containers:
main:
envList:
- name: "{{ .Values.some_name }}"
value: "{{ .Values.some_value }}"
- name: "{{ .Values.some_name2 }}"
value: "{{ .Values.some_value2 }}"
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -12,206 +12,291 @@ tests:
- it: should fail with envs defined as a list
set:
env:
- name: some_name
value: some_value
controllers:
main:
pod:
containers:
main:
env:
- name: some_name
value: some_value
asserts:
- failedTemplate:
errorMessage: Environment Variables as a list is not supported. Use key-value format.
- it: should fail with envs defined with an invalid keyRef
set:
env:
ENVVAR:
invalidKeyRef:
name: blabla
key: blbla
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
invalidKeyRef:
name: blabla
key: blbla
asserts:
- failedTemplate:
errorMessage: Not a valid valueFrom reference. Valid options are (configMapKeyRef and secretKeyRef)
- it: should fail with envs defined without a name in configMapKeyRef
set:
env:
ENVVAR:
configMapKeyRef:
key: some_key
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
configMapKeyRef:
key: some_key
asserts:
- failedTemplate:
errorMessage: <name> for the keyRef is not defined in (ENVVAR)
- it: should fail with envs defined without a name in secretKeyRef
set:
env:
ENVVAR:
secretKeyRef:
key: some_key
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
secretKeyRef:
key: some_key
asserts:
- failedTemplate:
errorMessage: <name> for the keyRef is not defined in (ENVVAR)
- it: should fail with envs defined without a key in configMapKeyRef
set:
env:
ENVVAR:
configMapKeyRef:
name: some_name
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
configMapKeyRef:
name: some_name
asserts:
- failedTemplate:
errorMessage: <key> for the keyRef is not defined in (ENVVAR)
- it: should fail with envs defined without a key in secretKeyRef
set:
env:
ENVVAR:
secretKeyRef:
name: some_name
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
secretKeyRef:
name: some_name
asserts:
- failedTemplate:
errorMessage: <key> for the keyRef is not defined in (ENVVAR)
- it: should fail with envs defined with a non-bool <optional> in secretKeyRef
set:
env:
ENVVAR:
secretKeyRef:
name: some_name
key: some_key
optional: non-bool
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
secretKeyRef:
name: some_name
key: some_key
optional: non-bool
asserts:
- failedTemplate:
errorMessage: <optional> in secretKeyRef must be a boolean on Environment Variable (ENVVAR)
- it: should fail with envs defined with valueFrom key
set:
env:
ENVVAR:
valueFrom:
secretKeyRef:
name: some_name
key: some_key
optional: non-bool
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
valueFrom:
secretKeyRef:
name: some_name
key: some_key
optional: non-bool
asserts:
- failedTemplate:
errorMessage: Please remove <valueFrom> and use directly configMapKeyRef or secretKeyRef
- it: should fail with envs defined with optional in configMapKeyRef
set:
env:
ENVVAR:
configMapKeyRef:
name: some_name
key: some_key
optional: non-bool
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
configMapKeyRef:
name: some_name
key: some_key
optional: non-bool
asserts:
- failedTemplate:
errorMessage: <optional> is not supported in configMapRefKey
- it: should fail with env trying to override fixedEnv
set:
env:
TZ: something
controllers:
main:
pod:
containers:
main:
env:
TZ: something
asserts:
- failedTemplate:
errorMessage: Environment Variable (TZ) on container (RELEASE-NAME-common-test) is set more than once. [to (UTC) on (fixedEnv)] and [to (something) on (env)]
- it: should fail with env trying to override configmap
set:
env:
ENVVAR: something
controllers:
main:
pod:
containers:
main:
env:
ENVVAR: something
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
configmap:
somename:
enabled: true
parseAsEnv: true
content:
ENVVAR: ABC
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
asserts:
- failedTemplate:
errorMessage: Environment Variable (ENVVAR) on container (RELEASE-NAME-common-test) is set more than once. [to (something) on (env)] and [to (ABC) on (configmap-RELEASE-NAME-common-test-somename)]
- it: should fail with env trying to override secret
set:
env:
ENVVAR: something
controllers:
main:
pod:
containers:
main:
env:
ENVVAR: something
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
secret:
somename:
enabled: true
parseAsEnv: true
content:
ENVVAR: ABC
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
asserts:
- failedTemplate:
errorMessage: Environment Variable (ENVVAR) on container (RELEASE-NAME-common-test) is set more than once. [to (something) on (env)] and [to (ABC) on (secret-RELEASE-NAME-common-test-somename)]
- it: should fail with env trying to override envList
set:
env:
ENVVAR: something
envList:
- name: ENVVAR
value: ABC
controllers:
main:
pod:
containers:
main:
env:
ENVVAR: something
envList:
- name: ENVVAR
value: ABC
asserts:
- failedTemplate:
errorMessage: Environment Variable (ENVVAR) on container (RELEASE-NAME-common-test) is set more than once. [to (something) on (env)] and [to (ABC) on (envList)]
- it: should fail with envList trying to override fixedEnv
set:
envList:
- name: TZ
value: something
controllers:
main:
pod:
containers:
main:
envList:
- name: TZ
value: something
asserts:
- failedTemplate:
errorMessage: Environment Variable (TZ) on container (RELEASE-NAME-common-test) is set more than once. [to (UTC) on (fixedEnv)] and [to (something) on (envList)]
- it: should fail with envList trying to override env
set:
env:
POSTGRES_HOST: postgres.svc.cluster.local
envList:
- name: POSTGRES_HOST
value: something
controllers:
main:
pod:
containers:
main:
env:
POSTGRES_HOST: postgres.svc.cluster.local
envList:
- name: POSTGRES_HOST
value: something
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (postgres.svc.cluster.local) on (env)] and [to (something) on (envList)]
- it: should fail with envList trying to override configmap
set:
envList:
- name: POSTGRES_HOST
value: something
controllers:
main:
pod:
containers:
main:
envList:
- name: POSTGRES_HOST
value: something
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
configmap:
somename:
enabled: true
parseAsEnv: true
content:
POSTGRES_HOST: something
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (something) on (envList)] and [to (something) on (configmap-RELEASE-NAME-common-test-somename)]
- it: should fail with envList trying to override secret
set:
envList:
- name: POSTGRES_HOST
value: something
controllers:
main:
pod:
containers:
main:
envList:
- name: POSTGRES_HOST
value: something
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
secret:
somename:
enabled: true
parseAsEnv: true
content:
POSTGRES_HOST: something
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (something) on (envList)] and [to (something) on (secret-RELEASE-NAME-common-test-somename)]
@@ -224,44 +309,59 @@ tests:
parseAsEnv: true
content:
TZ: something
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
controllers:
main:
pod:
containers:
main:
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
asserts:
- failedTemplate:
errorMessage: Environment Variable (TZ) on container (RELEASE-NAME-common-test) is set more than once. [to (UTC) on (fixedEnv)] and [to (something) on (configmap-RELEASE-NAME-common-test-somename)]
- it: should fail with configmap trying to override env
set:
env:
POSTGRES_HOST: postgres.svc.cluster.local
controllers:
main:
pod:
containers:
main:
env:
POSTGRES_HOST: postgres.svc.cluster.local
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
configmap:
somename:
enabled: true
parseAsEnv: true
content:
POSTGRES_HOST: something
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (postgres.svc.cluster.local) on (env)] and [to (something) on (configmap-RELEASE-NAME-common-test-somename)]
- it: should fail with configmap trying to override envList
set:
envList:
- name: POSTGRES_HOST
value: postgres.svc.cluster.local
controllers:
main:
pod:
containers:
main:
envList:
- name: POSTGRES_HOST
value: postgres.svc.cluster.local
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
configmap:
somename:
enabled: true
parseAsEnv: true
content:
POSTGRES_HOST: something
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (postgres.svc.cluster.local) on (envList)] and [to (something) on (configmap-RELEASE-NAME-common-test-somename)]
@@ -280,11 +380,16 @@ tests:
parseAsEnv: true
content:
POSTGRES_HOST: something
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
- secretRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
controllers:
main:
pod:
containers:
main:
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
- secretRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (something) on (configmap-RELEASE-NAME-common-test-somename)] and [to (something123) on (secret-RELEASE-NAME-common-test-somename)]
@@ -297,44 +402,59 @@ tests:
parseAsEnv: true
content:
TZ: something
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
controllers:
main:
pod:
containers:
main:
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
asserts:
- failedTemplate:
errorMessage: Environment Variable (TZ) on container (RELEASE-NAME-common-test) is set more than once. [to (UTC) on (fixedEnv)] and [to (something) on (secret-RELEASE-NAME-common-test-somename)]
- it: should fail with secret trying to override env
set:
env:
POSTGRES_HOST: postgres.svc.cluster.local
controllers:
main:
pod:
containers:
main:
env:
POSTGRES_HOST: postgres.svc.cluster.local
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
secret:
somename:
enabled: true
parseAsEnv: true
content:
POSTGRES_HOST: something
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (postgres.svc.cluster.local) on (env)] and [to (something) on (secret-RELEASE-NAME-common-test-somename)]
- it: should fail with secret trying to override envList
set:
envList:
- name: POSTGRES_HOST
value: postgres.svc.cluster.local
controllers:
main:
pod:
containers:
main:
envList:
- name: POSTGRES_HOST
value: postgres.svc.cluster.local
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
secret:
somename:
enabled: true
parseAsEnv: true
content:
POSTGRES_HOST: something
envFrom:
- secretRef:
name: RELEASE-NAME-common-test-somename
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (postgres.svc.cluster.local) on (envList)] and [to (something) on (secret-RELEASE-NAME-common-test-somename)]
@@ -353,11 +473,16 @@ tests:
parseAsEnv: true
content:
POSTGRES_HOST: something
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
- secretRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
controllers:
main:
pod:
containers:
main:
envFrom:
- configMapRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
- secretRef:
name: '{{ include "ix.v1.common.names.fullname" . }}-somename'
asserts:
- failedTemplate:
errorMessage: Environment Variable (POSTGRES_HOST) on container (RELEASE-NAME-common-test) is set more than once. [to (something123) on (configmap-RELEASE-NAME-common-test-somename)] and [to (something) on (secret-RELEASE-NAME-common-test-somename)]
@@ -365,8 +490,13 @@ tests:
- it: should pass with envs defined with int value
documentIndex: *deploymentDoc
set:
env:
ENVVAR: 123
controllers:
main:
pod:
containers:
main:
env:
ENVVAR: 123
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -387,8 +517,13 @@ tests:
- it: should pass with envs defined with bool value
documentIndex: *deploymentDoc
set:
env:
ENVVAR: true
controllers:
main:
pod:
containers:
main:
env:
ENVVAR: true
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -409,8 +544,13 @@ tests:
- it: should pass with envs defined with string value
documentIndex: *deploymentDoc
set:
env:
ENVVAR: "some_value"
controllers:
main:
pod:
containers:
main:
env:
ENVVAR: "some_value"
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -434,10 +574,15 @@ tests:
some_string: a_string
some_int: 123
some_bool: false
env:
ENVVAR: "{{ .Values.some_string }}"
ENVVAR2: "{{ .Values.some_int }}"
ENVVAR3: "{{ .Values.some_bool }}"
controllers:
main:
pod:
containers:
main:
env:
ENVVAR: "{{ .Values.some_string }}"
ENVVAR2: "{{ .Values.some_int }}"
ENVVAR3: "{{ .Values.some_bool }}"
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -462,11 +607,16 @@ tests:
- it: should pass with envs defined with valueFrom configMapKeyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
configMapKeyRef:
name: some_name
key: some_key
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
configMapKeyRef:
name: some_name
key: some_key
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -490,11 +640,16 @@ tests:
- it: should pass with envs defined with valueFrom secretKeyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
secretKeyRef:
name: some_name
key: some_key
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
secretKeyRef:
name: some_name
key: some_key
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -520,11 +675,16 @@ tests:
set:
name: some_name
key: some_key
env:
ENVVAR:
configMapKeyRef:
name: "{{ .Values.name }}"
key: "{{ .Values.key }}"
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
configMapKeyRef:
name: "{{ .Values.name }}"
key: "{{ .Values.key }}"
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -550,11 +710,16 @@ tests:
set:
name: some_name
key: some_key
env:
ENVVAR:
secretKeyRef:
name: "{{ .Values.name }}"
key: "{{ .Values.key }}"
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
secretKeyRef:
name: "{{ .Values.name }}"
key: "{{ .Values.key }}"
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -578,12 +743,17 @@ tests:
- it: should pass with envs defined with valueFrom secretKeyRef with <optional> true
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
secretKeyRef:
name: some_name
key: some_key
optional: true
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
secretKeyRef:
name: some_name
key: some_key
optional: true
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -608,12 +778,17 @@ tests:
- it: should pass with envs defined with valueFrom secretKeyRef with <optional> false
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
secretKeyRef:
name: some_name
key: some_key
optional: false
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
secretKeyRef:
name: some_name
key: some_key
optional: false
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -644,20 +819,25 @@ tests:
key2: some_key2
name3: some_name3
key3: some_key3
env:
ENVVAR:
configMapKeyRef:
name: "{{ .Values.name }}"
key: "{{ .Values.key }}"
ENVVAR2:
secretKeyRef:
name: "{{ .Values.name2 }}"
key: "{{ .Values.key2 }}"
optional: false
ENVVAR3:
secretKeyRef:
name: "{{ .Values.name3 }}"
key: "{{ .Values.key3 }}"
controllers:
main:
pod:
containers:
main:
env:
ENVVAR:
configMapKeyRef:
name: "{{ .Values.name }}"
key: "{{ .Values.key }}"
ENVVAR2:
secretKeyRef:
name: "{{ .Values.name2 }}"
key: "{{ .Values.key2 }}"
optional: false
ENVVAR3:
secretKeyRef:
name: "{{ .Values.name3 }}"
key: "{{ .Values.key3 }}"
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -13,7 +13,12 @@ tests:
- it: should fail with empty PUID
documentIndex: *deploymentDoc
set:
PUID:
controllers:
main:
pod:
containers:
main:
PUID:
asserts:
- failedTemplate:
errorMessage: <PUID> key cannot be empty. Set a value or remove the key for the default (568) to take effect.
@@ -21,7 +26,12 @@ tests:
- it: should fail with PUID not-int
documentIndex: *deploymentDoc
set:
PUID: "1000"
controllers:
main:
pod:
containers:
main:
PUID: "1000"
asserts:
- failedTemplate:
errorMessage: <PUID> key has value of ("1000"). But must be an int.
@@ -29,7 +39,12 @@ tests:
- it: should fail with empty UMASK
documentIndex: *deploymentDoc
set:
UMASK:
controllers:
main:
pod:
containers:
main:
UMASK:
asserts:
- failedTemplate:
errorMessage: <UMASK> key cannot be empty. Set a value or remove the key for the default (002) to take effect.
@@ -37,7 +52,12 @@ tests:
- it: should fail with UMASK not-string
documentIndex: *deploymentDoc
set:
UMASK: 2
controllers:
main:
pod:
containers:
main:
UMASK: 2
asserts:
- failedTemplate:
errorMessage: <UMASK> key must be a string, so the format is kept intact.
@@ -45,7 +65,12 @@ tests:
- it: should pass with injectFixedEnvs false
documentIndex: *deploymentDoc
set:
injectFixedEnvs: false
controllers:
main:
pod:
containers:
main:
injectFixedEnvs: false
asserts:
- isNull:
path: spec.template.spec.containers[0].env
@@ -73,12 +98,17 @@ tests:
- it: should pass with an env referencing TZ and PUID
documentIndex: *deploymentDoc
set:
securityContext:
runAsUser: 0
runAsNonRoot: false
env:
TIMEZONE: "{{ .Values.TZ }}"
APP_USER_ID: "{{ .Values.security.PUID }}"
controllers:
main:
pod:
containers:
main:
securityContext:
runAsUser: 0
runAsNonRoot: false
env:
TIMEZONE: "{{ .Values.TZ }}"
APP_USER_ID: "{{ .Values.PUID }}"
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -113,9 +143,14 @@ tests:
- it: should pass without S6_READ_ONLY_ROOT
documentIndex: *deploymentDoc
set:
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
controllers:
main:
pod:
containers:
main:
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -152,9 +187,14 @@ tests:
- it: should pass with envs changed because run as user root
documentIndex: *deploymentDoc
set:
securityContext:
runAsUser: 0
runAsNonRoot: false
controllers:
main:
pod:
containers:
main:
securityContext:
runAsUser: 0
runAsNonRoot: false
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -185,9 +225,14 @@ tests:
- it: should pass with envs changed because run as group root
documentIndex: *deploymentDoc
set:
securityContext:
runAsGroup: 0
runAsNonRoot: false
controllers:
main:
pod:
containers:
main:
securityContext:
runAsGroup: 0
runAsNonRoot: false
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -218,10 +263,15 @@ tests:
- it: should pass with envs changed because run as user root and PUID 0
documentIndex: *deploymentDoc
set:
securityContext:
runAsUser: 0
runAsNonRoot: false
PUID: 0
controllers:
main:
pod:
containers:
main:
securityContext:
runAsUser: 0
runAsNonRoot: false
PUID: 0
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -252,10 +302,15 @@ tests:
- it: should pass with envs changed because run as group root and PUID 0
documentIndex: *deploymentDoc
set:
securityContext:
runAsGroup: 0
runAsNonRoot: false
PUID: 0
controllers:
main:
pod:
containers:
main:
securityContext:
runAsGroup: 0
runAsNonRoot: false
PUID: 0
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -286,12 +341,17 @@ tests:
- it: should pass with envs changed because run as group root and fsGroup 0 and PUID 0
documentIndex: *deploymentDoc
set:
podSecurityContext:
fsGroup: 0
securityContext:
runAsGroup: 0
runAsNonRoot: false
PUID: 0
controllers:
main:
pod:
securityContext:
fsGroup: 0
containers:
main:
securityContext:
runAsGroup: 0
runAsNonRoot: false
PUID: 0
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -342,10 +402,15 @@ tests:
- it: should fail with non-unique nvidiaCaps
documentIndex: *deploymentDoc
set:
nvidiaCaps:
- compute
- compute
- utility
controllers:
main:
pod:
containers:
main:
nvidiaCaps:
- compute
- compute
- utility
asserts:
- failedTemplate:
errorMessage: <nvidiaCaps> ([compute compute utility]) are must have unique values only
@@ -353,10 +418,15 @@ tests:
- it: should fail with invalid nvidiaCaps value
documentIndex: *deploymentDoc
set:
nvidiaCaps:
- invalid
- compute
- utility
controllers:
main:
pod:
containers:
main:
nvidiaCaps:
- invalid
- compute
- utility
asserts:
- failedTemplate:
errorMessage: Invalid options in <nvidiaCaps> (invalid). Valid options are compute, utility, all, graphics, video
@@ -366,9 +436,14 @@ tests:
set:
scaleGPU:
gpu.intel.com/i915: "1"
nvidiaCaps:
- compute
- utility
controllers:
main:
pod:
containers:
main:
nvidiaCaps:
- compute
- utility
asserts:
- equal:
path: spec.template.spec.containers[0].env
@@ -66,7 +66,12 @@ tests:
repository: some_repo
tag: some_tag
pullPolicy: invalid_policy
imageSelector: imageY
controllers:
main:
pod:
containers:
main:
imageSelector: imageY
asserts:
- failedTemplate:
errorMessage: Selected image (imageY) does not exist in values
@@ -77,7 +82,12 @@ tests:
betaImage:
repository: some_other_repo
tag: some_other_tag
imageSelector: betaImage
controllers:
main:
pod:
containers:
main:
imageSelector: betaImage
asserts:
- equal:
path: spec.template.spec.containers[0].image
@@ -90,7 +100,12 @@ tests:
repository: some_other_repo
tag: some_other_tag
pullPolicy: Never
imageSelector: betaImage
controllers:
main:
pod:
containers:
main:
imageSelector: betaImage
asserts:
- equal:
path: spec.template.spec.containers[0].image
@@ -104,7 +119,12 @@ tests:
betaImage:
repository: ""
tag: some_other_tag
imageSelector: betaImage
controllers:
main:
pod:
containers:
main:
imageSelector: betaImage
asserts:
- failedTemplate:
errorMessage: Image <repository> is required
@@ -114,7 +134,12 @@ tests:
betaImage:
repository: some_other_repo
tag: ""
imageSelector: betaImage
controllers:
main:
pod:
containers:
main:
imageSelector: betaImage
asserts:
- failedTemplate:
errorMessage: Image <tag> is required
@@ -14,9 +14,14 @@ tests:
- it: should pass with single postStart lifecycle set
documentIndex: *deploymentDoc
set:
lifecycle:
postStart:
command: some_command
controllers:
main:
pod:
containers:
main:
lifecycle:
postStart:
command: some_command
asserts:
- equal:
path: spec.template.spec.containers[0].lifecycle
@@ -30,9 +35,14 @@ tests:
documentIndex: *deploymentDoc
set:
some_key: some_command
lifecycle:
postStart:
command: "{{ .Values.some_key }}"
controllers:
main:
pod:
containers:
main:
lifecycle:
postStart:
command: "{{ .Values.some_key }}"
asserts:
- equal:
path: spec.template.spec.containers[0].lifecycle
@@ -45,11 +55,16 @@ tests:
- it: should pass with postStart lifecycle set
documentIndex: *deploymentDoc
set:
lifecycle:
postStart:
command:
- /bin/bash
- test
controllers:
main:
pod:
containers:
main:
lifecycle:
postStart:
command:
- /bin/bash
- test
asserts:
- equal:
path: spec.template.spec.containers[0].lifecycle
@@ -64,11 +79,16 @@ tests:
documentIndex: *deploymentDoc
set:
some_key: some_value
lifecycle:
postStart:
command:
- /bin/bash
- "{{ .Values.some_key }}"
controllers:
main:
pod:
containers:
main:
lifecycle:
postStart:
command:
- /bin/bash
- "{{ .Values.some_key }}"
asserts:
- equal:
path: spec.template.spec.containers[0].lifecycle
@@ -82,9 +102,14 @@ tests:
- it: should pass with single preStop lifecycle set
documentIndex: *deploymentDoc
set:
lifecycle:
preStop:
command: some_command
controllers:
main:
pod:
containers:
main:
lifecycle:
preStop:
command: some_command
asserts:
- equal:
path: spec.template.spec.containers[0].lifecycle
@@ -98,9 +123,14 @@ tests:
documentIndex: *deploymentDoc
set:
some_key: some_command
lifecycle:
preStop:
command: "{{ .Values.some_key }}"
controllers:
main:
pod:
containers:
main:
lifecycle:
preStop:
command: "{{ .Values.some_key }}"
asserts:
- equal:
path: spec.template.spec.containers[0].lifecycle
@@ -110,15 +140,19 @@ tests:
command:
- some_command
- it: should pass with preStop lifecycle set
documentIndex: *deploymentDoc
set:
lifecycle:
preStop:
command:
- /bin/bash
- test
controllers:
main:
pod:
containers:
main:
lifecycle:
preStop:
command:
- /bin/bash
- test
asserts:
- equal:
path: spec.template.spec.containers[0].lifecycle
@@ -133,11 +167,16 @@ tests:
documentIndex: *deploymentDoc
set:
some_key: some_value
lifecycle:
preStop:
command:
- /bin/bash
- "{{ .Values.some_key }}"
controllers:
main:
pod:
containers:
main:
lifecycle:
preStop:
command:
- /bin/bash
- "{{ .Values.some_key }}"
asserts:
- equal:
path: spec.template.spec.containers[0].lifecycle
@@ -150,45 +189,70 @@ tests:
- it: should fail with invalid key
set:
lifecycle:
preStart:
command: something
controllers:
main:
pod:
containers:
main:
lifecycle:
preStart:
command: something
asserts:
- failedTemplate:
errorMessage: Invalid key (preStart) in lifecycle. Valid keys are preStop and postStart
- it: should fail with no command in preStop
set:
lifecycle:
preStop:
command: ""
controllers:
main:
pod:
containers:
main:
lifecycle:
preStop:
command: ""
asserts:
- failedTemplate:
errorMessage: No commands were given for preStop lifecycle hook
- it: should fail with no command in postStart
set:
lifecycle:
postStart:
command: ""
controllers:
main:
pod:
containers:
main:
lifecycle:
postStart:
command: ""
asserts:
- failedTemplate:
errorMessage: No commands were given for postStart lifecycle hook
- it: should fail with no command in preStop
set:
lifecycle:
preStop:
command: ""
controllers:
main:
pod:
containers:
main:
lifecycle:
preStop:
command: ""
asserts:
- failedTemplate:
errorMessage: No commands were given for preStop lifecycle hook
- it: should fail with no command in postStart
set:
lifecycle:
postStart:
command: ""
controllers:
main:
pod:
containers:
main:
lifecycle:
postStart:
command: ""
asserts:
- failedTemplate:
errorMessage: No commands were given for postStart lifecycle hook
@@ -143,13 +143,18 @@ tests:
port: 443
protocol: UDP
targetPort: 8000
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
controllers:
main:
pod:
containers:
main:
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
asserts:
- equal:
path: spec.template.spec.containers[0].ports[0]
@@ -42,8 +42,13 @@ tests:
- it: should fail with wrong probe name
set:
probes:
invalid_probe_name:
controllers:
main:
pod:
containers:
main:
probes:
invalid_probe_name:
asserts:
- failedTemplate:
errorMessage: Invalid probe name (invalid_probe_name) in (RELEASE-NAME-common-test) container. Valid options are (liveness, readiness, startup)
@@ -53,27 +58,42 @@ tests:
service:
main:
enabled: false
probes:
liveness:
type: auto
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: auto
asserts:
- failedTemplate:
errorMessage: <auto> probe type in probe (liveness) in (RELEASE-NAME-common-test) container, is only supported for the main container and only if there is at least 1 port enabled
- it: should fail with probe type set to UDP
set:
probes:
liveness:
type: udp
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: udp
asserts:
- failedTemplate:
errorMessage: Invalid probe type (udp) on probe (liveness) in (RELEASE-NAME-common-test) container. Valid types are tcp, http, https, grpc, exec, auto
- it: should fail with probe type auto and port protocol UDP
set:
probes:
liveness:
type: auto
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: auto
service:
main:
ports:
@@ -86,9 +106,14 @@ tests:
- it: should fail without commands on exec probe
set:
probes:
liveness:
type: exec
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: exec
asserts:
- failedTemplate:
errorMessage: No commands were defined for <exec> type on probe (liveness) in (RELEASE-NAME-common-test) container.
@@ -101,10 +126,15 @@ tests:
ports:
main:
enabled: false
probes:
liveness:
path: "/"
type: http
controllers:
main:
pod:
containers:
main:
probes:
liveness:
path: "/"
type: http
asserts:
- failedTemplate:
errorMessage: <port> must be defined for <http>/<https> probe types in probe (liveness) in (RELEASE-NAME-common-test) container.
@@ -117,11 +147,16 @@ tests:
ports:
main:
enabled: false
probes:
liveness:
path: "/"
type: https
port:
controllers:
main:
pod:
containers:
main:
probes:
liveness:
path: "/"
type: https
port:
asserts:
- failedTemplate:
errorMessage: <port> must be defined for <http>/<https> probe types in probe (liveness) in (RELEASE-NAME-common-test) container.
@@ -134,95 +169,140 @@ tests:
ports:
main:
enabled: false
probes:
liveness:
path: "/"
type: http
port:
controllers:
main:
pod:
containers:
main:
probes:
liveness:
path: "/"
type: http
port:
asserts:
- failedTemplate:
errorMessage: <port> must be defined for <http>/<https> probe types in probe (liveness) in (RELEASE-NAME-common-test) container.
- it: should fail without initialDelaySeconds on non-custom probes
set:
probes:
liveness:
spec:
initialDelaySeconds:
controllers:
main:
pod:
containers:
main:
probes:
liveness:
spec:
initialDelaySeconds:
asserts:
- failedTemplate:
errorMessage: <initialDelaySeconds> cannot be empty in probe (liveness) in (RELEASE-NAME-common-test) container
- it: should fail without failureThreshold on non-custom probes
set:
probes:
liveness:
spec:
failureThreshold:
controllers:
main:
pod:
containers:
main:
probes:
liveness:
spec:
failureThreshold:
asserts:
- failedTemplate:
errorMessage: <failureThreshold> cannot be empty in probe (liveness) in (RELEASE-NAME-common-test) container
- it: should fail without timeoutSeconds on non-custom probes
set:
probes:
liveness:
spec:
timeoutSeconds:
controllers:
main:
pod:
containers:
main:
probes:
liveness:
spec:
timeoutSeconds:
asserts:
- failedTemplate:
errorMessage: <timeoutSeconds> cannot be empty in probe (liveness) in (RELEASE-NAME-common-test) container
- it: should fail without periodSeconds on non-custom probes
set:
probes:
liveness:
spec:
periodSeconds:
controllers:
main:
pod:
containers:
main:
probes:
liveness:
spec:
periodSeconds:
asserts:
- failedTemplate:
errorMessage: <periodSeconds> cannot be empty in probe (liveness) in (RELEASE-NAME-common-test) container
- it: should fail with invalid probe type
set:
probes:
liveness:
type: not_valid_type
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: not_valid_type
asserts:
- failedTemplate:
errorMessage: Invalid probe type (not_valid_type) on probe (liveness) in (RELEASE-NAME-common-test) container. Valid types are tcp, http, https, grpc, exec, auto
- it: should fail with probe path not starting with /
set:
probes:
liveness:
type: http
path: a/random/path
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: http
path: a/random/path
asserts:
- failedTemplate:
errorMessage: Probe in container (RELEASE-NAME-common-test) with path (a/random/path), must start with a forward slash -> / <-
- it: should fail with httpHeader value is defined as list
set:
probes:
liveness:
type: http
httpHeaders:
some_header:
- list_value
- list_value2
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: http
httpHeaders:
some_header:
- list_value
- list_value2
asserts:
- failedTemplate:
errorMessage: Lists or Dicts are not allowed in httpHeaders on probe (liveness)
- it: should fail with httpHeader value is defined as dict
set:
probes:
liveness:
type: http
httpHeaders:
some_header:
some_key:
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: http
httpHeaders:
some_header:
some_key:
asserts:
- failedTemplate:
errorMessage: Lists or Dicts are not allowed in httpHeaders on probe (liveness)
@@ -230,10 +310,15 @@ tests:
- it: should fail without spec in custom defined probe
documentIndex: *deploymentDoc
set:
probes:
liveness:
type: custom
spec: {}
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: custom
spec: {}
asserts:
- failedTemplate:
errorMessage: <spec> must be defined for <custom> probe types in probe (liveness) in (RELEASE-NAME-common-test) container.
@@ -241,18 +326,23 @@ tests:
- it: should pass with with custom defined liveness probe
documentIndex: *deploymentDoc
set:
probes:
liveness:
type: custom
spec:
httpGet:
path: /path
scheme: HTTPS
port: 1234
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: custom
spec:
httpGet:
path: /path
scheme: HTTPS
port: 1234
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -269,18 +359,23 @@ tests:
- it: should pass with with custom defined readiness probe
documentIndex: *deploymentDoc
set:
probes:
readiness:
type: custom
spec:
httpGet:
path: /path
scheme: HTTPS
port: 1234
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
controllers:
main:
pod:
containers:
main:
probes:
readiness:
type: custom
spec:
httpGet:
path: /path
scheme: HTTPS
port: 1234
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
asserts:
- equal:
path: spec.template.spec.containers[0].readinessProbe
@@ -297,18 +392,23 @@ tests:
- it: should pass with with custom defined startup probe
documentIndex: *deploymentDoc
set:
probes:
startup:
type: custom
spec:
httpGet:
path: /path
scheme: HTTPS
port: 1234
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
controllers:
main:
pod:
containers:
main:
probes:
startup:
type: custom
spec:
httpGet:
path: /path
scheme: HTTPS
port: 1234
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
asserts:
- equal:
path: spec.template.spec.containers[0].startupProbe
@@ -346,9 +446,14 @@ tests:
- it: should pass with with probe type TCP and service TCP
documentIndex: *deploymentDoc
set:
probes:
liveness:
type: tcp
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: tcp
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -368,11 +473,16 @@ tests:
ports:
main:
enabled: false
probes:
liveness:
path: "/"
type: tcp
port: ""
controllers:
main:
pod:
containers:
main:
probes:
liveness:
path: "/"
type: tcp
port: ""
asserts:
- failedTemplate:
errorMessage: <port> must be defined for <tcp> probe types in probe (liveness) in (RELEASE-NAME-common-test) container.
@@ -385,9 +495,14 @@ tests:
ports:
main:
protocol: HTTP
probes:
liveness:
path: /some_path
controllers:
main:
pod:
containers:
main:
probes:
liveness:
path: /some_path
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -409,9 +524,14 @@ tests:
ports:
main:
protocol: HTTP
probes:
liveness:
port: 1234
controllers:
main:
pod:
containers:
main:
probes:
liveness:
port: 1234
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -433,10 +553,15 @@ tests:
ports:
main:
protocol: HTTP
probes:
liveness:
httpHeaders:
some_header: 1234
controllers:
main:
pod:
containers:
main:
probes:
liveness:
httpHeaders:
some_header: 1234
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -457,11 +582,16 @@ tests:
documentIndex: *deploymentDoc
set:
some_header_value: 1234
probes:
liveness:
type: http
httpHeaders:
some_header: "{{ .Values.some_header_value }}"
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: http
httpHeaders:
some_header: "{{ .Values.some_header_value }}"
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -483,12 +613,17 @@ tests:
set:
some_header_value: 1234
some_header_value2: some_value
probes:
liveness:
type: http
httpHeaders:
some_header: "{{ .Values.some_header_value }}"
some_header2: "{{ .Values.some_header_value2 }}"
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: http
httpHeaders:
some_header: "{{ .Values.some_header_value }}"
some_header2: "{{ .Values.some_header_value2 }}"
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -511,10 +646,15 @@ tests:
documentIndex: *deploymentDoc
set:
some_path: /ping
probes:
liveness:
type: http
path: "{{ .Values.some_path }}"
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: http
path: "{{ .Values.some_path }}"
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -532,10 +672,15 @@ tests:
documentIndex: *deploymentDoc
set:
some_port: 1234
probes:
liveness:
type: http
port: "{{ .Values.some_port }}"
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: http
port: "{{ .Values.some_port }}"
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -553,10 +698,15 @@ tests:
documentIndex: *deploymentDoc
set:
some_port: 1234
probes:
liveness:
type: tcp
port: "{{ .Values.some_port }}"
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: tcp
port: "{{ .Values.some_port }}"
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -571,14 +721,19 @@ tests:
- it: should pass with with changed times
documentIndex: *deploymentDoc
set:
probes:
liveness:
type: tcp
spec:
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: tcp
spec:
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -593,9 +748,14 @@ tests:
- it: should pass with with probe type GRPC
documentIndex: *deploymentDoc
set:
probes:
liveness:
type: grpc
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: grpc
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -615,11 +775,16 @@ tests:
ports:
main:
enabled: false
probes:
liveness:
path: "/"
type: grpc
port: ""
controllers:
main:
pod:
containers:
main:
probes:
liveness:
path: "/"
type: grpc
port: ""
asserts:
- failedTemplate:
errorMessage: <port> must be defined for <grpc> probe types in probe (liveness) in (RELEASE-NAME-common-test) container.
@@ -627,14 +792,19 @@ tests:
- it: should pass with with probe type exec with multiline command
documentIndex: *deploymentDoc
set:
probes:
liveness:
type: exec
command:
- /bin/bash
- -c
- |
echo "probe!"
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: exec
command:
- /bin/bash
- -c
- |
echo "probe!"
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -654,14 +824,19 @@ tests:
documentIndex: *deploymentDoc
set:
some_msg: probe!
probes:
liveness:
type: exec
command:
- /bin/bash
- -c
- |
echo "{{ .Values.some_msg }}"
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: exec
command:
- /bin/bash
- -c
- |
echo "{{ .Values.some_msg }}"
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -680,10 +855,15 @@ tests:
- it: should pass with with probe type exec single command
documentIndex: *deploymentDoc
set:
probes:
liveness:
type: exec
command: env
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: exec
command: env
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -700,10 +880,15 @@ tests:
documentIndex: *deploymentDoc
set:
some_command: env
probes:
liveness:
type: exec
command: "{{ .Values.some_command }}"
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: exec
command: "{{ .Values.some_command }}"
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -719,15 +904,20 @@ tests:
- it: should pass with with probe type exec single command and custom timings
documentIndex: *deploymentDoc
set:
probes:
liveness:
type: exec
command: env
spec:
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
controllers:
main:
pod:
containers:
main:
probes:
liveness:
type: exec
command: env
spec:
initialDelaySeconds: 15
failureThreshold: 10
timeoutSeconds: 10
periodSeconds: 15
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe
@@ -34,10 +34,10 @@ metadata:
{{- . | nindent 4 }}
{{- end -}}
{{- $additionalAnnotations := dict -}}
{{- if and $root.Values.addAnnotations.traefik (eq ($primaryPort.protocol | default "") "HTTPS") -}}
{{- if and $root.Values.globalDefaults.addAnnotations.traefik (eq ($primaryPort.protocol | default "") "HTTPS") -}}
{{- $_ := set $additionalAnnotations "traefik.ingress.kubernetes.io/service.serversscheme" "https" -}}
{{- end -}}
{{- if and $root.Values.addAnnotations.metallb (eq $svcType "LoadBalancer") -}}
{{- if and $root.Values.globalDefaults.addAnnotations.metallb (eq $svcType "LoadBalancer") -}}
{{- $sharedLBKey := include "ix.v1.common.names.fullname" $root -}}
{{- with $svcValues.metalLBSharedKey -}}
{{- $sharedLBKey = tpl . $root -}}
@@ -37,7 +37,6 @@
{{- if $probe.type -}}
{{- $probeType = $probe.type -}}
{{- end -}}
{{- if and (or (not $services) (not $primaryPort)) (eq $probeType "auto") -}}
{{- fail (printf "<auto> probe type in probe (%s) in (%s) container, is only supported for the main container and only if there is at least 1 port enabled" $probeName $containerName) -}}
{{- end -}}
@@ -23,7 +23,7 @@ The reason is not splitted, is that on one of the places needs a combo of all va
{{- if and $secCont.inherit (not $isMainContainer) -}} {{/* if inherit is set, overwrite values from mainContainer */}}
{{- if (hasKey $root.Values "securityContext") -}}
{{- $returnValue = mustMergeOverwrite $returnValue $root.Values.securityContext -}}
{{- $returnValue = mustMergeOverwrite $returnValue $root.Values.controllers.main.pod.containers.main.securityContext -}}
{{- end -}}
{{- end -}}
@@ -214,12 +214,11 @@ The reason is not splitted, is that on one of the places needs a combo of all va
{{- $secEnvs := .secEnvs -}}
{{/* Initialiaze Values */}}
{{- $defaultSecEnvs := (dict "PUID" $root.Values.PUID "UMASK" $root.Values.UMASK ) -}}
{{- $defaultSecEnvs := (dict "PUID" $root.Values.PUID "UMASK" $root.Values.UMASK) -}}
{{- $returnValue := (mustDeepCopy $defaultSecEnvs) -}}
{{/* Overwrite from values that user/dev passed */}}
{{- $returnValue = mustMergeOverwrite $returnValue $secEnvs -}}
{{/* Validate values, as mergeOverwrite also passes null values */}}
{{- if not $returnValue.UMASK -}}
{{- fail (printf "<UMASK> key cannot be empty. Set a value or remove the key for the default (%v) to take effect." $defaultSecEnvs.UMASK) -}}
@@ -4,7 +4,7 @@
{{- $root := .root -}}
{{- $extraContainerVolMounts := .extraContainerVolMounts -}}
{{- if (mustHas $root.Values.controller.type (list "Job" "CronJob")) -}}
{{- if (mustHas $root.Values.controllers.main.type (list "Job" "CronJob")) -}}
{{- $isMainContainer = true -}}
{{- end -}}
@@ -19,7 +19,7 @@
{{- end -}}
{{- end -}}
{{- if eq $root.Values.controller.type "StatefulSet" -}}
{{- if eq $root.Values.controllers.main.type "StatefulSet" -}}
{{- range $index, $vct := $root.Values.volumeClaimTemplates -}}
{{- include "ix.v1.common.container.volumeMount" (dict "root" $root
"item" $vct
@@ -29,7 +29,7 @@
{{- end -}}
{{- end -}}
{{- $podSecCont := $root.Values.podSecurityContext -}}
{{- $podSecCont := $root.Values.controllers.main.pod.securityContext -}}
{{/* Calculate all security values */}}
{{- $securityContext := (include "ix.v1.common.lib.securityContext" (dict "root" $root
@@ -14,7 +14,7 @@ nameOverride applies only to the current chart
{{- end -}}
{{/* Order of preference: global.nameOverride -> nameOverride -> Chart.Name */}}
{{- ($globalNameOverride | default .Values.nameOverride) | default .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- ($globalNameOverride | default .Values.controllers.main.pod.nameOverride) | default .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Create a default fully qualified app name. */}}
@@ -26,8 +26,8 @@ nameOverride applies only to the current chart
{{- $globalFullNameOverride = (.Values.global.fullnameOverride | default $globalFullNameOverride) -}}
{{- end -}}
{{- if or .Values.fullnameOverride $globalFullNameOverride -}}
{{- $name = $globalFullNameOverride | default .Values.fullnameOverride -}}
{{- if or .Values.controllers.main.pod.fullnameOverride $globalFullNameOverride -}}
{{- $name = $globalFullNameOverride | default .Values.controllers.main.pod.fullnameOverride -}}
{{- else -}}
{{- if contains $name .Release.Name -}}
{{- $name = .Release.Name -}}
@@ -56,14 +56,14 @@ nameOverride applies only to the current chart
{{/* Return the properly cased version of the controller type */}}
{{- define "ix.v1.common.names.controllerType" -}}
{{- if eq .Values.controller.type "deployment" -}}
{{- if eq .Values.controllers.main.type "deployment" -}}
{{- print "Deployment" -}}
{{- else if eq .Values.controller.type "daemonset" -}}
{{- else if eq .Values.controllers.main.type "daemonset" -}}
{{- print "DaemonSet" -}}
{{- else if eq .Values.controller.type "statefulset" -}}
{{- else if eq .Values.controllers.main.type "statefulset" -}}
{{- print "StatefulSet" -}}
{{- else -}}
{{- fail (printf "Not a valid controller.type (%s)" .Values.controller.type) -}}
{{- fail (printf "Not a valid controller.type (%s)" .Values.controllers.main.type) -}}
{{- end -}}
{{- end -}}
@@ -302,7 +302,7 @@ nameOverride applies only to the current chart
{{- if and (hasKey $jobValues "nameOverride") $jobValues.nameOverride -}}
{{- if not (eq $jobValues.nameOverride "-") -}}
{{- if (mustHas $root.Values.controller.type (list "Job" "CronJob")) -}}
{{- if (mustHas $root.Values.controllers.main.type (list "Job" "CronJob")) -}}
{{- $jobName = $jobValues.nameOverride -}}
{{- else -}}
{{- $jobName = printf "%v-%v" $jobName $jobValues.nameOverride -}}
@@ -19,7 +19,7 @@
{{- $schedulerName := "" -}}
{{- with $values.schedulerName -}}
{{- if eq . $inherit -}}
{{- $schedulerName = (tpl $root.Values.schedulerName $root) -}}
{{- $schedulerName = (tpl $root.Values.controllers.main.pod.schedulerName $root) -}}
{{- else -}}
{{- $schedulerName = . -}}
{{- end -}}
@@ -30,7 +30,7 @@
{{- $priorityClassName := "" -}}
{{- with $values.priorityClassName -}}
{{- if eq . $inherit -}}
{{- $priorityClassName = (tpl $root.Values.priorityClassName $root) -}}
{{- $priorityClassName = (tpl $root.Values.controllers.main.pod.priorityClassName $root) -}}
{{- else -}}
{{- $priorityClassName = . -}}
{{- end -}}
@@ -41,7 +41,7 @@
{{- $hostname := "" -}}
{{- with $values.hostname -}}
{{- if eq . $inherit -}}
{{- $hostname = (tpl $root.Values.hostname $root) -}}
{{- $hostname = (tpl $root.Values.controllers.main.pod.hostname $root) -}}
{{- else -}}
{{- $hostname = . -}}
{{- end -}}
@@ -52,11 +52,11 @@
{{- $dnsPolicy := "" -}}
{{- with $values.dnsPolicy -}}
{{- if eq . $inherit -}}
{{- with (include "ix.v1.common.dnsPolicy" (dict "dnsPolicy" $root.Values.dnsPolicy "hostNetwork" $root.Values.hostNetwork "root" $root) | trim ) -}}
{{- with (include "ix.v1.common.dnsPolicy" (dict "dnsPolicy" $root.Values.controllers.main.pod.dnsPolicy "hostNetwork" $root.Values.controllers.main.pod.hostNetwork "root" $root) | trim ) -}}
{{- $dnsPolicy = . -}}
{{- end -}}
{{- else -}}
{{- with (include "ix.v1.common.dnsPolicy" (dict "dnsPolicy" $values.dnsPolicy "hostNetwork" ($values.hostNetwork | default $root.Values.hostNetwork) "root" $root) | trim ) -}}
{{- with (include "ix.v1.common.dnsPolicy" (dict "dnsPolicy" $values.dnsPolicy "hostNetwork" ($values.hostNetwork | default false) "root" $root) | trim ) -}}
{{- $dnsPolicy = . -}}
{{- end -}}
{{- end -}}
@@ -67,11 +67,11 @@
{{- $dnsConfig := dict -}}
{{- with $values.dnsConfig -}}
{{- if eq (toString .) $inherit -}}
{{- with (include "ix.v1.common.dnsConfig" (dict "dnsPolicy" $root.Values.dnsPolicy "dnsConfig" $root.Values.dnsConfig "root" $root) | trim ) -}}
{{- with (include "ix.v1.common.dnsConfig" (dict "dnsPolicy" $root.Values.controllers.main.pod.dnsPolicy "dnsConfig" $root.Values.controllers.main.pod.dnsConfig "root" $root) | trim ) -}}
{{- $dnsConfig = . -}}
{{- end -}}
{{- else -}}
{{- with (include "ix.v1.common.dnsConfig" (dict "dnsPolicy" ($dnsPolicy | default $root.Values.dnsPolicy) "dnsConfig" $values.dnsConfig "root" $root) | trim ) -}}
{{- with (include "ix.v1.common.dnsConfig" (dict "dnsPolicy" ($dnsPolicy | default $root.Values.controllers.main.pod.dnsPolicy) "dnsConfig" $values.dnsConfig "root" $root) | trim ) -}}
{{- $dnsConfig = . -}}
{{- end -}}
{{- end -}}
@@ -82,7 +82,7 @@
{{- $hostAliases := dict -}}
{{- with $values.hostAliases -}}
{{- if eq (toString .) $inherit -}}
{{- with (include "ix.v1.common.hostAliases" (dict "hostAliases" $root.Values.hostAliases "root" $root) | trim) -}}
{{- with (include "ix.v1.common.hostAliases" (dict "hostAliases" $root.Values.controllers.main.pod.hostAliases "root" $root) | trim) -}}
{{- $hostAliases = . -}}
{{- end -}}
{{- else -}}
@@ -97,7 +97,7 @@
{{- $nodeSelector := "" -}}
{{- with $values.nodeSelector -}}
{{- if eq (toString .) $inherit -}}
{{- with (include "ix.v1.common.nodeSelector" (dict "nodeSelector" $root.Values.nodeSelector "root" $root) | trim) -}}
{{- with (include "ix.v1.common.nodeSelector" (dict "nodeSelector" $root.Values.controllers.main.pod.nodeSelector "root" $root) | trim) -}}
{{- $nodeSelector = . -}}
{{- end -}}
{{- else -}}
@@ -112,7 +112,7 @@
{{- $tolerations := dict -}}
{{- with $values.tolerations -}}
{{- if eq (toString .) $inherit -}}
{{- with (include "ix.v1.common.tolerations" (dict "tolerations" $root.Values.tolerations "root" $root) | trim) -}}
{{- with (include "ix.v1.common.tolerations" (dict "tolerations" $root.Values.controllers.main.pod.tolerations "root" $root) | trim) -}}
{{- $tolerations = . -}}
{{- end -}}
{{- else -}}
@@ -142,14 +142,14 @@
{{- $runtimeClassName := "" -}}
{{- with $values.runtimeClassName -}}
{{- if eq . $inherit -}}
{{- with (include "ix.v1.common.runtimeClassName" (dict "root" $root "runtime" $root.Values.runtimeClassName) | trim) -}}
{{- with (include "ix.v1.common.runtimeClassName" (dict "root" $root "runtime" $root.Values.controllers.main.pod.runtimeClassName) | trim) -}}
{{- $runtimeClassName = . -}}
{{- end -}}
{{- else -}}
{{- $runtimeClassName = . -}}
{{- end -}}
{{- else -}}
{{- with (include "ix.v1.common.runtimeClassName" (dict "root" $root "runtime" $root.Values.runtimeClassName "isJob" true) | trim) -}}
{{- with (include "ix.v1.common.runtimeClassName" (dict "root" $root "runtime" $root.Values.controllers.main.pod.runtimeClassName "isJob" true) | trim) -}}
{{- $runtimeClassName = . -}}
{{- end -}}
{{- end -}}
@@ -157,7 +157,7 @@
{{- $termSeconds := "" -}}
{{- with $values.terminationGracePeriodSeconds -}}
{{- if eq (toString .) $inherit -}}
{{- with $root.Values.terminationGracePeriodSeconds -}}
{{- with $root.Values.controllers.main.pod.terminationGracePeriodSeconds -}}
{{- $termSeconds = . -}}
{{- end -}}
{{- else -}}
@@ -172,7 +172,7 @@
{{- $secCont := dict -}}
{{- with $values.podSecurityContext -}}
{{- if eq (toString .) $inherit -}} {{/* If inherti is set, use the main podSecCont */}}
{{- with (include "ix.v1.common.container.podSecurityContext" (dict "podSecCont" $root.Values.podSecurityContext "root" $root "isJob" true) | trim) -}}
{{- with (include "ix.v1.common.container.podSecurityContext" (dict "podSecCont" $root.Values.controllers.main.pod.securityContext "root" $root "isJob" true) | trim) -}}
{{- $secCont = . -}}
{{- end -}}
{{- else -}} {{/* Otherwise use the job's podpodSecCont values */}}
@@ -189,7 +189,7 @@
{{/* Now render the actual values */}}
{{- if hasKey $values "hostNetwork" -}}
{{- if eq (toString $values.hostNetwork) $inherit }}
hostNetwork: {{ $root.Values.hostNetwork }}
hostNetwork: {{ $root.Values.controllers.main.pod.hostNetwork }}
{{- else if (kindIs "bool" $values.hostNetwork) }}
hostNetwork: {{ $values.hostNetwork }}
{{- end -}}
@@ -199,7 +199,7 @@ hostNetwork: false
{{- if hasKey $values "enableServiceLinks" -}}
{{- if eq (toString $values.enableServiceLinks) $inherit }}
enableServiceLinks: {{ $root.Values.enableServiceLinks }}
enableServiceLinks: {{ $root.Values.controllers.main.pod.enableServiceLinks }}
{{- else if (kindIs "bool" $values.enableServiceLinks) }}
enableServiceLinks: {{ $values.enableServiceLinks }}
{{- end -}}
@@ -4,7 +4,7 @@
{{- $job := .job -}}
{{- $default := $root.Values.globalDefaults.job -}}
{{- $controllerType := $root.Values.controller.type -}}
{{- $controllerType := $root.Values.controllers.main.type -}}
{{- include "ix.v1.common.validate.job" (dict "root" $root "job" $job) -}}
@@ -53,14 +53,21 @@
args:
{{- . | nindent 4 }}
{{- end -}}
{{- $secEnvs := dict -}}
{{- if hasKey $container "PUID" -}}
{{- $_ := set $secEnvs "PUID" $container.PUID -}}
{{- end -}}
{{- if hasKey $container "UMASK" -}}
{{- $_ := set $secEnvs "UMASK" $container.UMASK -}}
{{- end -}}
{{- with (include "ix.v1.common.container.envVars" (dict "envs" $container.env
"envList" $container.envList
"containerName" $name
"isMainContainer" false
"scaleGPU" $container.scaleGPU
"scaleGPU" $root.Values.scaleGPU
"nvidiaCaps" $container.nvidiaCaps
"secCont" $container.securityContext
"secEnvs" (dict "PUID" $container.PUID "UMASK" $container.UMASK)
"secEnvs" $secEnvs
"injectFixedEnvs" $container.injectFixedEnvs
"root" $root) | trim) }}
env:
@@ -40,14 +40,21 @@ So it can work on multiple places, like additional containers and not only the m
{{- with (include "ix.v1.common.container.termination.messagePolicy" (dict "msgPolicy" $values.termination.messagePolicy "root" $root)) | trim }}
terminationMessagePolicy: {{ . }}
{{- end -}}
{{- $secEnvs := dict -}}
{{- if hasKey $values "PUID" -}}
{{- $_ := set $secEnvs "PUID" $values.PUID -}}
{{- end -}}
{{- if hasKey $values "UMASK" -}}
{{- $_ := set $secEnvs "UMASK" $values.UMASK -}}
{{- end -}}
{{- with (include "ix.v1.common.container.envVars" (dict "envs" $values.env
"envList" $values.envList
"containerName" $name
"isMainContainer" true
"scaleGPU" $values.scaleGPU
"scaleGPU" $root.Values.scaleGPU
"nvidiaCaps" $values.nvidiaCaps
"secCont" $values.securityContext
"secEnvs" (dict "PUID" $values.PUID "UMASK" $values.UMASK)
"secEnvs" $secEnvs
"injectFixedEnvs" $values.injectFixedEnvs
"root" $root) | trim) }}
env:
@@ -57,7 +64,7 @@ So it can work on multiple places, like additional containers and not only the m
envFrom:
{{- . | nindent 4 }}
{{- end -}}
{{- with (include "ix.v1.common.container.ports" (dict "services" $values.service "root" $root) | trim) }}
{{- with (include "ix.v1.common.container.ports" (dict "services" $root.Values.service "root" $root) | trim) }}
ports:
{{- . | nindent 4 }}
{{- end -}}
@@ -67,14 +74,14 @@ So it can work on multiple places, like additional containers and not only the m
{{- . | nindent 4 }}
{{- end -}}
{{- with (include "ix.v1.common.container.probes" (dict "probes" $values.probes
"services" $values.service
"services" $root.Values.service
"containerName" $name
"isMainContainer" true
"root" $root) | trim) }}
{{- . | nindent 2 }}
{{- end -}}
{{- with (include "ix.v1.common.container.resources" (dict "resources" $values.resources
"gpu" $values.scaleGPU
"gpu" $root.Values.scaleGPU
"isMainContainer" true
"root" $root) | trim) }}
resources:
+14 -14
View File
@@ -3,44 +3,44 @@
{{- $root := . }}
{{- $values := fromYaml (tpl ($.Values | toYaml) $) }}
serviceAccountName: {{ (include "ix.v1.common.names.serviceAccountName" $root) }}
hostNetwork: {{ $values.hostNetwork }}
enableServiceLinks: {{ $values.enableServiceLinks }}
hostNetwork: {{ $values.controllers.main.pod.hostNetwork }}
enableServiceLinks: {{ $values.controllers.main.pod.enableServiceLinks }}
{{- with (include "ix.v1.common.restartPolicy" (dict "restartPolicy" $values.restartPolicy "root" $root) | trim) }}
restartPolicy: {{ . }}
{{- end -}}
{{- with $values.schedulerName }}
{{- with $values.controllers.main.pod.schedulerName }}
schedulerName: {{ . }}
{{- end -}}
{{- with $values.priorityClassName }}
{{- with $values.controllers.main.pod.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with $values.hostname }}
{{- with $values.controllers.main.pod.hostname }}
hostname: {{ . }}
{{- end -}}
{{- with (include "ix.v1.common.dnsPolicy" (dict "dnsPolicy" $values.dnsPolicy "hostNetwork" $values.hostNetwork "root" $root) | trim ) }}
{{- with (include "ix.v1.common.dnsPolicy" (dict "dnsPolicy" $values.controllers.main.pod.dnsPolicy "hostNetwork" $values.controllers.main.pod.hostNetwork "root" $root) | trim ) }}
dnsPolicy: {{ . }}
{{- end -}}
{{- with (include "ix.v1.common.dnsConfig" (dict "dnsPolicy" $values.dnsPolicy "dnsConfig" $values.dnsConfig "root" $root) | trim ) }}
{{- with (include "ix.v1.common.dnsConfig" (dict "dnsPolicy" $values.controllers.main.pod.dnsPolicy "dnsConfig" $values.controllers.main.pod.dnsConfig "root" $root) | trim ) }}
dnsConfig:
{{- . | nindent 2 }}
{{- end -}}
{{- with (include "ix.v1.common.hostAliases" (dict "hostAliases" $values.hostAliases "root" $root) | trim) }}
{{- with (include "ix.v1.common.hostAliases" (dict "hostAliases" $values.controllers.main.pod.hostAliases "root" $root) | trim) }}
hostAliases:
{{- . | nindent 2 }}
{{- end -}}
{{- with (include "ix.v1.common.nodeSelector" (dict "nodeSelector" $values.nodeSelector "root" $root) | trim) }}
{{- with (include "ix.v1.common.nodeSelector" (dict "nodeSelector" $values.controllers.main.pod.nodeSelector "root" $root) | trim) }}
nodeSelector:
{{- . | nindent 2 }}
{{- end -}}
{{- with (include "ix.v1.common.tolerations" (dict "tolerations" $values.tolerations "root" $root) | trim) }}
{{- with (include "ix.v1.common.tolerations" (dict "tolerations" $values.controllers.main.pod.tolerations "root" $root) | trim) }}
tolerations:
{{- . | nindent 2 }}
{{- end -}}
@@ -50,21 +50,21 @@ imagePullSecrets:
{{- . | nindent 2 }}
{{- end -}}
{{- with (include "ix.v1.common.runtimeClassName" (dict "root" $root "runtime" $values.runtimeClassName) | trim) }}
{{- with (include "ix.v1.common.runtimeClassName" (dict "root" $root "runtime" $values.controllers.main.pod.runtimeClassName) | trim) }}
runtimeClassName: {{ . }}
{{- end -}}
{{/* TODO: affinity, topologySpreadConstraints, not something critical as of now. */}}
{{- with $values.terminationGracePeriodSeconds }}
{{- with $values.controllers.main.pod.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ . }}
{{- end -}}
{{- with (include "ix.v1.common.container.podSecurityContext" (dict "podSecCont" $values.podSecurityContext "root" $root) | trim) }}
{{- with (include "ix.v1.common.container.podSecurityContext" (dict "podSecCont" $values.controllers.main.pod.securityContext "root" $root) | trim) }}
securityContext:
{{- . | nindent 2 }}
{{- end -}}
{{- with (include "ix.v1.common.controller.mainContainer" (dict "values" $values "root" $root) | trim) }}
{{- with (include "ix.v1.common.controller.mainContainer" (dict "values" $values.controllers.main.pod.containers.main "root" $root) | trim) }}
containers:
{{- . | nindent 2 }}
{{- with (include "ix.v1.common.controller.extraContainers" (dict "root" $root "containerList" $values.additionalContainers "type" "additional") | trim) }}
@@ -1,6 +1,6 @@
{{/* Returns Pod annotations */}}
{{- define "ix.v1.common.podAnnotations" -}}
{{- with .Values.podAnnotations -}}
{{- with .Values.controllers.main.pod.annotations -}}
{{- range $k, $v := . }}
{{ $k }}: {{ tpl $v $ }}
{{- end }}
@@ -1,6 +1,6 @@
{{/* Returns Pod labels */}}
{{- define "ix.v1.common.podLabels" -}}
{{- with .Values.podLabels -}}
{{- with .Values.controllers.main.pod.labels -}}
{{- range $k, $v := . }}
{{ $k }}: {{ tpl $v $ }}
{{- end }}
@@ -16,7 +16,7 @@
{{- fail (printf "Invalid <restartPolicy> (%s). Valid options are Always, Never, OnFailure" $policy) -}}
{{- end -}}
{{- if and (not $isJob) (mustHas $root.Values.controller.type (list "Deployment" "ReplicaSet" "DaemonSet" "StatefulSet")) -}}
{{- if and (not $isJob) (mustHas $root.Values.controllers.main.type (list "Deployment" "ReplicaSet" "DaemonSet" "StatefulSet")) -}}
{{- if and (ne $policy "Always") -}}
{{- fail (printf "Invalid <restartPolicy (%s). Valid option for Deployment, StatefulSet, DaemonSet and ReplicaSet is Always" $policy) -}}
{{- end -}}
@@ -8,7 +8,7 @@
{{- $runtimeName = . -}}
{{- end -}}
{{- if (mustHas $root.Values.controller.type (list "Job" "CronJob")) -}}
{{- if (mustHas $root.Values.controllers.main.type (list "Job" "CronJob")) -}}
{{- $isJob = false -}}
{{- end -}}
@@ -44,7 +44,7 @@
{{- $root := .root -}}
{{- $isJob := .isJob -}}
{{- if (mustHas $root.Values.controller.type (list "Job" "CronJob")) -}}
{{- if (mustHas $root.Values.controllers.main.type (list "Job" "CronJob")) -}}
{{- $isJob = false -}}
{{- end -}}
@@ -12,17 +12,17 @@
{{- include "ix.v1.common.spawner.configmapAndSecret" . | nindent 0 -}}
{{- if .Values.controller.enabled -}}
{{- if eq .Values.controller.type "Deployment" -}}
{{- if .Values.controllers.main.enabled -}}
{{- if eq .Values.controllers.main.type "Deployment" -}}
{{- include "ix.v1.common.deployment" . | nindent 0 -}}
{{- else if eq .Values.controller.type "DaemonSet" -}}
{{- else if eq .Values.controllers.main.type "DaemonSet" -}}
{{- include "ix.v1.common.daemonset" . | nindent 0 -}}
{{- else if eq .Values.controller.type "StatefulSet" -}}
{{- else if eq .Values.controllers.main.type "StatefulSet" -}}
{{- include "ix.v1.common.statefulset" . | nindent 0 -}}
{{- else if (mustHas .Values.controller.type (list "Job" "CronJob")) -}}
{{- else if (mustHas .Values.controllers.main.type (list "Job" "CronJob")) -}}
{{/* Pass, it will render from the spawner.jobAndCronJob bellow */}}
{{- else -}}
{{- fail (printf "Not a valid controller.type (%s). Valid options are Deployment, DaemonSet, StatefulSet, Job, CronJob" .Values.controller.type) -}}
{{- fail (printf "Not a valid controller.type (%s). Valid options are Deployment, DaemonSet, StatefulSet, Job, CronJob" .Values.controllers.main.type) -}}
{{- end -}}
{{- end -}}
@@ -8,25 +8,25 @@ apiVersion: {{ include "ix.v1.common.capabilities.daemonset.apiVersion" $ }}
kind: DaemonSet
metadata:
name: {{ include "ix.v1.common.names.fullname" . }}
{{- $labels := (mustMerge (default dict .Values.controller.labels) (include "ix.v1.common.labels" $ | fromYaml)) -}}
{{- $labels := (mustMerge (default dict .Values.controllers.main.labels) (include "ix.v1.common.labels" $ | fromYaml)) -}}
{{- with (include "ix.v1.common.util.labels.render" (dict "root" $ "labels" $labels) | trim) }}
labels:
{{- . | nindent 4 }}
{{- end }}
{{- $annotations := (mustMerge (default dict .Values.controller.annotations) (include "ix.v1.common.annotations" $ | fromYaml)) -}}
{{- $annotations := (mustMerge (default dict .Values.controllers.main.annotations) (include "ix.v1.common.annotations" $ | fromYaml)) -}}
{{- with (include "ix.v1.common.util.annotations.render" (dict "root" $ "annotations" $annotations) | trim) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit }}
{{- $strategy := default "RollingUpdate" .Values.controller.strategy -}}
revisionHistoryLimit: {{ .Values.controllers.main.revisionHistoryLimit }}
{{- $strategy := default "RollingUpdate" .Values.controllers.main.strategy -}}
{{- if not (mustHas $strategy (list "OnDelete" "RollingUpdate")) -}}
{{- fail (printf "Not a valid strategy type for DaemonSet (%s)" $strategy) -}}
{{- end }}
updateStrategy:
type: {{ $strategy }}
{{- $rollingUpdate := .Values.controller.rollingUpdate -}}
{{- $rollingUpdate := .Values.controllers.main.rollingUpdate -}}
{{- if and (eq $strategy "RollingUpdate") (or $rollingUpdate.surge $rollingUpdate.unavailable) }}
rollingUpdate:
{{- with $rollingUpdate.unavailable }}
@@ -8,26 +8,26 @@ apiVersion: {{ include "ix.v1.common.capabilities.deployment.apiVersion" $ }}
kind: Deployment
metadata:
name: {{ include "ix.v1.common.names.fullname" . }}
{{- $labels := (mustMerge (default dict .Values.controller.labels) (include "ix.v1.common.labels" $ | fromYaml)) -}}
{{- $labels := (mustMerge (default dict .Values.controllers.main.labels) (include "ix.v1.common.labels" $ | fromYaml)) -}}
{{- with (include "ix.v1.common.util.labels.render" (dict "root" $ "labels" $labels) | trim) }}
labels:
{{- . | nindent 4 }}
{{- end }}
{{- $annotations := (mustMerge (default dict .Values.controller.annotations) (include "ix.v1.common.annotations" $ | fromYaml)) -}}
{{- $annotations := (mustMerge (default dict .Values.controllers.main.annotations) (include "ix.v1.common.annotations" $ | fromYaml)) -}}
{{- with (include "ix.v1.common.util.annotations.render" (dict "root" $ "annotations" $annotations) | trim) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit }}
replicas: {{ .Values.controller.replicas }}
{{- $strategy := default "Recreate" .Values.controller.strategy -}}
revisionHistoryLimit: {{ .Values.controllers.main.revisionHistoryLimit }}
replicas: {{ .Values.controllers.main.replicas }}
{{- $strategy := default "Recreate" .Values.controllers.main.strategy -}}
{{- if not (mustHas $strategy (list "Recreate" "RollingUpdate")) -}}
{{- fail (printf "Not a valid strategy type for Deployment (%s)" $strategy) -}}
{{- end }}
strategy:
type: {{ $strategy }}
{{- $rollingUpdate := .Values.controller.rollingUpdate -}}
{{- $rollingUpdate := .Values.controllers.main.rollingUpdate -}}
{{- if and (eq $strategy "RollingUpdate") (or $rollingUpdate.surge $rollingUpdate.unavailable) }}
rollingUpdate:
{{- with $rollingUpdate.unavailable }}
@@ -8,27 +8,27 @@ apiVersion: {{ include "ix.v1.common.capabilities.statefulset.apiVersion" $ }}
kind: StatefulSet
metadata:
name: {{ include "ix.v1.common.names.fullname" . }}
{{- $labels := (mustMerge (default dict .Values.controller.labels) (include "ix.v1.common.labels" $ | fromYaml)) -}}
{{- $labels := (mustMerge (default dict .Values.controllers.main.labels) (include "ix.v1.common.labels" $ | fromYaml)) -}}
{{- with (include "ix.v1.common.util.labels.render" (dict "root" $ "labels" $labels) | trim) }}
labels:
{{- . | nindent 4 }}
{{- end }}
{{- $annotations := (mustMerge (default dict .Values.controller.annotations) (include "ix.v1.common.annotations" $ | fromYaml)) -}}
{{- $annotations := (mustMerge (default dict .Values.controllers.main.annotations) (include "ix.v1.common.annotations" $ | fromYaml)) -}}
{{- with (include "ix.v1.common.util.annotations.render" (dict "root" $ "annotations" $annotations) | trim) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit }}
replicas: {{ .Values.controller.replicas }}
revisionHistoryLimit: {{ .Values.controllers.main.revisionHistoryLimit }}
replicas: {{ .Values.controllers.main.replicas }}
serviceName: {{ include "ix.v1.common.names.fullname" . }}
{{- $strategy := default "RollingUpdate" .Values.controller.strategy -}}
{{- $strategy := default "RollingUpdate" .Values.controllers.main.strategy -}}
{{- if not (mustHas $strategy (list "OnDelete" "RollingUpdate")) -}}
{{- fail (printf "Not a valid strategy type for StatefulSet (%s)" $strategy) -}}
{{- end }}
updateStrategy:
type: {{ $strategy }}
{{- $rollingUpdate := .Values.controller.rollingUpdate -}}
{{- $rollingUpdate := .Values.controllers.main.rollingUpdate -}}
{{- if and (eq $strategy "RollingUpdate") (or $rollingUpdate.partition $rollingUpdate.unavailable) }}
rollingUpdate:
{{- with $rollingUpdate.unavailable }}
@@ -1,15 +1,15 @@
{{- define "ix.v1.common.spawner.jobAndCronJob" -}}
{{- $jobs := dict -}}
{{- if mustHas .Values.controller.type (list "Job" "CronJob") -}}
{{- if mustHas .Values.controllers.main.type (list "Job" "CronJob") -}}
{{- $jobValues := dict -}}
{{/* Controller holds Job/CronJob Configuration */}}
{{- $jobValues = (mustDeepCopy $.Values.controller) -}}
{{- $jobValues = (mustDeepCopy $.Values.controllers.main) -}}
{{/* If it's CronJob prepare the cron dict with enabled forced */}}
{{- if eq $.Values.controller.type "CronJob" -}}
{{- $_ := set $jobValues "cron" (mustDeepCopy $.Values.controller) -}}
{{- if eq $.Values.controllers.main.type "CronJob" -}}
{{- $_ := set $jobValues "cron" (mustDeepCopy $.Values.controllers.main) -}}
{{- $_ := set $jobValues.cron "enabled" true -}}
{{- end -}}
@@ -25,8 +25,8 @@
{{/* Add labels/annotations if any. */}}
{{- range $key := (list "labels" "annotations") -}}
{{- if hasKey $.Values.controller $key -}}
{{- $_ := set $jobValues $key (get $.Values.controller $key) -}}
{{- if hasKey $.Values.controllers.main $key -}}
{{- $_ := set $jobValues $key (get $.Values.controllers.main $key) -}}
{{- end -}}
{{- end -}}
+134 -162
View File
@@ -27,8 +27,6 @@ globalDefaults:
portProtocol: TCP
# Define the minimum NodePort
minimumNodePort: 9000
# If not defined on the pod, assume this
dnsPolicy: ClusterFirst
# If no service Type is defined, assume this
serviceType: ClusterIP
# If no PVC Size is defined, assume this
@@ -120,15 +118,8 @@ globalDefaults:
successfulJobsHistoryLimit: 3
backoffLimit: 6
completionMode: NonIndexed
# Defines the timezone for the container
TZ: UTC
# Default PUID
PUID: 568
# Default UMASK
UMASK: "002"
# If not defined on the pod, assume this
dnsPolicy: ClusterFirst
# Defines image info
image:
@@ -136,69 +127,147 @@ image:
tag: tag
pullPolicy: IfNotPresent
# Defines the image that will be used
imageSelector: ""
controllers:
# Defines the controller
main:
# -- Enable the controller.
enabled: true
# -- Set the controller as primary.
primary: true
# Valid options are: Deployment | DaemonSet | StatefulSet | CronJob | Job
type: Deployment
# -- Set labels on the Deployment/StatefulSet/DaemonSet/CronJob/Job. Helm templates can be used.
labels: {}
# -- Set annotations on the Deployment/StatefulSet/DaemonSet. Helm templates can be used.
annotations: {}
# -- Revision history limit
revisionHistoryLimit: 3
# -- Number of desired pods
replicas: 1
# For Deployments, valid values are Recreate (default) and RollingUpdate.
# For StatefulSets, valid values are OnDelete and RollingUpdate (default).
# DaemonSets ignore this.
strategy: ""
# -- Set rollingUpdate strategies
rollingUpdate:
# -- Set Deployment RollingUpdate max unavailable
unavailable:
# -- Set Deployment RollingUpdate max surge
surge:
# -- Set StatefulSet RollingUpdate partition
partition:
pod:
labels: {}
annotations: {}
# Overrides the name of the workload
nameOverride: ""
# Overrides the fullname of the workload
fullnameOverride: ""
# Defines the scheduler
schedulerName: ""
# Defines the nodeSelector(s)
nodeSelector: {}
# Defines the runtimeClassName
runtimeClassName: ""
# Defines the priorityClassName
priorityClassName: ""
# Define the default hostname of the Deployment/StatefulSet/DaemonSet/etc
hostname: ""
# Adds hosts to /etc/hosts
hostAliases: []
# Binds to host network
hostNetwork: false
# Disables services links
enableServiceLinks: false
# Tolerations
tolerations: []
# Defines termination strategy
terminationGracePeriodSeconds: 10
# Default podSecurityContext for main pod
securityContext:
fsGroup: 568
supplementalGroups: []
fsGroupChangePolicy: OnRootMismatch
# Defines the DNS Config
dnsConfig: {}
# Defines the DNS Policy
dnsPolicy: ""
containers:
main:
enabled: true
primary: true
# Defines the image that will be used
imageSelector: ""
# -- [command-args](docs/common/values/command-args.md)
# Overrides the default entrypoint
command: []
# Overrides the default args
args: []
# Appends to args
extraArgs: []
termination:
messagePath: ""
messagePolicy: ""
# -- [environment-variables](docs/common/values/environment-variables.md)
# Defines environment variables
env: {}
# SCALE / GUI Focused
envList: []
# Defines the environment variables from a secret or configmap
envFrom: []
# Nvidia Caps will be assigned via environment variable
# If empty, global defaults will be used
nvidiaCaps: []
stdin: false
tty: false
# Defines lifecycle hooks
lifecycle: {}
# Defines the probes
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
# Default securityContext for main container
securityContext:
runAsNonRoot: true
runAsUser: 568
runAsGroup: 568
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
privileged: false
capabilities:
add: []
drop:
- ALL
# Default resources for main container
resources:
limits:
cpu: 4000m
memory: 8Gi
requests:
cpu: 10m
memory: 50Mi
# Values that will be exposed to UI
# Defines the timezone for the container
TZ: UTC
# Default PUID
PUID: 568
# Default UMASK
UMASK: "002"
# Defines the imagePullSecrets
imagePullCredentials: []
# -- [command-args](docs/common/values/command-args.md)
# Overrides the default entrypoint
command: []
# Overrides the default args
args: []
# Appends to args
extraArgs: []
# -- [environment-variables](docs/common/values/environment-variables.md)
# Defines environment variables
env: {}
# SCALE / GUI Focused
envList: []
# Defines the environment variables from a secret or configmap
envFrom: []
# Nvidia Caps will be assigned via environment variable
# If empty, global defaults will be used
nvidiaCaps: []
# -- [configmap](docs/common/values/configmap.md)
configmap: {}
# -- [secret](docs/common/values/secret.md)
secret: {}
# Define the default hostname of the Deployment/StatefulSet/DaemonSet/etc
hostname: ""
# Overrides the name of the workload
nameOverride: ""
# Overrides the fullname of the workload
fullnameOverride: ""
stdin: false
tty: false
# Adds hosts to /etc/hosts
hostAliases: []
# Binds to host network
hostNetwork: false
# Disables services links
enableServiceLinks: false
# Defines the DNS Policy
dnsPolicy: ""
# Defines the DNS Config
dnsConfig: {}
# Tolerations
tolerations: []
# Creates a service account
serviceAccount:
main:
@@ -214,38 +283,15 @@ rbac:
primary: true
clusterWide: false
# Defines lifecycle hooks
lifecycle: {}
# Used for SCALE / GUI Focused
scaleGPU: {}
# Adds annotations to the pod
podAnnotations: {}
# Adds annotations to the service
addAnnotations:
traefik: false
metallb: false
# Adds labels to the pod
podLabels: {}
# Used for SCALE
scaleCerts: {}
# Used for SCALE / GUI Focused
scaleCertsList: []
# Defines the probes
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
portal:
enabled: true
@@ -257,81 +303,6 @@ ixExternalInterfacesConfiguration: []
# Injected from middleware
ixExternalInterfacesConfigurationNames: []
# Defines termination strategy
terminationGracePeriodSeconds: 10
termination:
messagePath: ""
messagePolicy: ""
# Defines the scheduler
schedulerName: ""
# Defines the nodeSelector(s)
nodeSelector: {}
# Defines the runtimeClassName
runtimeClassName: ""
# Defines the priorityClassName
priorityClassName: ""
# Defines the controller
controller:
# -- Enable the controller.
enabled: true
# -- Set the controller type.
# Valid options are: Deployment | DaemonSet | StatefulSet | CronJob | Job
type: Deployment
# -- Set labels on the Deployment/StatefulSet/DaemonSet/CronJob/Job. Helm templates can be used.
labels: {}
# -- Set annotations on the Deployment/StatefulSet/DaemonSet. Helm templates can be used.
annotations: {}
# -- Revision history limit
revisionHistoryLimit: 3
# -- Number of desired pods
replicas: 1
# -- Set the controller upgrade strategy
# For Deployments, valid values are Recreate (default) and RollingUpdate.
# For StatefulSets, valid values are OnDelete and RollingUpdate (default).
# DaemonSets ignore this.
strategy: ""
# -- Set rollingUpdate strategies
rollingUpdate:
# -- Set Deployment RollingUpdate max unavailable
unavailable:
# -- Set Deployment RollingUpdate max surge
surge:
# -- Set StatefulSet RollingUpdate partition
partition:
# -- Bellow values are needed (in addition to the default global)
# as those are being referenced on other places in values.yaml sometimes
# Default podSecurityContext for main pod
podSecurityContext:
fsGroup: 568
supplementalGroups: []
fsGroupChangePolicy: OnRootMismatch
# Default securityContext for main container
securityContext:
runAsNonRoot: true
runAsUser: 568
runAsGroup: 568
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
privileged: false
capabilities:
add: []
drop:
- ALL
# Default resources for main container
resources:
limits:
cpu: 4000m
memory: 8Gi
requests:
cpu: 10m
memory: 50Mi
# TODO: Discuss if we are going to add defaults like:
# - /dev/shm
persistence:
@@ -370,6 +341,7 @@ ixCertificates: []
# Injected from middleware
ixVolumes: []
deviceList: []
# -- Configure the services for the chart here.
# Additional services can be added by adding a dictionary key similar to the 'main' service.
# @default -- See below