controllers -> workload and plurar to singular

This commit is contained in:
Stavros kois
2023-02-02 14:48:45 +02:00
parent f0d8df5e89
commit afb2d839d0
95 changed files with 1040 additions and 1000 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ service:
protocol: HTTP
port: 8080
controllers:
workload:
main:
pod:
containers:
@@ -10,7 +10,7 @@ service:
protocol: HTTP
port: 8080
controllers:
workload:
main:
pod:
containers:
@@ -31,7 +31,7 @@ user: user
pass: secret_pass
email: mail@example.com
imagePullSecrets:
imagePullSecret:
image-secret-name:
enabled: true
labels: {}
+2 -2
View File
@@ -10,7 +10,7 @@ service:
protocol: HTTP
port: 8080
controllers:
workload:
main:
pod:
containers:
@@ -33,7 +33,7 @@ key4: value2
key5: 81
key6: false
secrets:
secret:
kv-test:
enabled: true
data:
@@ -4,7 +4,7 @@ templates:
tests:
- it: should pass with key-value data
set:
configmaps:
configmap:
my-configmap1:
enabled: true
data:
@@ -22,7 +22,7 @@ tests:
- it: should pass with key-value data from tpl
set:
data: bar
configmaps:
configmap:
my-configmap1:
enabled: true
data:
@@ -36,7 +36,7 @@ tests:
- it: should pass with scalar data
set:
configmaps:
configmap:
my-configmap1:
enabled: true
data:
@@ -55,7 +55,7 @@ tests:
- it: should pass with scalar data with tpl
set:
data: Some other text
configmaps:
configmap:
my-configmap:
enabled: true
data:
@@ -76,7 +76,7 @@ tests:
data: |
Some other text
some_text
configmaps:
configmap:
my-configmap1:
enabled: true
data:
@@ -17,7 +17,7 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
configmaps:
configmap:
my-configmap1:
enabled: true
labels:
@@ -4,7 +4,7 @@ templates:
tests:
- it: should generate correct name
set:
configmaps:
configmap:
my-configmap1:
enabled: true
data:
@@ -4,7 +4,7 @@ templates:
tests:
- it: should fail with name longer than 63 characters
set:
configmaps:
configmap:
my-configmap-super-long-name-that-is-longer-than-63-characters:
enabled: true
data:
@@ -15,7 +15,7 @@ tests:
- it: should fail with name starting with underscore
set:
configmaps:
configmap:
_my-configmap:
enabled: true
data:
@@ -26,7 +26,7 @@ tests:
- it: should fail with labels not a dict
set:
configmaps:
configmap:
my-configmap:
enabled: true
labels: "not a dict"
@@ -38,7 +38,7 @@ tests:
- it: should fail with annotations not a dict
set:
configmaps:
configmap:
my-configmap:
enabled: true
annotations: "not a dict"
@@ -50,7 +50,7 @@ tests:
- it: should fail with data not a dict
set:
configmaps:
configmap:
my-configmap:
enabled: true
data: "not a dict"
@@ -60,7 +60,7 @@ tests:
- it: should fail with empty data
set:
configmaps:
configmap:
my-configmap:
enabled: true
data: {}
@@ -17,8 +17,8 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: CronJob
@@ -86,14 +86,14 @@ tests:
- it: should pass with 2 cronjob created with correct selector labels
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: CronJob
schedule: "*/1 * * * *"
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: CronJob
@@ -103,20 +103,28 @@ tests:
- documentIndex: *cronJobDoc
isKind:
of: CronJob
- documentIndex: *cronJobDoc
equal:
path: metadata.name
value: release-name-common-test-other-workload-name
- documentIndex: *cronJobDoc
isSubset:
path: spec.jobTemplate.spec.template.metadata.labels
content:
pod.name: release-name-common-test
pod.name: release-name-common-test-other-workload-name
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
- documentIndex: &otherCronJobDoc 1
isKind:
of: CronJob
- documentIndex: *otherCronJobDoc
equal:
path: metadata.name
value: release-name-common-test
- documentIndex: *otherCronJobDoc
isSubset:
path: spec.jobTemplate.spec.template.metadata.labels
content:
pod.name: release-name-common-test-other-controller-name
pod.name: release-name-common-test
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
@@ -2,10 +2,10 @@ suite: cronjob spec test
templates:
- common.yaml
tests:
- it: should pass with controller enabled
- it: should pass with workload enabled
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: CronJob
@@ -42,8 +42,8 @@ tests:
set:
cron: "*/5 * * * *"
someTZ: America/New_York
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: CronJob
@@ -4,8 +4,8 @@ templates:
tests:
- it: should fail with invalid concurrencyPolicy
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: CronJob
@@ -17,8 +17,8 @@ tests:
- it: should fail with empty schedule
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: CronJob
@@ -30,8 +30,8 @@ tests:
- it: should fail with invalid completionMode (make sure job validation kicks in)
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: CronJob
@@ -17,8 +17,8 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: DaemonSet
@@ -92,13 +92,13 @@ tests:
- it: should pass with 2 daemonset created with correct selector labels
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: DaemonSet
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: DaemonSet
@@ -107,34 +107,42 @@ tests:
- documentIndex: *daemonSetDoc
isKind:
of: DaemonSet
- documentIndex: *daemonSetDoc
equal:
path: metadata.name
value: release-name-common-test-other-workload-name
- documentIndex: *daemonSetDoc
equal:
path: spec.selector.matchLabels
value:
pod.name: release-name-common-test
pod.name: release-name-common-test-other-workload-name
app.kubernetes.io/name: common-test
app.kubernetes.io/instance: RELEASE-NAME
- documentIndex: *daemonSetDoc
isSubset:
path: spec.template.metadata.labels
content:
pod.name: release-name-common-test
pod.name: release-name-common-test-other-workload-name
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
- documentIndex: &otherDaemonSetDoc 1
isKind:
of: DaemonSet
- documentIndex: *otherDaemonSetDoc
equal:
path: metadata.name
value: release-name-common-test
- documentIndex: *otherDaemonSetDoc
equal:
path: spec.selector.matchLabels
value:
pod.name: release-name-common-test-other-controller-name
pod.name: release-name-common-test
app.kubernetes.io/name: common-test
app.kubernetes.io/instance: RELEASE-NAME
- documentIndex: *otherDaemonSetDoc
isSubset:
path: spec.template.metadata.labels
content:
pod.name: release-name-common-test-other-controller-name
pod.name: release-name-common-test
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
@@ -2,10 +2,10 @@ suite: daemonset spec test
templates:
- common.yaml
tests:
- it: should pass with controller enabled
- it: should pass with workload enabled
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: DaemonSet
@@ -27,8 +27,8 @@ tests:
- it: should apply spec correctly
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: DaemonSet
@@ -4,8 +4,8 @@ templates:
tests:
- it: should fail with invalid strategy
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: DaemonSet
@@ -17,8 +17,8 @@ tests:
- it: should fail with rollingUpdate not a dict
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: DaemonSet
@@ -17,8 +17,8 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
@@ -92,13 +92,13 @@ tests:
- it: should pass with 2 deployment created with correct selector labels
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: Deployment
@@ -107,34 +107,42 @@ tests:
- documentIndex: *deploymentDoc
isKind:
of: Deployment
- documentIndex: *deploymentDoc
equal:
path: metadata.name
value: release-name-common-test-other-workload-name
- documentIndex: *deploymentDoc
equal:
path: spec.selector.matchLabels
value:
pod.name: release-name-common-test
pod.name: release-name-common-test-other-workload-name
app.kubernetes.io/name: common-test
app.kubernetes.io/instance: RELEASE-NAME
- documentIndex: *deploymentDoc
isSubset:
path: spec.template.metadata.labels
content:
pod.name: release-name-common-test
pod.name: release-name-common-test-other-workload-name
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
- documentIndex: &otherDeploymentDoc 1
isKind:
of: Deployment
- documentIndex: *otherDeploymentDoc
equal:
path: metadata.name
value: release-name-common-test
- documentIndex: *otherDeploymentDoc
equal:
path: spec.selector.matchLabels
value:
pod.name: release-name-common-test-other-controller-name
pod.name: release-name-common-test
app.kubernetes.io/name: common-test
app.kubernetes.io/instance: RELEASE-NAME
- documentIndex: *otherDeploymentDoc
isSubset:
path: spec.template.metadata.labels
content:
pod.name: release-name-common-test-other-controller-name
pod.name: release-name-common-test
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
@@ -2,10 +2,10 @@ suite: deployment spec test
templates:
- common.yaml
tests:
- it: should pass with controller enabled
- it: should pass with workload enabled
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
@@ -28,8 +28,8 @@ tests:
- it: should apply spec correctly
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
@@ -4,8 +4,8 @@ templates:
tests:
- it: should fail with invalid strategy
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
@@ -17,8 +17,8 @@ tests:
- it: should fail with rollingUpdate not a dict
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
@@ -1,10 +1,10 @@
suite: imagePullSecrets data test
suite: imagePullSecret data test
templates:
- common.yaml
tests:
- it: should pass with data
set:
imagePullSecrets:
imagePullSecret:
my-secret1:
enabled: true
data:
@@ -32,7 +32,7 @@ tests:
user: user
pass: secret_pass
email: mail@example.com
imagePullSecrets:
imagePullSecret:
my-secret1:
enabled: true
data:
@@ -1,4 +1,4 @@
suite: imagePullSecrets metadata test
suite: imagePullSecret metadata test
templates:
- common.yaml
chart:
@@ -17,7 +17,7 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
imagePullSecrets:
imagePullSecret:
my-secret1:
enabled: true
labels:
@@ -1,10 +1,10 @@
suite: imagePullSecrets name test
suite: imagePullSecret name test
templates:
- common.yaml
tests:
- it: should generate correct name
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret1:
enabled: true
data:
@@ -1,10 +1,10 @@
suite: imagePullSecrets validation test
suite: imagePullSecret validation test
templates:
- common.yaml
tests:
- it: should fail with name longer than 63 characters
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret-super-long-name-that-is-longer-than-63-characters:
enabled: true
data: &data
@@ -18,7 +18,7 @@ tests:
- it: should fail with name starting with underscore
set:
imagePullSecrets:
imagePullSecret:
_my-pull-secret:
enabled: true
data: *data
@@ -28,7 +28,7 @@ tests:
- it: should fail with labels not a dict
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret:
enabled: true
labels: "not a dict"
@@ -39,7 +39,7 @@ tests:
- it: should fail with annotations not a dict
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret:
enabled: true
annotations: "not a dict"
@@ -50,7 +50,7 @@ tests:
- it: should fail with data not a dict
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret:
enabled: true
data: "not a dict"
@@ -60,7 +60,7 @@ tests:
- it: should fail with empty data
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret:
enabled: true
data: {}
@@ -70,7 +70,7 @@ tests:
- it: should fail with empty registry key
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret:
enabled: true
type: ""
@@ -85,7 +85,7 @@ tests:
- it: should fail with empty username key
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret:
enabled: true
type: ""
@@ -100,7 +100,7 @@ tests:
- it: should fail with empty password key
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret:
enabled: true
type: ""
@@ -115,7 +115,7 @@ tests:
- it: should fail with empty email key
set:
imagePullSecrets:
imagePullSecret:
my-pull-secret:
enabled: true
type: ""
@@ -17,8 +17,8 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Job
@@ -85,13 +85,13 @@ tests:
- it: should pass with 2 job created with correct selector labels
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Job
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: Job
@@ -100,20 +100,28 @@ tests:
- documentIndex: *jobDoc
isKind:
of: Job
- documentIndex: *jobDoc
equal:
path: metadata.name
value: release-name-common-test-other-workload-name
- documentIndex: *jobDoc
isSubset:
path: spec.template.metadata.labels
content:
pod.name: release-name-common-test
pod.name: release-name-common-test-other-workload-name
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
- documentIndex: &otherJobDoc 1
isKind:
of: Job
- documentIndex: *otherJobDoc
equal:
path: metadata.name
value: release-name-common-test
- documentIndex: *otherJobDoc
isSubset:
path: spec.template.metadata.labels
content:
pod.name: release-name-common-test-other-controller-name
pod.name: release-name-common-test
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
+5 -5
View File
@@ -2,10 +2,10 @@ suite: job spec test
templates:
- common.yaml
tests:
- it: should pass with controller enabled
- it: should pass with workload enabled
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Job
@@ -29,8 +29,8 @@ tests:
- it: should apply spec correctly
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Job
@@ -4,8 +4,8 @@ templates:
tests:
- it: should fail with invalid completionMode
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Job
@@ -17,8 +17,8 @@ tests:
- it: should fail with completionMode to Indexed and no completions
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Job
@@ -31,8 +31,8 @@ tests:
- it: should fail with completionMode to Indexed and no parallelism
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Job
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
automountServiceAccountToken: false
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -25,8 +25,8 @@ tests:
set:
podOptions:
automountServiceAccountToken: true
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -44,8 +44,8 @@ tests:
set:
podOptions:
automountServiceAccountToken: true
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -61,8 +61,8 @@ tests:
set:
podOptions:
automountServiceAccountToken: false
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -9,8 +9,8 @@ tests:
nameservers: []
searches: []
options: []
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -37,8 +37,8 @@ tests:
- name: ndots
value: "2"
- name: edns0
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -69,8 +69,8 @@ tests:
- example.org
options:
- name: edns0
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -108,8 +108,8 @@ tests:
s1: example.com
property: ndots
value: 2
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -147,8 +147,8 @@ tests:
set:
podOptions:
dnsPolicy: None
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -163,8 +163,8 @@ tests:
set:
podOptions:
dnsPolicy: None
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -181,8 +181,8 @@ tests:
set:
podOptions:
dnsPolicy: None
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -199,8 +199,8 @@ tests:
- it: should fail with more than 3 nameservers
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -217,8 +217,8 @@ tests:
- it: should fail with more than 6 Searches
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
dnsPolicy: ""
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -25,8 +25,8 @@ tests:
set:
podOptions:
dnsPolicy: Default
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -41,8 +41,8 @@ tests:
set:
podOptions:
dnsPolicy: None
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -59,8 +59,8 @@ tests:
policy: ClusterFirst
podOptions:
dnsPolicy: None
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -76,8 +76,8 @@ tests:
set:
podOptions:
dnsPolicy: None
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -95,8 +95,8 @@ tests:
set:
podOptions:
dnsPolicy: Invalid
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
enableServiceLinks: false
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -25,8 +25,8 @@ tests:
set:
podOptions:
enableServiceLinks: true
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -44,8 +44,8 @@ tests:
set:
podOptions:
enableServiceLinks: true
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -61,8 +61,8 @@ tests:
set:
podOptions:
enableServiceLinks: false
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
hostAliases: ""
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -32,8 +32,8 @@ tests:
hostnames:
- myotherserver.local
- backups.local
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -64,8 +64,8 @@ tests:
hostnames:
- myotherserver.local
- backups.local
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -104,8 +104,8 @@ tests:
hostnames:
- myserver.local
- storage.local
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
hostNetwork: false
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -25,8 +25,8 @@ tests:
set:
podOptions:
hostNetwork: true
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -44,8 +44,8 @@ tests:
set:
podOptions:
hostNetwork: true
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -61,8 +61,8 @@ tests:
set:
podOptions:
hostNetwork: false
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -4,8 +4,8 @@ templates:
tests:
- it: should pass with empty hostname
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: StatefulSet
@@ -20,8 +20,8 @@ tests:
- it: should pass with hostname set
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: StatefulSet
@@ -39,8 +39,8 @@ tests:
- it: should pass with hostname from "pod" with tpl
set:
host: some-other-hostname
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: StatefulSet
@@ -2,21 +2,21 @@ suite: pod imagePullSecret test
templates:
- common.yaml
tests:
- it: should assign multiple imagePullSecrets to primary pod
- it: should assign multiple imagePullSecret to primary pod
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: CronJob
schedule: "* * * * *"
podSpec: {}
controller-name2:
workload-name2:
enabled: true
primary: false
type: Deployment
podSpec: {}
imagePullSecrets:
imagePullSecret:
pull-secret1:
enabled: true
data:
@@ -52,20 +52,20 @@ tests:
isNull:
path: spec.template.spec.imagePullSecrets
- it: should assign multiple imagePullSecrets to all pods
- it: should assign multiple imagePullSecret to all pods
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
podSpec: {}
controller-name2:
workload-name2:
enabled: true
primary: false
type: Deployment
podSpec: {}
imagePullSecrets:
imagePullSecret:
pull-secret1:
enabled: true
data:
@@ -102,20 +102,20 @@ tests:
- name: release-name-common-test-pull-secret1
- name: release-name-common-test-pull-secret2
- it: should assign imagePullSecrets to selected pods
- it: should assign imagePullSecret to selected pods
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
podSpec: {}
controller-name2:
workload-name2:
enabled: true
primary: false
type: Deployment
podSpec: {}
imagePullSecrets:
imagePullSecret:
pull-secret1:
enabled: true
data:
@@ -124,8 +124,8 @@ tests:
password: pass
email: mail
targetSelector:
- controller-name1
- controller-name2
- workload-name1
- workload-name2
pull-secret2:
enabled: true
data:
@@ -134,7 +134,7 @@ tests:
password: pass
email: mail
targetSelector:
- controller-name1
- workload-name1
asserts:
- documentIndex: &daemonSetDoc 2
isKind:
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
nodeSelector: {}
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: CronJob
@@ -27,8 +27,8 @@ tests:
nodeSelector:
disk: ssd
cpu: intel
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: CronJob
@@ -48,8 +48,8 @@ tests:
nodeSelector:
disk: ssd
cpu: intel
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: CronJob
@@ -73,8 +73,8 @@ tests:
nodeSelector:
disk: ssd
cpu: intel
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: CronJob
@@ -96,8 +96,8 @@ tests:
podOptions:
nodeSelector:
disk: ""
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: CronJob
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
priorityClassName: ""
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -24,8 +24,8 @@ tests:
set:
podOptions:
priorityClassName: some-priority-class
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -40,8 +40,8 @@ tests:
set:
podOptions:
priorityClassName: some-priority-class
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -58,8 +58,8 @@ tests:
priorityClass: some-other-priority-class
podOptions:
priorityClassName: some-priority-class
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
restartPolicy: ""
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -25,8 +25,8 @@ tests:
set:
podOptions:
restartPolicy: Always
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -41,8 +41,8 @@ tests:
set:
podOptions:
restartPolicy: Never
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -58,8 +58,8 @@ tests:
set:
podOptions:
restartPolicy: Never
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Job
@@ -79,8 +79,8 @@ tests:
policy: OnFailure
podOptions:
restartPolicy: Never
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Job
@@ -97,8 +97,8 @@ tests:
set:
podOptions:
restartPolicy: Never
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -111,8 +111,8 @@ tests:
set:
podOptions:
restartPolicy: Never
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -125,8 +125,8 @@ tests:
set:
podOptions:
restartPolicy: Never
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: StatefulSet
@@ -139,8 +139,8 @@ tests:
set:
podOptions:
restartPolicy: invalid
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: StatefulSet
@@ -153,8 +153,8 @@ tests:
set:
podOptions:
restartPolicy: invalid
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: StatefulSet
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
runtimeClassName: ""
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -24,8 +24,8 @@ tests:
set:
podOptions:
runtimeClassName: some-runtime-class
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -40,8 +40,8 @@ tests:
set:
podOptions:
runtimeClassName: some-runtime-class
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -58,8 +58,8 @@ tests:
runtimeClass: some-other-runtime-class
podOptions:
runtimeClassName: some-runtime-class
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -77,9 +77,9 @@ tests:
- gpu:
key: value
targetSelector:
controller-name1:
workload-name1:
- container-name1
controller-name3:
workload-name3:
- container-name1
global:
ixChartContext:
@@ -87,20 +87,20 @@ tests:
nvidiaRuntimeClassName: ix-runtime
podOptions:
runtimeClassName: some-class
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
podSpec:
runtimeClassName: some-other-class
controller-name2:
workload-name2:
enabled: true
primary: false
type: DaemonSet
podSpec:
runtimeClassName: some-class
controller-name3:
workload-name3:
enabled: true
primary: false
type: StatefulSet
@@ -126,7 +126,7 @@ tests:
path: spec.template.spec.runtimeClassName
value: ix-runtime
- it: should pass with runtimeClassName from ixChartContext without targetSelector (on primary controller)
- it: should pass with runtimeClassName from ixChartContext without targetSelector (on primary workload)
set:
scaleGPU:
- gpu:
@@ -135,14 +135,14 @@ tests:
ixChartContext:
addNvidiaRuntimeClass: true
nvidiaRuntimeClassName: ix-runtime
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Job
podSpec:
runtimeClassName: some-other-class
controller-name2:
workload-name2:
enabled: true
primary: false
type: CronJob
@@ -168,14 +168,14 @@ tests:
scaleGPU:
- gpu: {}
targetSelector:
controller-name1:
workload-name1:
- container-name1
global:
ixChartContext:
addNvidiaRuntimeClass: true
nvidiaRuntimeClassName: ix-runtime
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Job
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
schedulerName: ""
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -24,8 +24,8 @@ tests:
set:
podOptions:
schedulerName: some-scheduler
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -40,8 +40,8 @@ tests:
set:
podOptions:
schedulerName: some-scheduler
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -58,8 +58,8 @@ tests:
scheduler: some-other-scheduler
podOptions:
schedulerName: some-scheduler
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -4,19 +4,19 @@ templates:
tests:
- it: should assign serviceAccount to primary pod
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: CronJob
schedule: "* * * * *"
podSpec: {}
controller-name2:
workload-name2:
enabled: true
primary: false
type: Deployment
podSpec: {}
serviceAccounts:
serviceAccount:
sa-name1:
enabled: true
asserts:
@@ -41,18 +41,18 @@ tests:
- it: should assign serviceAccount to all pods
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
podSpec: {}
controller-name2:
workload-name2:
enabled: true
primary: false
type: Deployment
podSpec: {}
serviceAccounts:
serviceAccount:
sa-name1:
enabled: true
targetSelectAll: true
@@ -74,23 +74,23 @@ tests:
- it: should assign serviceAccount to selected pods
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
podSpec: {}
controller-name2:
workload-name2:
enabled: true
primary: false
type: Deployment
podSpec: {}
serviceAccounts:
serviceAccount:
sa-name1:
enabled: true
targetSelector:
- controller-name1
- controller-name2
- workload-name1
- workload-name2
asserts:
- documentIndex: &daemonSetDoc 1
isKind:
@@ -110,21 +110,21 @@ tests:
# Failures
- it: should fail with more than 1 SA assigned to a pod
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
podSpec: {}
serviceAccounts:
serviceAccount:
sa-name1:
enabled: true
targetSelector:
- controller-name1
- workload-name1
sa-name2:
enabled: true
targetSelector:
- controller-name1
- workload-name1
asserts:
- failedTemplate:
errorMessage: Expected at most 1 ServiceAccount to be assigned on a pod [controller-name1]. But [2] were assigned
errorMessage: Expected at most 1 ServiceAccount to be assigned on a pod [workload-name1]. But [2] were assigned
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
terminationGracePeriodSeconds: ""
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -24,8 +24,8 @@ tests:
set:
podOptions:
terminationGracePeriodSeconds: 100
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -40,8 +40,8 @@ tests:
set:
podOptions:
terminationGracePeriodSeconds: 100
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -58,8 +58,8 @@ tests:
period: 125
podOptions:
terminationGracePeriodSeconds: 50
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: DaemonSet
@@ -6,8 +6,8 @@ tests:
set:
podOptions:
tolerations: []
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -27,8 +27,8 @@ tests:
- operator: Exists
effect: NoExecute
tolerationSeconds: 3600
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -49,8 +49,8 @@ tests:
- operator: Exists
effect: NoExecute
tolerationSeconds: 3600
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -81,8 +81,8 @@ tests:
- operator: Exists
effect: NoExecute
tolerationSeconds: 3600
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -113,8 +113,8 @@ tests:
# Failures
- it: should fail with invalid operator
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -127,8 +127,8 @@ tests:
- it: should fail with empty key and operator set to Equal
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -142,8 +142,8 @@ tests:
- it: should fail with empty value and operator set to Equal
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -157,8 +157,8 @@ tests:
- it: should fail with value set and operator set to Exists
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -172,8 +172,8 @@ tests:
- it: should fail with effect set to Invalid
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -187,8 +187,8 @@ tests:
- it: should fail with tolerationSeconds not a number
set:
controllers:
controller-name1:
workload:
workload-name1:
enabled: true
primary: true
type: Deployment
@@ -4,7 +4,7 @@ templates:
tests:
- it: should pass with key-value data
set:
secrets:
secret:
my-secret1:
enabled: true
data:
@@ -25,7 +25,7 @@ tests:
- it: should pass with custom secret type
set:
secrets:
secret:
my-secret1:
enabled: true
type: SomeCustomType
@@ -41,7 +41,7 @@ tests:
- it: should pass with key-value data from tpl
set:
data: bar
secrets:
secret:
my-secret1:
enabled: true
data:
@@ -55,7 +55,7 @@ tests:
- it: should pass with scalar data
set:
secrets:
secret:
my-secret1:
enabled: true
data:
@@ -74,7 +74,7 @@ tests:
- it: should pass with scalar data with tpl
set:
data: Some other text
secrets:
secret:
my-secret:
enabled: true
data:
@@ -95,7 +95,7 @@ tests:
data: |
Some other text
some_text
secrets:
secret:
my-secret:
enabled: true
data:
@@ -17,7 +17,7 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
secrets:
secret:
my-secret1:
enabled: true
labels:
@@ -4,7 +4,7 @@ templates:
tests:
- it: should generate correct name
set:
secrets:
secret:
my-secret1:
enabled: true
data:
@@ -4,7 +4,7 @@ templates:
tests:
- it: should fail with name longer than 63 characters
set:
secrets:
secret:
my-secret-super-long-name-that-is-longer-than-63-characters:
enabled: true
data:
@@ -15,7 +15,7 @@ tests:
- it: should fail with name starting with underscore
set:
secrets:
secret:
_my-secret:
enabled: true
data:
@@ -26,7 +26,7 @@ tests:
- it: should fail with labels not a dict
set:
secrets:
secret:
my-secret:
enabled: true
labels: "not a dict"
@@ -38,7 +38,7 @@ tests:
- it: should fail with annotations not a dict
set:
secrets:
secret:
my-secret:
enabled: true
annotations: "not a dict"
@@ -50,7 +50,7 @@ tests:
- it: should fail with data not a dict
set:
secrets:
secret:
my-secret:
enabled: true
data: "not a dict"
@@ -60,7 +60,7 @@ tests:
- it: should fail with empty data
set:
secrets:
secret:
my-secret:
enabled: true
data: {}
@@ -70,7 +70,7 @@ tests:
- it: should fail with empty type key
set:
secrets:
secret:
my-secret:
enabled: true
type: ""
@@ -17,7 +17,7 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
serviceAccounts:
serviceAccount:
my-sa1:
enabled: true
labels:
@@ -4,7 +4,7 @@ templates:
tests:
- it: should generate correct name
set:
serviceAccounts:
serviceAccount:
my-sa1:
enabled: true
my-sa2:
@@ -4,7 +4,7 @@ templates:
tests:
- it: should fail with name longer than 63 characters
set:
serviceAccounts:
serviceAccount:
my-service-account-super-long-name-that-is-longer-than-63-characters:
enabled: true
asserts:
@@ -13,7 +13,7 @@ tests:
- it: should fail with name starting with underscore
set:
serviceAccounts:
serviceAccount:
_my-sa:
enabled: true
data:
@@ -24,7 +24,7 @@ tests:
- it: should fail with labels not a dict
set:
serviceAccounts:
serviceAccount:
my-sa:
enabled: true
labels: "not a dict"
@@ -34,7 +34,7 @@ tests:
- it: should fail with annotations not a dict
set:
serviceAccounts:
serviceAccount:
my-sa:
enabled: true
annotations: "not a dict"
@@ -44,7 +44,7 @@ tests:
- it: should fail with more than 1 primary service accounts
set:
serviceAccounts:
serviceAccount:
my-sa:
enabled: true
primary: true
@@ -17,8 +17,8 @@ tests:
annotations:
g_annotation1: global_annotation1
g_annotation2: "{{ .Values.annotation2 }}"
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: StatefulSet
@@ -92,13 +92,13 @@ tests:
- it: should pass with 2 daemonset created with correct selector labels
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: StatefulSet
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: StatefulSet
@@ -107,34 +107,42 @@ tests:
- documentIndex: *statefulSetDoc
isKind:
of: StatefulSet
- documentIndex: *statefulSetDoc
equal:
path: metadata.name
value: release-name-common-test-other-workload-name
- documentIndex: *statefulSetDoc
equal:
path: spec.selector.matchLabels
value:
pod.name: release-name-common-test
pod.name: release-name-common-test-other-workload-name
app.kubernetes.io/name: common-test
app.kubernetes.io/instance: RELEASE-NAME
- documentIndex: *statefulSetDoc
isSubset:
path: spec.template.metadata.labels
content:
pod.name: release-name-common-test
pod.name: release-name-common-test-other-workload-name
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
- documentIndex: &otherStatefulSetDoc 1
isKind:
of: StatefulSet
- documentIndex: *otherStatefulSetDoc
equal:
path: metadata.name
value: release-name-common-test
- documentIndex: *otherStatefulSetDoc
equal:
path: spec.selector.matchLabels
value:
pod.name: release-name-common-test-other-controller-name
pod.name: release-name-common-test
app.kubernetes.io/name: common-test
app.kubernetes.io/instance: RELEASE-NAME
- documentIndex: *otherStatefulSetDoc
isSubset:
path: spec.template.metadata.labels
content:
pod.name: release-name-common-test-other-controller-name
pod.name: release-name-common-test
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: common-test
@@ -2,10 +2,10 @@ suite: statefulset spec test
templates:
- common.yaml
tests:
- it: should pass with controller enabled
- it: should pass with workload enabled
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: StatefulSet
@@ -27,8 +27,8 @@ tests:
- it: should apply spec correctly
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: StatefulSet
@@ -4,8 +4,8 @@ templates:
tests:
- it: should fail with invalid strategy
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: StatefulSet
@@ -17,8 +17,8 @@ tests:
- it: should fail with rollingUpdate not a dict
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: StatefulSet
@@ -1,38 +1,78 @@
suite: controller name test
suite: workload name test
templates:
- common.yaml
tests:
- it: should generate correct controller name
- it: should generate correct workload name
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec: {}
daemonset-controller-name:
daemonset-workload-name:
enabled: true
primary: false
type: DaemonSet
podSpec: {}
stateful-controller-name:
stateful-workload-name:
enabled: true
primary: false
type: StatefulSet
podSpec: {}
cronjob-controller-name:
cronjob-workload-name:
enabled: true
primary: false
type: CronJob
schedule: "*/1 * * * *"
podSpec: {}
job-controller-name:
job-workload-name:
enabled: true
primary: false
type: Job
podSpec: {}
asserts:
- documentIndex: &deploymentDoc 0
- documentIndex: &cronJobDoc 0
isKind:
of: CronJob
- documentIndex: *cronJobDoc
isAPIVersion:
of: batch/v1
- documentIndex: *cronJobDoc
equal:
path: metadata.name
value: release-name-common-test-cronjob-workload-name
- documentIndex: &daemonSetDoc 1
isKind:
of: DaemonSet
- documentIndex: *daemonSetDoc
isAPIVersion:
of: apps/v1
- documentIndex: *daemonSetDoc
equal:
path: metadata.name
value: release-name-common-test-daemonset-workload-name
- documentIndex: &jobDoc 2
isKind:
of: Job
- documentIndex: *jobDoc
isAPIVersion:
of: batch/v1
- documentIndex: *jobDoc
equal:
path: metadata.name
value: release-name-common-test-job-workload-name
- documentIndex: &statefulSetDoc 3
isKind:
of: StatefulSet
- documentIndex: *statefulSetDoc
isAPIVersion:
of: apps/v1
- documentIndex: *statefulSetDoc
equal:
path: metadata.name
value: release-name-common-test-stateful-workload-name
- documentIndex: &deploymentDoc 4
isKind:
of: Deployment
- documentIndex: *deploymentDoc
@@ -42,43 +82,3 @@ tests:
equal:
path: metadata.name
value: release-name-common-test
- documentIndex: &cronJobDoc 1
isKind:
of: CronJob
- documentIndex: *cronJobDoc
isAPIVersion:
of: batch/v1
- documentIndex: *cronJobDoc
equal:
path: metadata.name
value: release-name-common-test-cronjob-controller-name
- documentIndex: &daemonSetDoc 2
isKind:
of: DaemonSet
- documentIndex: *daemonSetDoc
isAPIVersion:
of: apps/v1
- documentIndex: *daemonSetDoc
equal:
path: metadata.name
value: release-name-common-test-daemonset-controller-name
- documentIndex: &jobDoc 3
isKind:
of: Job
- documentIndex: *jobDoc
isAPIVersion:
of: batch/v1
- documentIndex: *jobDoc
equal:
path: metadata.name
value: release-name-common-test-job-controller-name
- documentIndex: &statefulSetDoc 4
isKind:
of: StatefulSet
- documentIndex: *statefulSetDoc
isAPIVersion:
of: apps/v1
- documentIndex: *statefulSetDoc
equal:
path: metadata.name
value: release-name-common-test-stateful-controller-name
@@ -1,91 +1,91 @@
suite: controller validation test
suite: workload validation test
templates:
- common.yaml
tests:
- it: should fail with name longer than 63 characters
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec: {}
other-controller-name-super-long-name-that-is-longer-than-63-characters:
other-workload-name-super-long-name-that-is-longer-than-63-characters:
enabled: true
primary: false
type: Deployment
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Name [release-name-common-test-other-controller-name-super-long-name-that-is-longer-than-63-characters] is not valid. Must start and end with an alphanumeric character. It can contain '-'. And must be at most 63 characters.
errorMessage: Name [release-name-common-test-other-workload-name-super-long-name-that-is-longer-than-63-characters] is not valid. Must start and end with an alphanumeric character. It can contain '-'. And must be at most 63 characters.
- it: should fail with name starting with underscore
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec: {}
_other-controller-name:
_other-workload-name:
enabled: true
primary: false
type: Deployment
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Name [release-name-common-test-_other-controller-name] is not valid. Must start and end with an alphanumeric character. It can contain '-'. And must be at most 63 characters.
errorMessage: Name [release-name-common-test-_other-workload-name] is not valid. Must start and end with an alphanumeric character. It can contain '-'. And must be at most 63 characters.
- it: should fail with invalid type
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: not-valid-type
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - Expected <type> to be one of [Deployment, StatefulSet, DaemonSet, Job, CronJob], but got [not-valid-type]
errorMessage: Workload - Expected <type> to be one of [Deployment, StatefulSet, DaemonSet, Job, CronJob], but got [not-valid-type]
- it: should fail without primary enabled controller
- it: should fail without primary enabled workload
set:
controllers:
controller-name:
workload:
workload-name:
enabled: false
primary: true
type: Deployment
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: Deployment
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - At least one enabled controller must be primary
errorMessage: Workload - At least one enabled workload must be primary
- it: should fail more than one primary enabled controller
- it: should fail more than one primary enabled workload
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: true
type: Deployment
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - Only one controller can be primary
errorMessage: Workload - Only one workload can be primary
- it: should fail with labels not a dict
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
@@ -93,12 +93,12 @@ tests:
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - Expected <labels> to be a dictionary, but got [string]
errorMessage: Workload - Expected <labels> to be a dictionary, but got [string]
- it: should fail with annotations not a dict
set:
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
@@ -106,4 +106,4 @@ tests:
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - Expected <annotations> to be a dictionary, but got [string]
errorMessage: Workload - Expected <annotations> to be a dictionary, but got [string]
+3 -3
View File
@@ -1,7 +1,7 @@
# As we have by default enabled
# a "main" controller" for all charts
# a "main" workload" for all charts
# We disable it so tests run with their defined
# controllers (Tests use a different named controller)
controllers:
# workload (Tests use a different named workload)
workload:
main:
enabled: false
+48
View File
@@ -0,0 +1,48 @@
# ConfigMap
| Key | Type | Required | Helm Template | Default | Description |
| :------------------------------------- | :-------: | :------: | :-----------: | :-----: | :----------------------------------- |
| configmap | `dict` | ❌ | ❌ | `{}` | Define the configMaps as dicts |
| configmap.[configmap-name] | `dict` | ✅ | ❌ | `{}` | Holds configMap definition |
| configmap.[configmap-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the configMap |
| configmap.[configmap-name].labels | `dict` | ❌ | ✅ | `{}` | Additional labels for configmap |
| configmap.[configmap-name].annotations | `dict` | ❌ | ✅ | `{}` | Additional annotations for configmap |
| configmap.[configmap-name].data | `dict` | ✅ | ✅ | `{}` | Define the data of the configmap |
---
Appears in:
- `.Values.configmap`
---
Naming scheme:
- `$FullName-$ConfigmapName` (release-name-chart-name-configmapName)
---
Examples:
```yaml
configmap:
configmap-name:
enabled: true
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
data:
key: value
other-configmap-name:
enabled: true
data:
key: |
multi line
text value
```
-48
View File
@@ -1,48 +0,0 @@
# ConfigMap
| Key | Type | Required | Helm Template | Default | Description |
| :------------------------------------- | :-------: | :------: | :-----------: | :-----: | :----------------------------------- |
| configmaps | `dict` | ❌ | ❌ | `{}` | Define the configMaps as dicts |
| configmaps.[configmap-name] | `dict` | ✅ | ❌ | `{}` | Holds configMap definition |
| configmaps.[configmap-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the configMap |
| configmaps.[configmap-name].labels | `dict` | ❌ | ✅ | `{}` | Additional labels for configmap |
| configmaps.[configmap-name].annotations | `dict` | ❌ | ✅ | `{}` | Additional annotations for configmap |
| configmaps.[configmap-name].data | `dict` | ✅ | ✅ | `{}` | Define the data of the configmap |
---
Appears in:
- `.Values.configmaps`
---
Naming scheme:
- `$FullName-$ConfigmapName` (release-name-chart-name-configmapName)
---
Examples:
```yaml
configmaps:
configmap-name:
enabled: true
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
data:
key: value
other-configmap-name:
enabled: true
data:
key: |
multi line
text value
```
-133
View File
@@ -1,133 +0,0 @@
# Controllers
| Key | Type | Required | Helm Template | Default | Description |
| :---------------------------------------------------------------------- | :-------: | :------: | :-----------: | :-------------------------------------------------------------: | :----------------------------------------------------------------------------------- |
| controllers | `dict` | ❌ | ❌ | `{}` | Define the controllers as dicts |
| controllers.[controller-name] | `dict` | ✅ | ❌ | `{}` | Holds controller definition |
| controllers.[controller-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the controller |
| controllers.[controller-name].primary | `boolean` | ✅ | ❌ | `false` | Sets the controller as primary |
| controllers.[controller-name].labels | `dict` | ❌ | ❌ | `{}` | Additional labels for controller |
| controllers.[controller-name].labels.[key-name] | `string` | ❌ | ❌ | | [Key] of the additional label |
| controllers.[controller-name].labels.[key-name].[value] | `string` | ❌ | ✅ | | [Value] for [key] of the additional label |
| controllers.[controller-name].annotations | `dict` | ❌ | ❌ | `{}` | Additional annotations for controller |
| controllers.[controller-name].annotations.[key-name] | `string` | ❌ | ❌ | | [Key] of the additional annotation |
| controllers.[controller-name].annotations.[key-name].[value] | `string` | ❌ | ✅ | | [Value] for [key] of the additional annotation |
| controllers.[controller-name].type | `string` | ✅ | ❌ | `""` | Define the kind of the controller (Deployment, DaemonSet, StatefulSet, CronJob, Job) |
| controllers.[controller-name].podSpec | `dict` | ✅ | ❌ | `{}` | Holds the pod definition |
| controllers.[controller-name].podSpec.labels | `dict` | ❌ | ❌ | `{}` | Additional Pod Labels |
| controllers.[controller-name].podSpec.labels.[key-name] | `string` | ❌ | ❌ | | [Key] of the additional label |
| controllers.[controller-name].podSpec.labels.[key-name].[value] | `string` | ❌ | ✅ | | [Value] for [key] of the additional label |
| controllers.[controller-name].podSpec.annotations | `dict` | ❌ | ✅ | `{}` | Pod Annotations |
| controllers.[controller-name].podSpec.annotations.[key-name] | `string` | ❌ | ❌ | | [Key] of the additional annotation |
| controllers.[controller-name].podSpec.annotations.[key-name].[value] | `string` | ❌ | ✅ | | [Value] of [key] of the additional annotation |
| controllers.[controller-name].podSpec.automountServiceAccountToken | `boolean` | ❌ | ❌ | `{{ .Values.podOptions.automountServiceAccoutnToken }}` (false) | Pod's automountServiceAccountToken |
| controllers.[controller-name].podSpec.hostNetwork | `boolean` | ❌ | ❌ | `{{ .Values.podOptions.hostNetwork }}` (false) | Pod's hostNetwork |
| controllers.[controller-name].podSpec.enableServiceLinks | `boolean` | ❌ | ❌ | `{{ .Values.podOptions.enableServiceLinks }}` (false) | Pod's enableServiceLinks |
| controllers.[controller-name].podSpec.restartPolicy | `string` | ❌ | ✅ | `{{ .Values.podOptions.restartPolicy }}` (Always) | Pod's restartPolicy. (Always, Never, OnFailure) |
| controllers.[controller-name].podSpec.schedulerName | `string` | ❌ | ✅ | `{{ .Values.podOptions.schedulerName }}` ("") | Pod's schedulerName |
| controllers.[controller-name].podSpec.priorityClassName | `string` | ❌ | ✅ | `{{ .Values.podOptions.priorityClassName }}` ("") | Pod's priorityClassName |
| controllers.[controller-name].podSpec.hostname | `string` | ❌ | ✅ | `""` | Pod's hostname |
| controllers.[controller-name].podSpec.terminationGracePeriodSeconds | `int` | ❌ | ✅ | `{{ .Values.podOptions.terminationGracePeriodSeconds }}` (120) | Pod's terminationGracePeriodSeconds |
| controllers.[controller-name].podSpec.nodeSelector | `dict` | ❌ | ❌ | `{{ .Values.podOptions.nodeSelector }}` ({}) | Pod's nodeSelector |
| controllers.[controller-name].podSpec.nodeSelector.[key-name] | `string` | ❌ | ❌ | | [Key] for nodeSelector |
| controllers.[controller-name].podSpec.nodeSelector.[key-name].[value] | `string` | ❌ | ✅ | | [Value] for [key] for nodeSelector |
| controllers.[controller-name].podSpec.hostAliases | `list` | ❌ | ❌ | | Pod's host aliases |
| controllers.[controller-name].podSpec.hostAliases.ip | `string` | ❌ | ✅ | | Value for `ip` in hosts aliases |
| controllers.[controller-name].podSpec.hostAliases.hostnames | `list` | ❌ | ❌ | | Hostnames for the `ip` in hosts aliases |
| controllers.[controller-name].podSpec.hostAliases.hostnames.[host-name] | `string` | ❌ | ✅ | | [Value] for `hostnames` for the `ip` in hosts aliases |
| controllers.[controller-name].podSpec.dnsPolicy | `string` | ❌ | ✅ | `{{ .Values.podOptions.dnsPolicy }}` (ClusterFirst) | Pod's DNS Policy (ClusterFirst, ClusterFirstWithHostNet, Default, None). |
| controllers.[controller-name].podSpec.tolerations | `list` | ❌ | ❌ | `{{ .Values.podOptions.tolerations }}` ([]) | Pod's Tolerations |
| controllers.[controller-name].podSpec.tolerations.operator | `string` | ✅ | ✅ | | Toleration's `operator` (Equal, Exists) |
| controllers.[controller-name].podSpec.tolerations.key | `string` | ❌/✅ | ✅ | | Toleration's `key`. Required only when `operator` = `Equal` |
| controllers.[controller-name].podSpec.tolerations.value | `string` | ❌/✅ | ✅ | | Toleration's `value`. Required only when `operator` = `Equal` |
| controllers.[controller-name].podSpec.tolerations.effect | `string` | ❌ | ✅ | | Toleration's `effect`.(NoExecute, NoSchedule, PreferNoSchedule) |
| controllers.[controller-name].podSpec.tolerations.tolerationSeconds | `int` | ❌ | ❌ | | Toleration's `tolerationSeconds`. |
| controllers.[controller-name].podSpec.runtimeClassName | `string` | ✅ | ❌ | `{{ .Values.podOptions.runtimeClassName }}` ("") | Pod's runtimeClassName |
---
Notes
> `dnsPolicy` is set automatically to `ClusterFirstWithHostNet` when `hostNetwork` is `true`
> `runtimeClassName` will ignore any value set and use the `.Values.global.ixChartContext.nvidiaRuntimeClassName`,
> if a GPU is assigned to a container and Scale Middleware sets `.Values.global.ixChartContext.addNvidiaRuntimeClass` to `true`.
> Note that it will only set the `runtimeClassName` on the pod that this container belongs to.
---
Appears in:
- `.Values.controllers`
---
Naming scheme:
- Primary: `$FullName` (release-name-chart-name)
- Non-Primary: `$FullName-$ControllerName` (release-name-chart-name-controller-name)
---
> Those are the common `keys` for all controllers.
> Additional keys, information and examples, see on the specific kind of controller
- [Deployment](deployment.md)
- [DaemonSet](daemonset.md)
- [StatefulSet](statefulset.md)
- [CronJob](cronjob.md)
- [Job](job.md)
---
Examples:
```yaml
controllers:
controller-name:
enabled: true
primary: true
labels:
key: value
annotations:
key: value
podSpec:
labels:
key: value
annotations:
key: value
automountServiceAccountToken: true
hostNetwork: false
enableServiceLinks: false
schedulerName: some-scheduler
priorityClassName: some-priority-class-name
hostname: some-hostname
terminationGracePeriodSeconds: 100
nodeSelector:
disk_type: ssd
hostAliases:
- ip: 10.10.10.100
hostnames:
- myserver.local
- storage.local
- ip: 10.10.10.101
hostnames:
- myotherserver.local
- backups.local
dnsPolicy: ClusterFirst
dnsConfig:
nameservers:
- 1.1.1.1
- 1.0.0.1
searches:
- ns1.svc.cluster-domain.example
- my.dns.search.suffix
options:
- name: ndots
value: "2"
- name: edns0
tolerations:
- operator: Exists
effect: NoExecute
tolerationSeconds: 3600
runtimeClassName: some-runtime-class
```
+18 -18
View File
@@ -1,33 +1,33 @@
# CronJob
| Key | Type | Required | Helm Template | Default | Description |
| :------------------------------------------------------- | :-------: | :------: | :-----------: | :---------------------------------------------------: | :---------------------------------------------------- |
| controllers.[controller-name].schedule | `string` | ✅ | ✅ | `""` | Define the schedule |
| controllers.[controller-name].timezone | `string` | ❌ | ✅ | `{{ .Values.TZ }}` | Define the timezone |
| controllers.[controller-name].concurrencyPolicy | `string` | ❌ | ✅ | `Forbid` | Define the concurrencyPolicy (Allow, Replace, Forbid) |
| controllers.[controller-name].failedJobsHistoryLimit | `int` | ❌ | ❌ | `1` | Define the failedJobsHistoryLimit |
| controllers.[controller-name].successfulJobsHistoryLimit | `int` | ❌ | ❌ | `3` | Define the successfulJobsHistoryLimit |
| controllers.[controller-name].startingDeadlineSeconds | `int` | ❌ | ❌ | | Define the startingDeadlineSeconds |
| controllers.[controller-name].completionMode | `string` | ❌ | ❌ | `NonIndexed` | Define the completionMode (Indexed, NonIndexed) |
| controllers.[controller-name].backoffLimit | `int` | ❌ | ❌ | `5` | Define the backoffLimit |
| controllers.[controller-name].completions | `int` | ❌ | ❌ | | Define the completions |
| controllers.[controller-name].parallelism | `int` | ❌ | ❌ | `1` | Define the parallelism |
| controllers.[controller-name].ttlSecondsAfterFinished | `int` | ❌ | ❌ | `120` | Define the ttlSecondsAfterFinished |
| controllers.[controller-name].activeDeadlineSeconds | `int` | ❌ | ❌ | | Define the activeDeadlineSeconds |
| Key | Type | Required | Helm Template | Default | Description |
| :-------------------------------------------------- | :------: | :------: | :-----------: | :----------------: | :---------------------------------------------------- |
| workload.[workload-name].schedule | `string` | ✅ | ✅ | `""` | Define the schedule |
| workload.[workload-name].timezone | `string` | ❌ | ✅ | `{{ .Values.TZ }}` | Define the timezone |
| workload.[workload-name].concurrencyPolicy | `string` | ❌ | ✅ | `Forbid` | Define the concurrencyPolicy (Allow, Replace, Forbid) |
| workload.[workload-name].failedJobsHistoryLimit | `int` | ❌ | ❌ | `1` | Define the failedJobsHistoryLimit |
| workload.[workload-name].successfulJobsHistoryLimit | `int` | ❌ | ❌ | `3` | Define the successfulJobsHistoryLimit |
| workload.[workload-name].startingDeadlineSeconds | `int` | ❌ | ❌ | | Define the startingDeadlineSeconds |
| workload.[workload-name].completionMode | `string` | ❌ | ❌ | `NonIndexed` | Define the completionMode (Indexed, NonIndexed) |
| workload.[workload-name].backoffLimit | `int` | ❌ | ❌ | `5` | Define the backoffLimit |
| workload.[workload-name].completions | `int` | ❌ | ❌ | | Define the completions |
| workload.[workload-name].parallelism | `int` | ❌ | ❌ | `1` | Define the parallelism |
| workload.[workload-name].ttlSecondsAfterFinished | `int` | ❌ | ❌ | `120` | Define the ttlSecondsAfterFinished |
| workload.[workload-name].activeDeadlineSeconds | `int` | ❌ | ❌ | | Define the activeDeadlineSeconds |
---
Notes:
View common `keys` of `controllers` in [Controllers Documentation](controllers.md).
View common `keys` of `workload` in [workload Documentation](workload.md).
---
Examples:
```yaml
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: CronJob
@@ -46,7 +46,7 @@ controllers:
podSpec:
restartPolicy: OnFailure
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: CronJob
+12 -11
View File
@@ -1,26 +1,27 @@
# DaemonSet
| Key | Type | Required | Helm Template | Default | Description |
| :--------------------------------------------------------- | :-------: | :------: | :-----------: | :---------------------------------------------------: | :-------------------------------------------------------------------------- |
| controllers.[controller-name].strategy | `string` | ❌ | ❌ | `RollingUpdate` | Define the strategy of the controller (OnDelete, RollingUpdate) |
| controllers.[controller-name].rollingUpdate | `dict` | ❌ | ❌ | `{}` | Holds the rollingUpdate options, Only when strategy is RollingUpdate |
| controllers.[controller-name].rollingUpdate.maxUnavailable | `int` | ❌ | ❌ | | Define the maxUnavailable, Only when strategy is RollingUpdate |
| controllers.[controller-name].rollingUpdate.maxSurge | `int` | ❌ | ❌ | | Define the maxSurge, Only when strategy is RollingUpdate |
| Key | Type | Required | Helm Template | Default | Description |
| :---------------------------------------------------- | :------: | :------: | :-----------: | :-------------: | :------------------------------------------------------------------- |
| workload.[workload-name].strategy | `string` | ❌ | ❌ | `RollingUpdate` | Define the strategy of the workload (OnDelete, RollingUpdate) |
| workload.[workload-name].rollingUpdate | `dict` | ❌ | ❌ | `{}` | Holds the rollingUpdate options, Only when strategy is RollingUpdate |
| workload.[workload-name].rollingUpdate.maxUnavailable | `int` | ❌ | ❌ | | Define the maxUnavailable, Only when strategy is RollingUpdate |
| workload.[workload-name].rollingUpdate.maxSurge | `int` | ❌ | ❌ | | Define the maxSurge, Only when strategy is RollingUpdate |
---
Notes:
View common `keys` of `controllers` in [Controllers Documentation](controllers.md).
View common `keys` of `workload` in [workload Documentation](workload.md).
> Value of `controllers.[controller-name].podSpec.restartPolicy` can only be `Always` for this type of controller
> Value of `workload.[workload-name].podSpec.restartPolicy` can only be `Always` for this type of workload
---
Examples:
```yaml
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: DaemonSet
@@ -32,7 +33,7 @@ controllers:
maxSurge: 1
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: DaemonSet
+11 -11
View File
@@ -1,27 +1,27 @@
# Deployment
| Key | Type | Required | Helm Template | Default | Description |
| :--------------------------------------------------------- | :-------: | :------: | :-----------: | :---------------------------------------------------: | :-------------------------------------------------------------------------- |
| controllers.[controller-name].strategy | `string` | ❌ | ❌ | `Recreate` | Define the strategy of the controller (Recreate, RollingUpdate) |
| controllers.[controller-name].rollingUpdate | `dict` | ❌ | ❌ | `{}` | Holds the rollingUpdate options, Only when strategy is RollingUpdate |
| controllers.[controller-name].rollingUpdate.maxUnavailable | `int` | ❌ | ❌ | | Define the maxUnavailable, Only when strategy is RollingUpdate |
| controllers.[controller-name].rollingUpdate.maxSurge | `int` | ❌ | ❌ | | Define the maxSurge, Only when strategy is RollingUpdate |
| Key | Type | Required | Helm Template | Default | Description |
| :---------------------------------------------------- | :------: | :------: | :-----------: | :--------: | :------------------------------------------------------------------- |
| workload.[workload-name].strategy | `string` | ❌ | ❌ | `Recreate` | Define the strategy of the workload (Recreate, RollingUpdate) |
| workload.[workload-name].rollingUpdate | `dict` | ❌ | ❌ | `{}` | Holds the rollingUpdate options, Only when strategy is RollingUpdate |
| workload.[workload-name].rollingUpdate.maxUnavailable | `int` | ❌ | ❌ | | Define the maxUnavailable, Only when strategy is RollingUpdate |
| workload.[workload-name].rollingUpdate.maxSurge | `int` | ❌ | ❌ | | Define the maxSurge, Only when strategy is RollingUpdate |
---
Notes:
View common `keys` of `controllers` in [Controllers Documentation](controllers.md).
View common `keys` of `workload` in [workload Documentation](workload.md).
> Value of `controllers.[controller-name].podSpec.restartPolicy` can only be `Always` for this type of controller
> Value of `workload.[workload-name].podSpec.restartPolicy` can only be `Always` for this type of workload
---
Examples:
```yaml
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Deployment
@@ -33,7 +33,7 @@ controllers:
maxSurge: 1
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: Deployment
@@ -0,0 +1,66 @@
# Image Pull Secret
| Key | Type | Required | Helm Template | Default | Description |
| :------------------------------------------------- | :-------: | :------: | :-----------: | :-----: | :---------------------------------------------- |
| imagePullSecret | `dict` | ❌ | ❌ | `{}` | Define the image pull secret as dicts |
| imagePullSecret.[pull-secret-name] | `dict` | ✅ | ❌ | `{}` | Holds configMap definition |
| imagePullSecret.[pull-secret-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the image pull secret |
| imagePullSecret.[pull-secret-name].labels | `dict` | ❌ | ✅ | `{}` | Additional labels for image pull secret |
| imagePullSecret.[pull-secret-name].annotations | `dict` | ❌ | ✅ | `{}` | Additional annotations for image pull secret |
| imagePullSecret.[pull-secret-name].data | `dict` | ✅ | ✅ | `{}` | Define the data of the image pull secret |
| imagePullSecret.[pull-secret-name].data.registry | `string` | ✅ | ✅ | `""` | Define the registry of the image pull secret |
| imagePullSecret.[pull-secret-name].data.username | `string` | ✅ | ✅ | `""` | Define the username of the image pull secret |
| imagePullSecret.[pull-secret-name].data.password | `string` | ✅ | ✅ | `""` | Define the password of the image pull secret |
| imagePullSecret.[pull-secret-name].data.email | `string` | ✅ | ✅ | `""` | Define the email of the image pull secret |
| imagePullSecret.[pull-secret-name].targetSelectAll | `boolean` | ❌ | ❌ | | Whether to assign the secret to all pods or not |
| imagePullSecret.[pull-secret-name].targetSelector | `list` | ❌ | ❌ | `[]` | Define the pod(s) to assign the secret |
> When `targetSelectAll` is `true`, it will assign the secret to all pods (`targetSelector` is ignored in this case)
> When `targetSelector` is a list, each entry is a string, referencing the pod(s) name that will be assigned.
> When `targetSelector` is a empty, it will assign the secret to the primary pod
---
Appears in:
- `.Values.imagePullSecret`
---
Naming scheme:
- `$FullName-$ImagePullSecretName` (release-name-chart-name-imagePullSecretName)
---
Examples:
```yaml
imagePullSecret:
pull-secret-name:
enabled: true
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
data:
registry: quay.io
username: my_user
password: my_pass
email: my_mail@example.com
targetSelectAll: true
other-pull-secret-name:
enabled: true
data:
registry: "{{ .Values.my_registry }}"
username: "{{ .Values.my_user }}"
password: "{{ .Values.my_pass }}"
email: "{{ .Values.my_mail }}"
targetSelector:
- workload-name1
- workload-name2
```
@@ -1,66 +0,0 @@
# Image Pull Secrets
| Key | Type | Required | Helm Template | Default | Description |
| :-------------------------------------------------- | :-------: | :------: | :-----------: | :-----: | :---------------------------------------------- |
| imagePullSecrets | `dict` | ❌ | ❌ | `{}` | Define the image pull secrets as dicts |
| imagePullSecrets.[pull-secret-name] | `dict` | ✅ | ❌ | `{}` | Holds configMap definition |
| imagePullSecrets.[pull-secret-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the image pull secret |
| imagePullSecrets.[pull-secret-name].labels | `dict` | ❌ | ✅ | `{}` | Additional labels for image pull secret |
| imagePullSecrets.[pull-secret-name].annotations | `dict` | ❌ | ✅ | `{}` | Additional annotations for image pull secret |
| imagePullSecrets.[pull-secret-name].data | `dict` | ✅ | ✅ | `{}` | Define the data of the image pull secret |
| imagePullSecrets.[pull-secret-name].data.registry | `string` | ✅ | ✅ | `""` | Define the registry of the image pull secret |
| imagePullSecrets.[pull-secret-name].data.username | `string` | ✅ | ✅ | `""` | Define the username of the image pull secret |
| imagePullSecrets.[pull-secret-name].data.password | `string` | ✅ | ✅ | `""` | Define the password of the image pull secret |
| imagePullSecrets.[pull-secret-name].data.email | `string` | ✅ | ✅ | `""` | Define the email of the image pull secret |
| imagePullSecrets.[pull-secret-name].targetSelectAll | `boolean` | ❌ | ❌ | | Whether to assign the secret to all pods or not |
| imagePullSecrets.[pull-secret-name].targetSelector | `list` | ❌ | ❌ | `[]` | Define the pod(s) to assign the secret |
> When `targetSelectAll` is `true`, it will assign the secret to all pods (`targetSelector` is ignored in this case)
> When `targetSelector` is a list, each entry is a string, referencing the pod(s) name that will be assigned.
> When `targetSelector` is a empty, it will assign the secret to the primary pod
---
Appears in:
- `.Values.imagePullSecrets`
---
Naming scheme:
- `$FullName-$ImagePullSecretName` (release-name-chart-name-imagePullSecretName)
---
Examples:
```yaml
imagePullSecrets:
pull-secret-name:
enabled: true
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
data:
registry: quay.io
username: my_user
password: my_pass
email: my_mail@example.com
targetSelectAll: true
other-pull-secret-name:
enabled: true
data:
registry: "{{ .Values.my_registry }}"
username: "{{ .Values.my_user }}"
password: "{{ .Values.my_pass }}"
email: "{{ .Values.my_mail }}"
targetSelector:
- controller-name1
- controller-name2
```
+12 -12
View File
@@ -1,27 +1,27 @@
# Job
| Key | Type | Required | Helm Template | Default | Description |
| :---------------------------------------------------- | :------: | :------: | :-----------: | :----------: | :---------------------------------------------- |
| controllers.[controller-name].completionMode | `string` | ❌ | ❌ | `NonIndexed` | Define the completionMode (Indexed, NonIndexed) |
| controllers.[controller-name].backoffLimit | `int` | ❌ | ❌ | `5` | Define the backoffLimit |
| controllers.[controller-name].completions | `int` | ❌ | ❌ | | Define the completions |
| controllers.[controller-name].parallelism | `int` | ❌ | ❌ | `1` | Define the parallelism |
| controllers.[controller-name].ttlSecondsAfterFinished | `int` | ❌ | ❌ | `120` | Define the ttlSecondsAfterFinished |
| controllers.[controller-name].activeDeadlineSeconds | `int` | ❌ | ❌ | | Define the activeDeadlineSeconds |
| Key | Type | Required | Helm Template | Default | Description |
| :----------------------------------------------- | :------: | :------: | :-----------: | :----------: | :---------------------------------------------- |
| workload.[workload-name].completionMode | `string` | ❌ | ❌ | `NonIndexed` | Define the completionMode (Indexed, NonIndexed) |
| workload.[workload-name].backoffLimit | `int` | ❌ | ❌ | `5` | Define the backoffLimit |
| workload.[workload-name].completions | `int` | ❌ | ❌ | | Define the completions |
| workload.[workload-name].parallelism | `int` | ❌ | ❌ | `1` | Define the parallelism |
| workload.[workload-name].ttlSecondsAfterFinished | `int` | ❌ | ❌ | `120` | Define the ttlSecondsAfterFinished |
| workload.[workload-name].activeDeadlineSeconds | `int` | ❌ | ❌ | | Define the activeDeadlineSeconds |
---
Notes:
View common `keys` of `controllers` in [Controllers Documentation](controllers.md).
View common `keys` of `workload` in [workload Documentation](workload.md).
---
Examples:
```yaml
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: Job
@@ -34,7 +34,7 @@ controllers:
podSpec:
restartPolicy: Never
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: Job
+50
View File
@@ -0,0 +1,50 @@
# Secret
| Key | Type | Required | Helm Template | Default | Description |
| :------------------------------- | :-------: | :------: | :-----------: | :------: | :-------------------------------- |
| secret | `dict` | ❌ | ❌ | `{}` | Define the secret as dicts |
| secret.[secret-name] | `dict` | ✅ | ❌ | `{}` | Holds secret definition |
| secret.[secret-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the secret |
| secret.[secret-name].labels | `dict` | ❌ | ✅ | `{}` | Additional labels for secret |
| secret.[secret-name].annotations | `dict` | ❌ | ✅ | `{}` | Additional annotations for secret |
| secret.[secret-name].type | `string` | ❌ | ✅ | `Opaque` | Custom secret type |
| secret.[secret-name].data | `dict` | ✅ | ✅ | `{}` | Define the data of the secret |
---
Appears in:
- `.Values.secret`
---
Naming scheme:
- `$FullName-$SecretName` (release-name-chart-name-SecretName)
---
Examples:
```yaml
secret:
secret-name:
enabled: true
type: CustomSecretType
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
data:
key: value
other-secret-name:
enabled: true
data:
key: |
multi line
text value
```
-50
View File
@@ -1,50 +0,0 @@
# Secret
| Key | Type | Required | Helm Template | Default | Description |
| :-------------------------------- | :-------: | :------: | :-----------: | :------: | :-------------------------------- |
| secrets | `dict` | ❌ | ❌ | `{}` | Define the secrets as dicts |
| secrets.[secret-name] | `dict` | ✅ | ❌ | `{}` | Holds secret definition |
| secrets.[secret-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the secret |
| secrets.[secret-name].labels | `dict` | ❌ | ✅ | `{}` | Additional labels for secret |
| secrets.[secret-name].annotations | `dict` | ❌ | ✅ | `{}` | Additional annotations for secret |
| secrets.[secret-name].type | `string` | ❌ | ✅ | `Opaque` | Custom secret type |
| secrets.[secret-name].data | `dict` | ✅ | ✅ | `{}` | Define the data of the secret |
---
Appears in:
- `.Values.secrets`
---
Naming scheme:
- `$FullName-$SecretName` (release-name-chart-name-SecretName)
---
Examples:
```yaml
secrets:
secret-name:
enabled: true
type: CustomSecretType
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
data:
key: value
other-secret-name:
enabled: true
data:
key: |
multi line
text value
```
@@ -0,0 +1,52 @@
# Service Account
| Key | Type | Required | Helm Template | Default | Description |
| :--------------------------------------- | :-------: | :------: | :-----------: | :-----: | :------------------------------------------------------ |
| serviceAccount | `dict` | ❌ | ❌ | `{}` | Define the serviceAccount as dicts |
| serviceAccount.[sa-name] | `dict` | ✅ | ❌ | `{}` | Holds secret definition |
| serviceAccount.[sa-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the secret |
| serviceAccount.[sa-name].primary | `boolean` | ❌ | ❌ | `false` | Sets the service account as primary |
| serviceAccount.[sa-name].labels | `dict` | ❌ | ✅ | `{}` | Additional labels for secret |
| serviceAccount.[sa-name].annotations | `dict` | ❌ | ✅ | `{}` | Additional annotations for secret |
| serviceAccount.[sa-name].targetSelectAll | `boolean` | ❌ | ❌ | | Whether to assign the serviceAccount to all pods or not |
| serviceAccount.[sa-name].targetSelector | `list` | ❌ | ❌ | `[]` | Define the pod(s) to assign the serviceAccount |
> When `targetSelectAll` is `true`, it will assign the serviceAccount to all pods (`targetSelector` is ignored in this case)
> When `targetSelector` is a list, each entry is a string, referencing the pod(s) name that will be assigned.
> When `targetSelector` is a empty, it will assign the serviceAccount to the primary pod
---
Appears in:
- `.Values.serviceAccount`
---
Naming scheme:
- Primary: `$FullName` (release-name-chart-name)
- Non-Primary: `$FullName-$ServiceAccountName` (release-name-chart-name-ServiceAccountName)
---
Examples:
```yaml
serviceAccount:
sa-name:
enabled: true
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
targetSelectAll: true
other-sa-name:
enabled: true
targetSelector:
- pod-name
- other-pod-name
```
@@ -1,52 +0,0 @@
# Service Account
| Key | Type | Required | Helm Template | Default | Description |
| :---------------------------------------- | :-------: | :------: | :-----------: | :-----: | :------------------------------------------------------ |
| serviceAccounts | `dict` | ❌ | ❌ | `{}` | Define the serviceAccounts as dicts |
| serviceAccounts.[sa-name] | `dict` | ✅ | ❌ | `{}` | Holds secret definition |
| serviceAccounts.[sa-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the secret |
| serviceAccounts.[sa-name].primary | `boolean` | ❌ | ❌ | `false` | Sets the service account as primary |
| serviceAccounts.[sa-name].labels | `dict` | ❌ | ✅ | `{}` | Additional labels for secret |
| serviceAccounts.[sa-name].annotations | `dict` | ❌ | ✅ | `{}` | Additional annotations for secret |
| serviceAccounts.[sa-name].targetSelectAll | `boolean` | ❌ | ❌ | | Whether to assign the serviceAccount to all pods or not |
| serviceAccounts.[sa-name].targetSelector | `list` | ❌ | ❌ | `[]` | Define the pod(s) to assign the serviceAccount |
> When `targetSelectAll` is `true`, it will assign the serviceAccount to all pods (`targetSelector` is ignored in this case)
> When `targetSelector` is a list, each entry is a string, referencing the pod(s) name that will be assigned.
> When `targetSelector` is a empty, it will assign the serviceAccount to the primary pod
---
Appears in:
- `.Values.serviceAccounts`
---
Naming scheme:
- Primary: `$FullName` (release-name-chart-name)
- Non-Primary: `$FullName-$ServiceAccountName` (release-name-chart-name-ServiceAccountName)
---
Examples:
```yaml
serviceAccounts:
sa-name:
enabled: true
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
targetSelectAll: true
other-sa-name:
enabled: true
targetSelector:
- pod-name
- other-pod-name
```
+11 -11
View File
@@ -1,27 +1,27 @@
# DaemonSet
| Key | Type | Required | Helm Template | Default | Description |
| :--------------------------------------------------------- | :-------: | :------: | :-----------: | :---------------------------------------------------: | :-------------------------------------------------------------------------- |
| controllers.[controller-name].strategy | `string` | ❌ | ❌ | `RollingUpdate` | Define the strategy of the controller (OnDelete, RollingUpdate) |
| controllers.[controller-name].rollingUpdate | `dict` | ❌ | ❌ | `{}` | Holds the rollingUpdate options, Only when strategy is RollingUpdate |
| controllers.[controller-name].rollingUpdate.maxUnavailable | `int` | ❌ | ❌ | | Define the maxUnavailable, Only when strategy is RollingUpdate |
| controllers.[controller-name].rollingUpdate.partition | `int` | ❌ | ❌ | | Define the partition, Only when strategy is RollingUpdate |
| Key | Type | Required | Helm Template | Default | Description |
| :---------------------------------------------------- | :------: | :------: | :-----------: | :-------------: | :------------------------------------------------------------------- |
| workload.[workload-name].strategy | `string` | ❌ | ❌ | `RollingUpdate` | Define the strategy of the workload (OnDelete, RollingUpdate) |
| workload.[workload-name].rollingUpdate | `dict` | ❌ | ❌ | `{}` | Holds the rollingUpdate options, Only when strategy is RollingUpdate |
| workload.[workload-name].rollingUpdate.maxUnavailable | `int` | ❌ | ❌ | | Define the maxUnavailable, Only when strategy is RollingUpdate |
| workload.[workload-name].rollingUpdate.partition | `int` | ❌ | ❌ | | Define the partition, Only when strategy is RollingUpdate |
---
Notes:
View common `keys` of `controllers` in [Controllers Documentation](controllers.md).
View common `keys` of `workload` in [workload Documentation](workload.md).
> Value of `controllers.[controller-name].podSpec.restartPolicy` can only be `Always` for this type of controller
> Value of `workload.[workload-name].podSpec.restartPolicy` can only be `Always` for this type of workload
---
Examples:
```yaml
controllers:
controller-name:
workload:
workload-name:
enabled: true
primary: true
type: StatefulSet
@@ -33,7 +33,7 @@ controllers:
partition: 1
podSpec: {}
other-controller-name:
other-workload-name:
enabled: true
primary: false
type: StatefulSet
+132
View File
@@ -0,0 +1,132 @@
# workload
| Key | Type | Required | Helm Template | Default | Description |
| :----------------------------------------------------------------- | :-------: | :------: | :-----------: | :-------------------------------------------------------------: | :--------------------------------------------------------------------------------- |
| workload | `dict` | ❌ | ❌ | `{}` | Define the workload as dicts |
| workload.[workload-name] | `dict` | ✅ | ❌ | `{}` | Holds workload definition |
| workload.[workload-name].enabled | `boolean` | ✅ | ❌ | `false` | Enables or Disables the workload |
| workload.[workload-name].primary | `boolean` | ✅ | ❌ | `false` | Sets the workload as primary |
| workload.[workload-name].labels | `dict` | ❌ | ❌ | `{}` | Additional labels for workload |
| workload.[workload-name].labels.[key-name] | `string` | ❌ | ❌ | | [Key] of the additional label |
| workload.[workload-name].labels.[key-name].[value] | `string` | ❌ | ✅ | | [Value] for [key] of the additional label |
| workload.[workload-name].annotations | `dict` | ❌ | ❌ | `{}` | Additional annotations for workload |
| workload.[workload-name].annotations.[key-name] | `string` | ❌ | ❌ | | [Key] of the additional annotation |
| workload.[workload-name].annotations.[key-name].[value] | `string` | ❌ | ✅ | | [Value] for [key] of the additional annotation |
| workload.[workload-name].type | `string` | ✅ | ❌ | `""` | Define the kind of the workload (Deployment, DaemonSet, StatefulSet, CronJob, Job) |
| workload.[workload-name].podSpec | `dict` | ✅ | ❌ | `{}` | Holds the pod definition |
| workload.[workload-name].podSpec.labels | `dict` | ❌ | ❌ | `{}` | Additional Pod Labels |
| workload.[workload-name].podSpec.labels.[key-name] | `string` | ❌ | ❌ | | [Key] of the additional label |
| workload.[workload-name].podSpec.labels.[key-name].[value] | `string` | ❌ | ✅ | | [Value] for [key] of the additional label |
| workload.[workload-name].podSpec.annotations | `dict` | ❌ | ✅ | `{}` | Pod Annotations |
| workload.[workload-name].podSpec.annotations.[key-name] | `string` | ❌ | ❌ | | [Key] of the additional annotation |
| workload.[workload-name].podSpec.annotations.[key-name].[value] | `string` | ❌ | ✅ | | [Value] of [key] of the additional annotation |
| workload.[workload-name].podSpec.automountServiceAccountToken | `boolean` | ❌ | ❌ | `{{ .Values.podOptions.automountServiceAccoutnToken }}` (false) | Pod's automountServiceAccountToken |
| workload.[workload-name].podSpec.hostNetwork | `boolean` | ❌ | ❌ | `{{ .Values.podOptions.hostNetwork }}` (false) | Pod's hostNetwork |
| workload.[workload-name].podSpec.enableServiceLinks | `boolean` | ❌ | ❌ | `{{ .Values.podOptions.enableServiceLinks }}` (false) | Pod's enableServiceLinks |
| workload.[workload-name].podSpec.restartPolicy | `string` | ❌ | ✅ | `{{ .Values.podOptions.restartPolicy }}` (Always) | Pod's restartPolicy. (Always, Never, OnFailure) |
| workload.[workload-name].podSpec.schedulerName | `string` | ❌ | ✅ | `{{ .Values.podOptions.schedulerName }}` ("") | Pod's schedulerName |
| workload.[workload-name].podSpec.priorityClassName | `string` | ❌ | ✅ | `{{ .Values.podOptions.priorityClassName }}` ("") | Pod's priorityClassName |
| workload.[workload-name].podSpec.hostname | `string` | ❌ | ✅ | `""` | Pod's hostname |
| workload.[workload-name].podSpec.terminationGracePeriodSeconds | `int` | ❌ | ✅ | `{{ .Values.podOptions.terminationGracePeriodSeconds }}` (120) | Pod's terminationGracePeriodSeconds |
| workload.[workload-name].podSpec.nodeSelector | `dict` | ❌ | ❌ | `{{ .Values.podOptions.nodeSelector }}` ({}) | Pod's nodeSelector |
| workload.[workload-name].podSpec.nodeSelector.[key-name] | `string` | ❌ | ❌ | | [Key] for nodeSelector |
| workload.[workload-name].podSpec.nodeSelector.[key-name].[value] | `string` | ❌ | ✅ | | [Value] for [key] for nodeSelector |
| workload.[workload-name].podSpec.hostAliases | `list` | ❌ | ❌ | | Pod's host aliases |
| workload.[workload-name].podSpec.hostAliases.ip | `string` | ❌ | ✅ | | Value for `ip` in hosts aliases |
| workload.[workload-name].podSpec.hostAliases.hostnames | `list` | ❌ | ❌ | | Hostnames for the `ip` in hosts aliases |
| workload.[workload-name].podSpec.hostAliases.hostnames.[host-name] | `string` | ❌ | ✅ | | [Value] for `hostnames` for the `ip` in hosts aliases |
| workload.[workload-name].podSpec.dnsPolicy | `string` | ❌ | ✅ | `{{ .Values.podOptions.dnsPolicy }}` (ClusterFirst) | Pod's DNS Policy (ClusterFirst, ClusterFirstWithHostNet, Default, None). |
| workload.[workload-name].podSpec.tolerations | `list` | ❌ | ❌ | `{{ .Values.podOptions.tolerations }}` ([]) | Pod's Tolerations |
| workload.[workload-name].podSpec.tolerations.operator | `string` | ✅ | ✅ | | Toleration's `operator` (Equal, Exists) |
| workload.[workload-name].podSpec.tolerations.key | `string` | ❌/✅ | ✅ | | Toleration's `key`. Required only when `operator` = `Equal` |
| workload.[workload-name].podSpec.tolerations.value | `string` | ❌/✅ | ✅ | | Toleration's `value`. Required only when `operator` = `Equal` |
| workload.[workload-name].podSpec.tolerations.effect | `string` | ❌ | ✅ | | Toleration's `effect`.(NoExecute, NoSchedule, PreferNoSchedule) |
| workload.[workload-name].podSpec.tolerations.tolerationSeconds | `int` | ❌ | ❌ | | Toleration's `tolerationSeconds`. |
| workload.[workload-name].podSpec.runtimeClassName | `string` | ✅ | ❌ | `{{ .Values.podOptions.runtimeClassName }}` ("") | Pod's runtimeClassName |
---
Notes
> `dnsPolicy` is set automatically to `ClusterFirstWithHostNet` when `hostNetwork` is `true` > `runtimeClassName` will ignore any value set and use the `.Values.global.ixChartContext.nvidiaRuntimeClassName`,
> if a GPU is assigned to a container and Scale Middleware sets `.Values.global.ixChartContext.addNvidiaRuntimeClass` to `true`.
> Note that it will only set the `runtimeClassName` on the pod that this container belongs to.
---
Appears in:
- `.Values.workload`
---
Naming scheme:
- Primary: `$FullName` (release-name-chart-name)
- Non-Primary: `$FullName-$WorkloadName` (release-name-chart-name-workload-name)
---
> Those are the common `keys` for all workload.
> Additional keys, information and examples, see on the specific kind of workload
- [Deployment](deployment.md)
- [DaemonSet](daemonset.md)
- [StatefulSet](statefulset.md)
- [CronJob](cronjob.md)
- [Job](job.md)
---
Examples:
```yaml
workload:
workload-name:
enabled: true
primary: true
labels:
key: value
annotations:
key: value
podSpec:
labels:
key: value
annotations:
key: value
automountServiceAccountToken: true
hostNetwork: false
enableServiceLinks: false
schedulerName: some-scheduler
priorityClassName: some-priority-class-name
hostname: some-hostname
terminationGracePeriodSeconds: 100
nodeSelector:
disk_type: ssd
hostAliases:
- ip: 10.10.10.100
hostnames:
- myserver.local
- storage.local
- ip: 10.10.10.101
hostnames:
- myotherserver.local
- backups.local
dnsPolicy: ClusterFirst
dnsConfig:
nameservers:
- 1.1.1.1
- 1.0.0.1
searches:
- ns1.svc.cluster-domain.example
- my.dns.search.suffix
options:
- name: ndots
value: "2"
- name: edns0
tolerations:
- operator: Exists
effect: NoExecute
tolerationSeconds: 3600
runtimeClassName: some-runtime-class
```
@@ -10,7 +10,7 @@ objectData: The object data to be used to render the CronJob.
{{- $rootCtx := .rootCtx -}}
{{- $objectData := .objectData -}}
{{- include "ix.v1.common.lib.controller.cronjobValidation" (dict "objectData" $objectData) }}
{{- include "ix.v1.common.lib.workload.cronjobValidation" (dict "objectData" $objectData) }}
---
apiVersion: batch/v1
kind: CronJob
@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.cronjobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "ix.v1.common.lib.workload.cronjobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
template:
metadata:
{{- $labels := (mustMerge ($objectData.podSpec.labels | default dict)
@@ -46,5 +46,5 @@ spec:
{{- . | nindent 12 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 10 }}
{{- include "ix.v1.common.lib.workload.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 10 }}
{{- end -}}
@@ -10,7 +10,7 @@ objectData: The object data to be used to render the DaemonSet.
{{- $rootCtx := .rootCtx -}}
{{- $objectData := .objectData -}}
{{- include "ix.v1.common.lib.controller.daemonsetValidation" (dict "objectData" $objectData) }}
{{- include "ix.v1.common.lib.workload.daemonsetValidation" (dict "objectData" $objectData) }}
---
apiVersion: apps/v1
kind: DaemonSet
@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.daemonsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "ix.v1.common.lib.workload.daemonsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
selector:
matchLabels:
{{- include "ix.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "podName" $objectData.name) | nindent 6 }}
@@ -49,5 +49,5 @@ spec:
{{- . | nindent 8 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 6 }}
{{- include "ix.v1.common.lib.workload.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 6 }}
{{- end -}}
@@ -10,7 +10,7 @@ objectData: The object data to be used to render the Deployment.
{{- $rootCtx := .rootCtx -}}
{{- $objectData := .objectData -}}
{{- include "ix.v1.common.lib.controller.deploymentValidation" (dict "objectData" $objectData) }}
{{- include "ix.v1.common.lib.workload.deploymentValidation" (dict "objectData" $objectData) }}
---
apiVersion: apps/v1
kind: Deployment
@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.deploymentSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "ix.v1.common.lib.workload.deploymentSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
selector:
matchLabels:
{{- include "ix.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "podName" $objectData.name) | nindent 6 }}
@@ -49,5 +49,5 @@ spec:
{{- . | nindent 8 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 6 }}
{{- include "ix.v1.common.lib.workload.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 6 }}
{{- end -}}
@@ -10,7 +10,7 @@ objectData: The object data to be used to render the Job.
{{- $rootCtx := .rootCtx -}}
{{- $objectData := .objectData -}}
{{- include "ix.v1.common.lib.controller.jobValidation" (dict "objectData" $objectData) }}
{{- include "ix.v1.common.lib.workload.jobValidation" (dict "objectData" $objectData) }}
---
apiVersion: batch/v1
kind: Job
@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "ix.v1.common.lib.workload.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
template:
metadata:
{{- $labels := (mustMerge ($objectData.podSpec.labels | default dict)
@@ -46,5 +46,5 @@ spec:
{{- . | nindent 8 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 6 }}
{{- include "ix.v1.common.lib.workload.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 6 }}
{{- end -}}
@@ -10,7 +10,7 @@ objectData: The object data to be used to render the StatefulSet.
{{- $rootCtx := .rootCtx -}}
{{- $objectData := .objectData -}}
{{- include "ix.v1.common.lib.controller.statefulsetValidation" (dict "objectData" $objectData) }}
{{- include "ix.v1.common.lib.workload.statefulsetValidation" (dict "objectData" $objectData) }}
---
apiVersion: apps/v1
kind: StatefulSet
@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.statefulsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "ix.v1.common.lib.workload.statefulsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
selector:
matchLabels:
{{- include "ix.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "podName" $objectData.name) | nindent 6 }}
@@ -49,5 +49,5 @@ spec:
{{- . | nindent 8 }}
{{- end }}
spec:
{{- include "ix.v1.common.lib.controller.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 6 }}
{{- include "ix.v1.common.lib.workload.pod" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 6 }}
{{- end -}}
@@ -1,63 +0,0 @@
{{/* Controllers Basic Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controllers.primaryValidation" $ -}}
*/}}
{{- define "ix.v1.common.lib.controllers.primaryValidation" -}}
{{/* Initialize values */}}
{{- $hasPrimary := false -}}
{{- $hasEnabled := false -}}
{{/* Go over controllers */}}
{{- range $name, $controller := .Values.controllers -}}
{{- if not (mustHas $controller.type (list "Deployment" "StatefulSet" "DaemonSet" "Job" "CronJob")) -}}
{{- fail (printf "Controller - Expected <type> to be one of [Deployment, StatefulSet, DaemonSet, Job, CronJob], but got [%s]" $controller.type) -}}
{{- end -}}
{{/* If controller is enabled */}}
{{- if $controller.enabled -}}
{{- $hasEnabled = true -}}
{{/* And controller is primary */}}
{{- if and (hasKey $controller "primary") ($controller.primary) -}}
{{/* Fail if there is already a primary controller */}}
{{- if $hasPrimary -}}
{{- fail "Controller - Only one controller can be primary" -}}
{{- end -}}
{{- $hasPrimary = true -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/* Require at least one primary controller, if any enabled */}}
{{- if and $hasEnabled (not $hasPrimary) -}}
{{- fail "Controller - At least one enabled controller must be primary" -}}
{{- end -}}
{{- end -}}
{{/* Controller Basic Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.basicValidation" (dict "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
labels: The labels of the object.
annotations: The annotations of the object.
*/}}
{{- define "ix.v1.common.lib.controller.basicValidation" -}}
{{- $objectData := .objectData -}}
{{- if and $objectData.labels (not (kindIs "map" $objectData.labels)) -}}
{{- fail (printf "Controller - Expected <labels> to be a dictionary, but got [%v]" (kindOf $objectData.labels)) -}}
{{- end -}}
{{- if and $objectData.annotations (not (kindIs "map" $objectData.annotations)) -}}
{{- fail (printf "Controller - Expected <annotations> to be a dictionary, but got [%v]" (kindOf $objectData.annotations)) -}}
{{- end -}}
{{- end -}}
@@ -1,16 +1,16 @@
{{/* Returns Image Pull Secret List */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.pod.imagePullSecrets" (dict "rootCtx" $ "objectData" $objectData) }}
{{ include "ix.v1.common.lib.pod.imagePullSecret" (dict "rootCtx" $ "objectData" $objectData) }}
rootCtx: The root context of the template. It is used to access the global context.
objectData: The object data to be used to render the Pod.
*/}}
{{- define "ix.v1.common.lib.pod.imagePullSecrets" -}}
{{- define "ix.v1.common.lib.pod.imagePullSecret" -}}
{{- $rootCtx := .rootCtx -}}
{{- $objectData := .objectData -}}
{{- $imgPullSecrets := list -}}
{{- range $name, $imgPull := $rootCtx.Values.imagePullSecrets -}}
{{- range $name, $imgPull := $rootCtx.Values.imagePullSecret -}}
{{- $pullName := (printf "%s-%s" (include "ix.v1.common.lib.chart.names.fullname" $rootCtx) $name) -}}
{{- if $imgPull.enabled -}}
@@ -11,7 +11,7 @@ objectData: The object data to be used to render the Pod.
{{- $saName := "default" -}}
{{- $saNameCount := 0 -}}
{{- range $name, $serviceAccount := $rootCtx.Values.serviceAccounts -}}
{{- range $name, $serviceAccount := $rootCtx.Values.serviceAccount -}}
{{- $name = (printf "%s-%s" (include "ix.v1.common.lib.chart.names.fullname" $rootCtx) $name) -}}
{{- if $serviceAccount.enabled -}}
@@ -34,7 +34,7 @@ objectData:
{{/* Initialize values */}}
{{- $hasPrimary := false -}}
{{- range $name, $serviceAccount := .Values.serviceAccounts -}}
{{- range $name, $serviceAccount := .Values.serviceAccount -}}
{{/* If service account is enabled */}}
{{- if $serviceAccount.enabled -}}
@@ -1,6 +1,6 @@
{{/* CronJob Spec */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.cronjobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.cronjobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
schedule: The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
@@ -11,7 +11,7 @@ objectData:
timezone: The timezone name. Defaults to .Values.TZ.
+jobSpec data
*/}}
{{- define "ix.v1.common.lib.controller.cronjobSpec" -}}
{{- define "ix.v1.common.lib.workload.cronjobSpec" -}}
{{- $objectData := .objectData -}}
{{- $rootCtx := .rootCtx -}}
timeZone: {{ (tpl ($objectData.timezone | default $rootCtx.Values.TZ) $rootCtx) | quote }}
@@ -22,5 +22,5 @@ successfulJobsHistoryLimit: {{ $objectData.successfulJobsHistoryLimit | default
startingDeadlineSeconds: {{ $objectData.startingDeadlineSeconds | default nil }}
jobTemplate:
spec:
{{- include "ix.v1.common.lib.controller.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 4 }}
{{- include "ix.v1.common.lib.workload.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 4 }}
{{- end -}}
@@ -1,13 +1,13 @@
{{/* DaemonSet Spec */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.daemonsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.daemonsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
replicas: The number of replicas.
revisionHistoryLimit: The number of old ReplicaSets to retain to allow rollback.
strategy: The daemonset strategy to use to replace existing pods with new ones.
*/}}
{{- define "ix.v1.common.lib.controller.daemonsetSpec" -}}
{{- define "ix.v1.common.lib.workload.daemonsetSpec" -}}
{{- $objectData := .objectData -}}
{{- $rootCtx := .rootCtx -}}
revisionHistoryLimit: {{ $objectData.revisionHistoryLimit | default 3 }}
@@ -1,13 +1,13 @@
{{/* Deployment Spec */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.deploymentSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.deploymentSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
replicas: The number of replicas.
revisionHistoryLimit: The number of old ReplicaSets to retain to allow rollback.
strategy: The deployment strategy to use to replace existing pods with new ones.
*/}}
{{- define "ix.v1.common.lib.controller.deploymentSpec" -}}
{{- define "ix.v1.common.lib.workload.deploymentSpec" -}}
{{- $objectData := .objectData -}}
{{- $rootCtx := .rootCtx -}}
replicas: {{ $objectData.replicas | default 1 }}
@@ -1,6 +1,6 @@
{{/* Job Spec */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
backoffLimit: The number of retries before marking this job failed. Defaults to 6.
@@ -10,7 +10,7 @@ objectData:
ttlSecondsAfterFinished: TTLSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature.
completionMode: CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.
*/}}
{{- define "ix.v1.common.lib.controller.jobSpec" -}}
{{- define "ix.v1.common.lib.workload.jobSpec" -}}
{{- $objectData := .objectData -}}
{{- $rootCtx := .rootCtx -}}
backoffLimit: {{ $objectData.backoffLimit | default 5 }}
@@ -1,16 +1,16 @@
{{/* Pod Spec */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.pod" (dict "rootCtx" $ "objectData" $objectData) }}
{{ include "ix.v1.common.lib.workload.pod" (dict "rootCtx" $ "objectData" $objectData) }}
rootCtx: The root context of the template. It is used to access the global context.
objectData: The object data to be used to render the Pod.
*/}}
{{- define "ix.v1.common.lib.controller.pod" -}}
{{- define "ix.v1.common.lib.workload.pod" -}}
{{- $rootCtx := .rootCtx -}}
{{- $objectData := .objectData -}}
serviceAccountName: {{ include "ix.v1.common.lib.pod.serviceAccountName" (dict "rootCtx" $rootCtx "objectData" $objectData) }}
automountServiceAccountToken: {{ include "ix.v1.common.lib.pod.automountServiceAccountToken" (dict "rootCtx" $rootCtx "objectData" $objectData) }}
runtimeClassName: {{ include "ix.v1.common.lib.pod.runtimeClassName" (dict "rootCtx" $rootCtx "objectData" $objectData) }}
{{- with (include "ix.v1.common.lib.pod.imagePullSecrets" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim) }}
{{- with (include "ix.v1.common.lib.pod.imagePullSecret" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim) }}
imagePullSecrets:
{{- . | nindent 2 }}
{{- end }}
@@ -1,13 +1,13 @@
{{/* StatefulSet Spec */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.statefulsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.statefulsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
replicas: The number of replicas.
revisionHistoryLimit: The number of old ReplicaSets to retain to allow rollback.
strategy: The statefulset strategy to use to replace existing pods with new ones.
*/}}
{{- define "ix.v1.common.lib.controller.statefulsetSpec" -}}
{{- define "ix.v1.common.lib.workload.statefulsetSpec" -}}
{{- $objectData := .objectData -}}
{{- $rootCtx := .rootCtx -}}
replicas: {{ $objectData.replicas | default 1 }}
@@ -1,13 +1,13 @@
{{/* CronJob Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.cronjobValidation" (dict "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.cronjobValidation" (dict "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
completionMode: The completionMode of the object.
completions: The completions of the object.
parallelism: The parallelism of the object.
*/}}
{{- define "ix.v1.common.lib.controller.cronjobValidation" -}}
{{- define "ix.v1.common.lib.workload.cronjobValidation" -}}
{{- $objectData := .objectData -}}
{{- if $objectData.concurrencyPolicy -}}
@@ -24,6 +24,6 @@ objectData:
{{- end -}}
{{/* CronJob contains a job inside, so we validate job values too */}}
{{- include "ix.v1.common.lib.controller.jobValidation" (dict "objectData" $objectData) -}}
{{- include "ix.v1.common.lib.workload.jobValidation" (dict "objectData" $objectData) -}}
{{- end -}}
{{/* TODO: Extend validation for other values of cronjob */}}
@@ -1,12 +1,12 @@
{{/* DaemonSet Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.daemonsetValidation" (dict "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.daemonsetValidation" (dict "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
strategy: The strategy of the object.
rollingUpdate: The rollingUpdate of the object.
*/}}
{{- define "ix.v1.common.lib.controller.daemonsetValidation" -}}
{{- define "ix.v1.common.lib.workload.daemonsetValidation" -}}
{{- $objectData := .objectData -}}
{{- if $objectData.strategy -}}
@@ -1,12 +1,12 @@
{{/* Deployment Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.deploymentValidation" (dict "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.deploymentValidation" (dict "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
strategy: The strategy of the object.
rollingUpdate: The rollingUpdate of the object.
*/}}
{{- define "ix.v1.common.lib.controller.deploymentValidation" -}}
{{- define "ix.v1.common.lib.workload.deploymentValidation" -}}
{{- $objectData := .objectData -}}
{{- if $objectData.strategy -}}
@@ -1,13 +1,13 @@
{{/* Job Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.jobValidation" (dict "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.jobValidation" (dict "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
completionMode: The completionMode of the object.
completions: The completions of the object.
parallelism: The parallelism of the object.
*/}}
{{- define "ix.v1.common.lib.controller.jobValidation" -}}
{{- define "ix.v1.common.lib.workload.jobValidation" -}}
{{- $objectData := .objectData -}}
{{- if $objectData.completionMode -}}
@@ -1,12 +1,12 @@
{{/* StatefulSet Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.controller.statefulsetValidation" (dict "objectData" $objectData) -}}
{{ include "ix.v1.common.lib.workload.statefulsetValidation" (dict "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
strategy: The strategy of the object.
rollingUpdate: The rollingUpdate of the object.
*/}}
{{- define "ix.v1.common.lib.controller.statefulsetValidation" -}}
{{- define "ix.v1.common.lib.workload.statefulsetValidation" -}}
{{- $objectData := .objectData -}}
{{- if $objectData.strategy -}}
@@ -0,0 +1,63 @@
{{/* Workload Basic Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.workload.primaryValidation" $ -}}
*/}}
{{- define "ix.v1.common.lib.workload.primaryValidation" -}}
{{/* Initialize values */}}
{{- $hasPrimary := false -}}
{{- $hasEnabled := false -}}
{{/* Go over workload */}}
{{- range $name, $workload := .Values.workload -}}
{{- if not (mustHas $workload.type (list "Deployment" "StatefulSet" "DaemonSet" "Job" "CronJob")) -}}
{{- fail (printf "Workload - Expected <type> to be one of [Deployment, StatefulSet, DaemonSet, Job, CronJob], but got [%s]" $workload.type) -}}
{{- end -}}
{{/* If workload is enabled */}}
{{- if $workload.enabled -}}
{{- $hasEnabled = true -}}
{{/* And workload is primary */}}
{{- if and (hasKey $workload "primary") ($workload.primary) -}}
{{/* Fail if there is already a primary workload */}}
{{- if $hasPrimary -}}
{{- fail "Workload - Only one workload can be primary" -}}
{{- end -}}
{{- $hasPrimary = true -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/* Require at least one primary workload, if any enabled */}}
{{- if and $hasEnabled (not $hasPrimary) -}}
{{- fail "Workload - At least one enabled workload must be primary" -}}
{{- end -}}
{{- end -}}
{{/* Workload Basic Validation */}}
{{/* Call this template:
{{ include "ix.v1.common.lib.workload.basicValidation" (dict "objectData" $objectData) -}}
rootCtx: The root context of the template. It is used to access the global context.
objectData:
labels: The labels of the object.
annotations: The annotations of the object.
*/}}
{{- define "ix.v1.common.lib.workload.basicValidation" -}}
{{- $objectData := .objectData -}}
{{- if and $objectData.labels (not (kindIs "map" $objectData.labels)) -}}
{{- fail (printf "Workload - Expected <labels> to be a dictionary, but got [%v]" (kindOf $objectData.labels)) -}}
{{- end -}}
{{- if and $objectData.annotations (not (kindIs "map" $objectData.annotations)) -}}
{{- fail (printf "Workload - Expected <annotations> to be a dictionary, but got [%v]" (kindOf $objectData.annotations)) -}}
{{- end -}}
{{- end -}}
@@ -2,18 +2,18 @@
{{- define "ix.v1.common.loader.apply" -}}
{{/* Render ConfigMap(s) */}}
{{- include "ix.v1.common.spawner.configmaps" . | nindent 0 -}}
{{- include "ix.v1.common.spawner.configmap" . | nindent 0 -}}
{{/* Render Secret(s) */}}
{{- include "ix.v1.common.spawner.secrets" . | nindent 0 -}}
{{- include "ix.v1.common.spawner.secret" . | nindent 0 -}}
{{/* Render Image Pull Secrets(s) */}}
{{- include "ix.v1.common.spawner.imagePullSecrets" . | nindent 0 -}}
{{- include "ix.v1.common.spawner.imagePullSecret" . | nindent 0 -}}
{{/* Render Service Accounts(s) */}}
{{- include "ix.v1.common.spawner.serviceAccounts" . | nindent 0 -}}
{{- include "ix.v1.common.spawner.serviceAccount" . | nindent 0 -}}
{{/* Render Controller(s) */}}
{{- include "ix.v1.common.spawner.controllers" . | nindent 0 -}}
{{/* Render Workload(s) */}}
{{- include "ix.v1.common.spawner.workload" . | nindent 0 -}}
{{- end -}}
@@ -1,11 +1,11 @@
{{/* Configmap Spawwner */}}
{{/* Call this template:
{{ include "ix.v1.common.spawner.configmaps" $ -}}
{{ include "ix.v1.common.spawner.configmap" $ -}}
*/}}
{{- define "ix.v1.common.spawner.configmaps" -}}
{{- define "ix.v1.common.spawner.configmap" -}}
{{- range $name, $configmap := .Values.configmaps -}}
{{- range $name, $configmap := .Values.configmap -}}
{{- if $configmap.enabled -}}
@@ -1,11 +1,11 @@
{{/* Image Pull Secrets Spawner */}}
{{/* Call this template:
{{ include "ix.v1.common.spawner.imagePullSecrets" $ -}}
{{ include "ix.v1.common.spawner.imagePullSecret" $ -}}
*/}}
{{- define "ix.v1.common.spawner.imagePullSecrets" -}}
{{- define "ix.v1.common.spawner.imagePullSecret" -}}
{{- range $name, $imgPullSecret := .Values.imagePullSecrets -}}
{{- range $name, $imgPullSecret := .Values.imagePullSecret -}}
{{- if $imgPullSecret.enabled -}}
@@ -1,11 +1,11 @@
{{/* Secret Spawwner */}}
{{/* Call this template:
{{ include "ix.v1.common.spawner.secrets" $ -}}
{{ include "ix.v1.common.spawner.secret" $ -}}
*/}}
{{- define "ix.v1.common.spawner.secrets" -}}
{{- define "ix.v1.common.spawner.secret" -}}
{{- range $name, $secret := .Values.secrets -}}
{{- range $name, $secret := .Values.secret -}}
{{- if $secret.enabled -}}
@@ -1,14 +1,14 @@
{{/* Service Account Spawner */}}
{{/* Call this template:
{{ include "ix.v1.common.spawner.serviceAccounts" $ -}}
{{ include "ix.v1.common.spawner.serviceAccount" $ -}}
*/}}
{{- define "ix.v1.common.spawner.serviceAccounts" -}}
{{- define "ix.v1.common.spawner.serviceAccount" -}}
{{/* Primary validation for enabled service accounts. */}}
{{- include "ix.v1.common.lib.serviceAccount.primaryValidation" $ -}}
{{- range $name, $serviceAccount := .Values.serviceAccounts -}}
{{- range $name, $serviceAccount := .Values.serviceAccount -}}
{{- if $serviceAccount.enabled -}}
@@ -1,21 +1,21 @@
{{/* Controller Spawner */}}
{{/* Workload Spawner */}}
{{/* Call this template:
{{ include "ix.v1.common.spawner.controllers" $ -}}
{{ include "ix.v1.common.spawner.workload" $ -}}
*/}}
{{- define "ix.v1.common.spawner.controllers" -}}
{{- define "ix.v1.common.spawner.workload" -}}
{{/* Primary validation for enabled controllers. */}}
{{- include "ix.v1.common.lib.controllers.primaryValidation" $ -}}
{{/* Primary validation for enabled workload. */}}
{{- include "ix.v1.common.lib.workload.primaryValidation" $ -}}
{{- range $name, $controller := .Values.controllers -}}
{{- range $name, $workload := .Values.workload -}}
{{- if $controller.enabled -}}
{{- if $workload.enabled -}}
{{/* Create a copy of the controller */}}
{{- $objectData := (mustDeepCopy $controller) -}}
{{/* Create a copy of the workload */}}
{{- $objectData := (mustDeepCopy $workload) -}}
{{/* Generate the name of the controller */}}
{{/* Generate the name of the workload */}}
{{- $objectName := include "ix.v1.common.lib.chart.names.fullname" $ -}}
{{- if not $objectData.primary -}}
{{- $objectName = printf "%s-%s" (include "ix.v1.common.lib.chart.names.fullname" $) $name -}}
@@ -23,9 +23,9 @@
{{/* Perform validations */}}
{{- include "ix.v1.common.lib.chart.names.validation" (dict "name" $objectName) -}}
{{- include "ix.v1.common.lib.controller.basicValidation" (dict "objectData" $objectData) -}}
{{- include "ix.v1.common.lib.workload.basicValidation" (dict "objectData" $objectData) -}}
{{/* Set the name of the controller */}}
{{/* Set the name of the workload */}}
{{- $_ := set $objectData "name" $objectName -}}
{{/* Short name is the one that defined on the chart, used on selectors */}}
+21 -21
View File
@@ -39,7 +39,7 @@ image:
pullPolicy: IfNotPresent
# -- Service Account:
serviceAccounts:
serviceAccount:
sa-name:
# -- Enables the service account
enabled: false
@@ -375,34 +375,34 @@ notes:
# Documentation
# Bug reports
# -- Controllers
controllers:
# -- Controller name
# -- workload
workload:
# -- Workload name
main:
# -- Enables the controller
# -- Enables the workload
enabled: true
# -- Primary controller
# -- Primary workload
primary: true
# -- Controller type
# -- Workload type
type: Deployment
# -- Controller labels
# -- Workload labels
# labels: {}
# # -- Controller annotations
# # -- Workload annotations
# annotations: {}
# # -- Controller replicas (Deployment and StatefulSet only)
# # -- Workload replicas (Deployment and StatefulSet only)
# replicas: 1
# # -- Controller revision history limit
# # -- Workload revision history limit
# revisionHistoryLimit: 3
# # Strategy
# # -- Controller strategy type
# # -- Workload strategy type
# strategy: Recreate
# # -- Controller strategy rolling update
# # -- Workload strategy rolling update
# rollingUpdate:
# # -- Controller strategy rolling update max unavailable
# # -- Workload strategy rolling update max unavailable
# maxUnavailable: 1
# # -- Controller strategy rolling update max surge
# # -- Workload strategy rolling update max surge
# maxSurge: 1
# # -- Controller strategy rolling update partition (StatefulSet only)
# # -- Workload strategy rolling update partition (StatefulSet only)
# partition: 0
# # -- CronJob
@@ -539,7 +539,7 @@ controllers:
portal: {}
# -- Image Pull Secrets
imagePullSecrets:
imagePullSecret:
# -- Image Pull Secret name
image-secret-name:
# -- Enables the Image Pull Secret
@@ -562,8 +562,8 @@ imagePullSecrets:
targetSelector:
- pod-name
# -- ConfigMaps (docs/configmaps.md)
configmaps: {}
# -- ConfigMaps (docs/configmap.md)
configmap: {}
# # -- ConfigMap name
# conf-name:
# # -- Enables the ConfigMap
@@ -575,8 +575,8 @@ configmaps: {}
# # -- ConfigMap data
# data: {}
# -- Secrets (docs/secrets.md)
secrets: {}
# -- Secrets (docs/secret.md)
secret: {}
# # -- Secret name
# secret-name:
# # -- Enables the secret