diff --git a/library/common-test/tests/cronjob_standalone/annotations_test.yaml b/library/common-test/tests/cronjob_standalone/annotations_test.yaml index d9f0658a62..284d6d3519 100644 --- a/library/common-test/tests/cronjob_standalone/annotations_test.yaml +++ b/library/common-test/tests/cronjob_standalone/annotations_test.yaml @@ -5,9 +5,10 @@ tests: - it: should pass with default values documentIndex: &cronJobDoc 2 set: - controller: - type: CronJob - schedule: "*/1 * * * *" + controllers: + main: + type: CronJob + schedule: "*/1 * * * *" asserts: - hasDocuments: count: 3 @@ -20,12 +21,13 @@ tests: documentIndex: *cronJobDoc set: some_key: some_value - controller: - type: CronJob - schedule: "*/1 * * * *" - annotations: - controller_key: controller_value - controller_key2: "{{ .Values.some_key }}" + controllers: + main: + type: CronJob + schedule: "*/1 * * * *" + annotations: + controller_key: controller_value + controller_key2: "{{ .Values.some_key }}" global: annotations: global_key: global_value @@ -44,13 +46,15 @@ tests: - it: should pass with podAnnotations set documentIndex: *cronJobDoc set: - controller: - type: CronJob - schedule: "*/1 * * * *" some_key: some_value2 - podAnnotations: - test: some_value - test2: "{{ .Values.some_key }}" + controllers: + main: + type: CronJob + schedule: "*/1 * * * *" + pod: + annotations: + test: some_value + test2: "{{ .Values.some_key }}" asserts: - isSubset: path: metadata.annotations diff --git a/library/common-test/tests/cronjob_standalone/controller_test.yaml b/library/common-test/tests/cronjob_standalone/controller_test.yaml index 9caadb0061..7575978b99 100644 --- a/library/common-test/tests/cronjob_standalone/controller_test.yaml +++ b/library/common-test/tests/cronjob_standalone/controller_test.yaml @@ -1,13 +1,14 @@ -suite: cronjob strategy test +suite: cronjob controller test templates: - common.yaml tests: - it: should pass with strategy changed in cronjob documentIndex: &cronJobDoc 2 set: - controller: - type: CronJob - schedule: "* * * * *" + controllers: + main: + type: CronJob + schedule: "* * * * *" asserts: - hasDocuments: count: 3 @@ -17,20 +18,21 @@ tests: - it: should pass with job options changed in cronJob documentIndex: *cronJobDoc set: - controller: - type: CronJob - backoffLimit: 11 - ttlSecondsAfterFinished: 22 - activeDeadlineSeconds: 33 - parallelism: 44 - completions: 55 - completionMode: Indexed - schedule: "* * * * *" - concurrencyPolicy: Allow - failedJobsHistoryLimit: 7 - successfulJobsHistoryLimit: 11 - timezone: "America/New_York" - startingDeadlineSeconds: 13 + controllers: + main: + type: CronJob + backoffLimit: 11 + ttlSecondsAfterFinished: 22 + activeDeadlineSeconds: 33 + parallelism: 44 + completions: 55 + completionMode: Indexed + schedule: "* * * * *" + concurrencyPolicy: Allow + failedJobsHistoryLimit: 7 + successfulJobsHistoryLimit: 11 + timezone: "America/New_York" + startingDeadlineSeconds: 13 asserts: - isSubset: path: spec diff --git a/library/common-test/tests/cronjob_standalone/default_test.yaml b/library/common-test/tests/cronjob_standalone/default_test.yaml index f2358b8828..11a16770bf 100644 --- a/library/common-test/tests/cronjob_standalone/default_test.yaml +++ b/library/common-test/tests/cronjob_standalone/default_test.yaml @@ -5,9 +5,10 @@ tests: - it: should pass with controller set to CronJob documentIndex: &cronjobDoc 2 set: - controller: - type: CronJob - schedule: "*/5 * * * *" + controllers: + main: + type: CronJob + schedule: "*/5 * * * *" asserts: - hasDocuments: count: 3 @@ -63,8 +64,9 @@ tests: path: spec.jobTemplate.spec.template.spec.priorityClassName - isNull: path: spec.jobTemplate.spec.template.spec.hostname - - isNull: + - equal: path: spec.jobTemplate.spec.template.spec.dnsPolicy + value: ClusterFirst - isNull: path: spec.jobTemplate.spec.template.spec.dnsConfig - isNull: diff --git a/library/common-test/tests/cronjob_standalone/generic_test.yaml b/library/common-test/tests/cronjob_standalone/generic_test.yaml index 7c77f937c0..e1b49df3bf 100644 --- a/library/common-test/tests/cronjob_standalone/generic_test.yaml +++ b/library/common-test/tests/cronjob_standalone/generic_test.yaml @@ -5,9 +5,10 @@ tests: - it: should pass with controller set to CronJob documentIndex: &cronjobDoc 2 set: - controller: - type: CronJob - schedule: "*/5 * * * *" + controllers: + main: + type: CronJob + schedule: "*/5 * * * *" asserts: - hasDocuments: count: 3 @@ -19,9 +20,32 @@ tests: - it: should pass with podSecurityContext changed documentIndex: *cronjobDoc set: - controller: - type: CronJob - schedule: "* * * * *" + controllers: + main: + type: CronJob + schedule: "* * * * *" + pod: + securityContext: + fsGroup: 0 + fsGroupChangePolicy: Always + supplementalGroups: + - 1000 + asserts: + - equal: + path: spec.jobTemplate.spec.template.spec.securityContext + value: + fsGroup: 0 + fsGroupChangePolicy: Always + supplementalGroups: + - 1000 + + - it: should pass with podSecurityContext changed from the default + documentIndex: *cronjobDoc + set: + controllers: + main: + type: CronJob + schedule: "* * * * *" podSecurityContext: fsGroup: 0 fsGroupChangePolicy: Always @@ -36,13 +60,45 @@ tests: supplementalGroups: - 1000 - - - it: should pass with podSecurityContext changed + - it: should pass with securityContext changed documentIndex: *cronjobDoc set: - controller: - type: CronJob - schedule: "* * * * *" + controllers: + main: + type: CronJob + schedule: "* * * * *" + pod: + containers: + main: + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + capabilities: + add: + - something + asserts: + - equal: + path: spec.jobTemplate.spec.template.spec.containers[0].securityContext + value: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + capabilities: + add: + - something + drop: + - ALL + + - it: should pass with securityContext changed from the default + documentIndex: *cronjobDoc + set: + controllers: + main: + type: CronJob + schedule: "* * * * *" securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -68,16 +124,20 @@ tests: - it: should pass with multiple envs defined via tpl documentIndex: *cronjobDoc set: - controller: - type: CronJob - schedule: "* * * * *" + controllers: + main: + type: CronJob + schedule: "* * * * *" + pod: + containers: + main: + env: + ENVVAR: "{{ .Values.some_string }}" + ENVVAR2: "{{ .Values.some_int }}" + ENVVAR3: "{{ .Values.some_bool }}" some_string: a_string some_int: 123 some_bool: false - env: - ENVVAR: "{{ .Values.some_string }}" - ENVVAR2: "{{ .Values.some_int }}" - ENVVAR3: "{{ .Values.some_bool }}" asserts: - equal: path: spec.jobTemplate.spec.template.spec.containers[0].env @@ -102,9 +162,10 @@ tests: - it: should pass with addNvidiaRuntimeClass and nvidiaRuntimeClassName set documentIndex: *cronjobDoc set: - controller: - type: CronJob - schedule: "* * * * *" + controllers: + main: + type: CronJob + schedule: "* * * * *" scaleGPU: something: blabla global: @@ -119,9 +180,10 @@ tests: - it: should pass with deviceList set documentIndex: *cronjobDoc set: - controller: - type: CronJob - schedule: "* * * * *" + controllers: + main: + type: CronJob + schedule: "* * * * *" deviceList: - enabled: true hostPath: /dev/usb @@ -141,9 +203,10 @@ tests: - it: should pass with added persistence documentIndex: &cronjobDoc 3 set: - controller: - type: CronJob - schedule: "* * * * *" + controllers: + main: + type: CronJob + schedule: "* * * * *" persistence: volume0: type: pvc diff --git a/library/common-test/tests/cronjob_standalone/names_test.yaml b/library/common-test/tests/cronjob_standalone/names_test.yaml index 88654546c7..8e04d0f387 100644 --- a/library/common-test/tests/cronjob_standalone/names_test.yaml +++ b/library/common-test/tests/cronjob_standalone/names_test.yaml @@ -23,11 +23,11 @@ tests: controller: type: CronJob schedule: "* * * * *" - nameOverride: overrodeName + nameOverride: overrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-overrodeName + value: RELEASE-NAME-overrodename - it: should pass with global.nameOverride documentIndex: *cronjobDoc @@ -35,10 +35,10 @@ tests: controller: type: CronJob schedule: "* * * * *" - nameOverride: overrodeName + nameOverride: overrodename global: - nameOverride: globalOverrodeName + nameOverride: globaloverrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-globalOverrodeName + value: RELEASE-NAME-globaloverrodename diff --git a/library/common-test/tests/daemonset/annotations_test.yaml b/library/common-test/tests/daemonset/annotations_test.yaml index 501bbd0550..dfcb231298 100644 --- a/library/common-test/tests/daemonset/annotations_test.yaml +++ b/library/common-test/tests/daemonset/annotations_test.yaml @@ -5,7 +5,9 @@ tests: - it: should pass with default values documentIndex: &daemonsetDoc 0 set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet asserts: - hasDocuments: count: 3 @@ -20,12 +22,13 @@ tests: - it: should pass with controller and global annotations documentIndex: *daemonsetDoc set: - controller.type: DaemonSet some_key: some_value - controller: - annotations: - controller_key: controller_value - controller_key2: "{{ .Values.some_key }}" + controllers: + main: + type: DaemonSet + annotations: + controller_key: controller_value + controller_key2: "{{ .Values.some_key }}" global: annotations: global_key: global_value @@ -47,11 +50,14 @@ tests: - it: should pass with podAnnotations set documentIndex: *daemonsetDoc set: - controller.type: DaemonSet some_key: some_value2 - podAnnotations: - test: some_value - test2: "{{ .Values.some_key }}" + controllers: + main: + type: DaemonSet + pod: + annotations: + test: some_value + test2: "{{ .Values.some_key }}" asserts: - isSubset: path: spec.template.metadata.annotations diff --git a/library/common-test/tests/daemonset/controller_test.yaml b/library/common-test/tests/daemonset/controller_test.yaml index 82b9de35f0..05e49b57b3 100644 --- a/library/common-test/tests/daemonset/controller_test.yaml +++ b/library/common-test/tests/daemonset/controller_test.yaml @@ -5,12 +5,13 @@ tests: - it: should pass with strategy changed in DaemonSet documentIndex: &dameonsetDoc 0 set: - controller: - type: DaemonSet - strategy: OnDelete - rollingUpdate: - surge: 5 - unavailable: 6 + controllers: + main: + type: DaemonSet + strategy: OnDelete + rollingUpdate: + surge: 5 + unavailable: 6 asserts: - hasDocuments: count: 3 @@ -26,12 +27,13 @@ tests: - it: should pass with strategy changed in DaemonSet documentIndex: *dameonsetDoc set: - controller: - type: DaemonSet - strategy: RollingUpdate - rollingUpdate: - surge: 5 - unavailable: 6 + controllers: + main: + type: DaemonSet + strategy: RollingUpdate + rollingUpdate: + surge: 5 + unavailable: 6 asserts: - equal: path: spec.updateStrategy @@ -44,9 +46,10 @@ tests: - it: should fail with wrong strategy documentIndex: *dameonsetDoc set: - controller: - type: DaemonSet - strategy: not_valid_strategy + controllers: + main: + type: DaemonSet + strategy: not_valid_strategy asserts: - failedTemplate: errorMessage: Not a valid strategy type for DaemonSet (not_valid_strategy) @@ -54,9 +57,10 @@ tests: - it: should pass with revisionHistoryLimit changed documentIndex: *dameonsetDoc set: - controller: - type: DaemonSet - revisionHistoryLimit: 1 + controllers: + main: + type: DaemonSet + revisionHistoryLimit: 1 asserts: - equal: path: spec.revisionHistoryLimit diff --git a/library/common-test/tests/daemonset/default_test.yaml b/library/common-test/tests/daemonset/default_test.yaml index 92a6fb82ef..e8638b18e5 100644 --- a/library/common-test/tests/daemonset/default_test.yaml +++ b/library/common-test/tests/daemonset/default_test.yaml @@ -5,7 +5,9 @@ tests: - it: should pass with controller set to DaemonSet documentIndex: &daemonsetDoc 0 set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet asserts: - hasDocuments: count: 3 diff --git a/library/common-test/tests/daemonset/generic_test.yaml b/library/common-test/tests/daemonset/generic_test.yaml index d87864f06c..dbbcaef637 100644 --- a/library/common-test/tests/daemonset/generic_test.yaml +++ b/library/common-test/tests/daemonset/generic_test.yaml @@ -5,7 +5,9 @@ tests: - it: should pass with controller set to DaemonSet documentIndex: &daemonsetDoc 0 set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet asserts: - hasDocuments: count: 3 @@ -14,11 +16,33 @@ tests: - isAPIVersion: of: apps/v1 - - it: should pass with podSecurityContext changed documentIndex: *daemonsetDoc set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet + pod: + securityContext: + fsGroup: 0 + fsGroupChangePolicy: Always + supplementalGroups: + - 1000 + asserts: + - equal: + path: spec.template.spec.securityContext + value: + fsGroup: 0 + fsGroupChangePolicy: Always + supplementalGroups: + - 1000 + + - it: should pass with podSecurityContext changed from default + documentIndex: *daemonsetDoc + set: + controllers: + main: + type: DaemonSet podSecurityContext: fsGroup: 0 fsGroupChangePolicy: Always @@ -33,10 +57,43 @@ tests: supplementalGroups: - 1000 + - it: should pass with podSecurityContext changed from default + documentIndex: *daemonsetDoc + set: + controllers: + main: + type: DaemonSet + pod: + containers: + main: + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + capabilities: + add: + - something + asserts: + - equal: + path: spec.template.spec.containers[0].securityContext + value: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + capabilities: + add: + - something + drop: + - ALL + - it: should pass with podSecurityContext changed documentIndex: *daemonsetDoc set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -62,14 +119,19 @@ tests: - it: should pass with multiple envs defined via tpl documentIndex: *daemonsetDoc set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet + pod: + containers: + main: + env: + ENVVAR: "{{ .Values.some_string }}" + ENVVAR2: "{{ .Values.some_int }}" + ENVVAR3: "{{ .Values.some_bool }}" some_string: a_string some_int: 123 some_bool: false - env: - ENVVAR: "{{ .Values.some_string }}" - ENVVAR2: "{{ .Values.some_int }}" - ENVVAR3: "{{ .Values.some_bool }}" asserts: - equal: path: spec.template.spec.containers[0].env @@ -94,7 +156,9 @@ tests: - it: should pass with image defined in init containers documentIndex: *daemonsetDoc set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet image: repository: some-repo tag: some-tag @@ -135,7 +199,9 @@ tests: - it: should pass with added persistence documentIndex: *daemonsetDoc set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet persistence: volume0: type: pvc diff --git a/library/common-test/tests/daemonset/label_test.yaml b/library/common-test/tests/daemonset/label_test.yaml index 7311d4d702..1c8bb71a18 100644 --- a/library/common-test/tests/daemonset/label_test.yaml +++ b/library/common-test/tests/daemonset/label_test.yaml @@ -7,7 +7,9 @@ tests: - it: should pass with default values documentIndex: &daemonsetDoc 0 set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet asserts: - hasDocuments: count: 3 @@ -35,12 +37,13 @@ tests: - it: should pass with controller and global labels documentIndex: *daemonsetDoc set: - controller.type: DaemonSet some_key: some_value - controller: - labels: - controller_key: controller_value - controller_key2: "{{ .Values.some_key }}" + controllers: + main: + type: DaemonSet + labels: + controller_key: controller_value + controller_key2: "{{ .Values.some_key }}" global: labels: global_key: global_value @@ -65,11 +68,14 @@ tests: - it: should pass with podLabels set documentIndex: *daemonsetDoc set: - controller.type: DaemonSet some_key: some_value2 - podLabels: - test: some_value - test2: "{{ .Values.some_key }}" + controllers: + main: + type: DaemonSet + pod: + labels: + test: some_value + test2: "{{ .Values.some_key }}" asserts: - equal: path: spec.template.metadata.labels.test2 diff --git a/library/common-test/tests/daemonset/names_test.yaml b/library/common-test/tests/daemonset/names_test.yaml index 54153b0a38..c12f284f99 100644 --- a/library/common-test/tests/daemonset/names_test.yaml +++ b/library/common-test/tests/daemonset/names_test.yaml @@ -5,7 +5,9 @@ tests: - it: should pass with default values documentIndex: &daemonsetDoc 0 set: - controller.type: DaemonSet + controllers: + main: + type: DaemonSet asserts: - hasDocuments: count: 3 @@ -18,21 +20,25 @@ tests: - it: should pass with nameOverride documentIndex: *daemonsetDoc set: - controller.type: DaemonSet - nameOverride: overrodeName + controllers: + main: + type: DaemonSet + nameOverride: overrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-overrodeName + value: RELEASE-NAME-overrodename - it: should pass with global.nameOverride documentIndex: *daemonsetDoc set: - controller.type: DaemonSet - nameOverride: overrodeName + controllers: + main: + type: DaemonSet + nameOverride: overrodename global: - nameOverride: globalOverrodeName + nameOverride: globaloverrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-globalOverrodeName + value: RELEASE-NAME-globaloverrodename diff --git a/library/common-test/tests/deployment/annotation_test.yaml b/library/common-test/tests/deployment/annotation_test.yaml index 60047704f5..d790584f86 100644 --- a/library/common-test/tests/deployment/annotation_test.yaml +++ b/library/common-test/tests/deployment/annotation_test.yaml @@ -19,10 +19,11 @@ tests: documentIndex: *deploymentDoc set: some_key: some_value - controller: - annotations: - controller_key: controller_value - controller_key2: "{{ .Values.some_key }}" + controllers: + main: + annotations: + controller_key: controller_value + controller_key2: "{{ .Values.some_key }}" global: annotations: global_key: global_value @@ -45,9 +46,12 @@ tests: documentIndex: *deploymentDoc set: some_key: some_value2 - podAnnotations: - test: some_value - test2: "{{ .Values.some_key }}" + controllers: + main: + pod: + annotations: + test: some_value + test2: "{{ .Values.some_key }}" asserts: - isSubset: path: spec.template.metadata.annotations diff --git a/library/common-test/tests/deployment/controller_test.yaml b/library/common-test/tests/deployment/controller_test.yaml index f7cfa02139..3ba948a06a 100644 --- a/library/common-test/tests/deployment/controller_test.yaml +++ b/library/common-test/tests/deployment/controller_test.yaml @@ -27,8 +27,9 @@ tests: - it: should pass with controller disabled documentIndex: *deploymentDoc set: - controller: - enabled: false + controllers: + main: + enabled: false asserts: - hasDocuments: count: 2 @@ -36,11 +37,12 @@ tests: - it: should pass with controller strategy changed and rollingUpdate strategies set documentIndex: *deploymentDoc set: - controller: - strategy: RollingUpdate - rollingUpdate: - unavailable: 2 - surge: 3 + controllers: + main: + strategy: RollingUpdate + rollingUpdate: + unavailable: 2 + surge: 3 asserts: - equal: path: spec.strategy.type @@ -54,8 +56,9 @@ tests: - it: should pass with controller strategy changed documentIndex: *deploymentDoc set: - controller: - strategy: RollingUpdate + controllers: + main: + strategy: RollingUpdate asserts: - equal: path: spec.strategy.type @@ -65,16 +68,18 @@ tests: - it: should fail with wrong controller set: - controller: - type: not_valid_controller + controllers: + main: + type: not_valid_controller asserts: - failedTemplate: errorMessage: Not a valid controller.type (not_valid_controller). Valid options are Deployment, DaemonSet, StatefulSet, Job, CronJob - it: should fail with wrong strategy set: - controller: - strategy: not_valid_strategy + controllers: + main: + strategy: not_valid_strategy asserts: - failedTemplate: errorMessage: Not a valid strategy type for Deployment (not_valid_strategy) @@ -82,8 +87,9 @@ tests: - it: should pass with revisionHistoryLimit changed documentIndex: *deploymentDoc set: - controller: - revisionHistoryLimit: 1 + controllers: + main: + revisionHistoryLimit: 1 asserts: - equal: path: spec.revisionHistoryLimit @@ -92,8 +98,9 @@ tests: - it: should pass with replicas changed documentIndex: *deploymentDoc set: - controller: - replicas: 6 + controllers: + main: + replicas: 6 asserts: - equal: path: spec.replicas diff --git a/library/common-test/tests/deployment/names_test.yaml b/library/common-test/tests/deployment/names_test.yaml index 8c220ae69b..a626c68f8b 100644 --- a/library/common-test/tests/deployment/names_test.yaml +++ b/library/common-test/tests/deployment/names_test.yaml @@ -16,19 +16,19 @@ tests: - it: should pass with nameOverride documentIndex: *deploymentDoc set: - nameOverride: overrodeName + nameOverride: overrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-overrodeName + value: RELEASE-NAME-overrodename - it: should pass with global.nameOverride documentIndex: *deploymentDoc set: - nameOverride: overrodeName + nameOverride: overrodename global: - nameOverride: globalOverrodeName + nameOverride: globaloverrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-globalOverrodeName + value: RELEASE-NAME-globaloverrodename diff --git a/library/common-test/tests/job_standalone/names_test.yaml b/library/common-test/tests/job_standalone/names_test.yaml index 75696ccea4..18fc7a3b14 100644 --- a/library/common-test/tests/job_standalone/names_test.yaml +++ b/library/common-test/tests/job_standalone/names_test.yaml @@ -19,20 +19,20 @@ tests: documentIndex: *jobDoc set: controller.type: Job - nameOverride: overrodeName + nameOverride: overrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-overrodeName + value: RELEASE-NAME-overrodename - it: should pass with global.nameOverride documentIndex: *jobDoc set: controller.type: Job - nameOverride: overrodeName + nameOverride: overrodename global: - nameOverride: globalOverrodeName + nameOverride: globaloverrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-globalOverrodeName + value: RELEASE-NAME-globaloverrodename diff --git a/library/common-test/tests/statefulset/names_test.yaml b/library/common-test/tests/statefulset/names_test.yaml index fa013ee645..ecff8151a6 100644 --- a/library/common-test/tests/statefulset/names_test.yaml +++ b/library/common-test/tests/statefulset/names_test.yaml @@ -19,20 +19,20 @@ tests: documentIndex: *statefulsetDoc set: controller.type: StatefulSet - nameOverride: overrodeName + nameOverride: overrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-overrodeName + value: RELEASE-NAME-overrodename - it: should pass with global.nameOverride documentIndex: *statefulsetDoc set: controller.type: StatefulSet - nameOverride: overrodeName + nameOverride: overrodename global: - nameOverride: globalOverrodeName + nameOverride: globaloverrodename asserts: - equal: path: metadata.name - value: RELEASE-NAME-globalOverrodeName + value: RELEASE-NAME-globaloverrodename diff --git a/library/common/1.0.0/templates/lib/container/_security.tpl b/library/common/1.0.0/templates/lib/container/_security.tpl index 0d89ee1352..0aee3cecc8 100644 --- a/library/common/1.0.0/templates/lib/container/_security.tpl +++ b/library/common/1.0.0/templates/lib/container/_security.tpl @@ -117,7 +117,6 @@ The reason is not splitted, is that on one of the places needs a combo of all va {{/* Overwrite from values that user/dev passed */}} {{- $returnValue = mustMergeOverwrite $returnValue $podSecCont -}} - {{- $appendGPUGroup := false -}} {{- $appendDeviceGroups := false -}} diff --git a/library/common/1.0.0/templates/lib/general/_names.tpl b/library/common/1.0.0/templates/lib/general/_names.tpl index 3e755bea67..be379e9faa 100644 --- a/library/common/1.0.0/templates/lib/general/_names.tpl +++ b/library/common/1.0.0/templates/lib/general/_names.tpl @@ -14,7 +14,7 @@ nameOverride applies only to the current chart {{- end -}} {{/* Order of preference: global.nameOverride -> nameOverride -> Chart.Name */}} - {{- ($globalNameOverride | default .Values.controllers.main.pod.nameOverride) | default .Chart.Name | trunc 63 | trimSuffix "-" -}} + {{- ($globalNameOverride | default .Values.controllers.main.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.controllers.main.pod.fullnameOverride $globalFullNameOverride -}} - {{- $name = $globalFullNameOverride | default .Values.controllers.main.pod.fullnameOverride -}} + {{- if or .Values.controllers.main.fullnameOverride $globalFullNameOverride -}} + {{- $name = $globalFullNameOverride | default .Values.controllers.main.fullnameOverride -}} {{- else -}} {{- if contains $name .Release.Name -}} {{- $name = .Release.Name -}} diff --git a/library/common/1.0.0/templates/lib/job/_jobPod.tpl b/library/common/1.0.0/templates/lib/job/_jobPod.tpl index 2a0b9401eb..3775407b18 100644 --- a/library/common/1.0.0/templates/lib/job/_jobPod.tpl +++ b/library/common/1.0.0/templates/lib/job/_jobPod.tpl @@ -153,7 +153,7 @@ {{- $runtimeClassName = . -}} {{- end -}} {{- end -}} - +{{- fail (toYaml $values) -}} {{- $termSeconds := "" -}} {{- with $values.terminationGracePeriodSeconds -}} {{- if eq (toString .) $inherit -}} diff --git a/library/common/1.0.0/values.yaml b/library/common/1.0.0/values.yaml index aee378a90b..a13f5a4f53 100644 --- a/library/common/1.0.0/values.yaml +++ b/library/common/1.0.0/values.yaml @@ -158,15 +158,6 @@ controllers: 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