From 817fdf175abf3cfd49bc3de7fb62da26df7b533d Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Sat, 19 Oct 2024 11:00:59 +0200 Subject: [PATCH 1/6] added deployment --- templates/_all.tpl | 6 +-- templates/_deployment.tpl | 79 +++++++++++++++++++++++++++++++++++++++ templates/_service.tpl | 8 ++-- 3 files changed, 86 insertions(+), 7 deletions(-) create mode 100644 templates/_deployment.tpl diff --git a/templates/_all.tpl b/templates/_all.tpl index 7686a5b..698022c 100644 --- a/templates/_all.tpl +++ b/templates/_all.tpl @@ -14,9 +14,9 @@ Main entrypoint for the common library chart. It will render all underlying temp {{ include "lib.configs" . | nindent 0 }} {{ if .Values.controller.enabled }} {{ if eq .Values.controller.type "statefulset" }} - {{- include "lib.statefulset" . | nindent 0}} + {{- include "lib.statefulset" . | nindent 0 }} + {{ else if eq .Values.controller.type "deployment" }} + {{- include "lib.deployment" . | nindent 0 }} {{- end -}} {{- end -}} {{- end -}} - - diff --git a/templates/_deployment.tpl b/templates/_deployment.tpl new file mode 100644 index 0000000..d7b896e --- /dev/null +++ b/templates/_deployment.tpl @@ -0,0 +1,79 @@ +{{- define "lib.deployment" -}} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "lib.fullname" . }} + labels: + {{- include "lib.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "lib.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "lib.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "lib.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + {{- range $name, $values := .Values.service -}} + {{- if $values.enabled -}} + {{- range $k, $v := $values.ports }} + - name: {{ $k }} + containerPort: {{ default $v.port $v.targetPort }} + protocol: {{ default "HTTP" $v.protocol }} + {{- end -}} + {{- end -}} + {{- end }} + env: + {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/templates/_service.tpl b/templates/_service.tpl index 5f924df..8ea41ae 100644 --- a/templates/_service.tpl +++ b/templates/_service.tpl @@ -14,16 +14,16 @@ metadata: labels: {{- $labels | nindent 4 }} spec: - type: {{ $values.type }} + type: {{ default "ClusterIP" $values.type }} ports: {{- range $k, $v := $values.ports }} - port: {{ $v.port }} - targetPort: {{ default $v.targetPort $v.port }} - protocol: {{ $v.protocol }} + targetPort: {{ default $v.port $v.targetPort }} + protocol: {{ default "HTTP" $v.protocol }} name: {{ $k }} {{- end }} selector: {{- $selectorlabels | nindent 4 }} {{- end -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} -- 2.45.2 From dd11ed219728000555ef1e09647ce6016e6cf72c Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Sat, 19 Oct 2024 11:09:04 +0200 Subject: [PATCH 2/6] fixed default varable --- README.md | 2 +- values.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b4d5aac..1e6f130 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The following table lists the configurable parameters of the Lib chart and their | `autoscaling.targetCPUUtilizationPercentage` | | `80` | | `secrets` | Secrets that needs to be created | `{}` | | `configs` | ConfigMaps that needs to be created | `{}` | -| `env.TZ` | | `"Europe/Stockholm"` | +| `env` | environment variables the controller should have | `[{"name": "TZ", "value": "Europe/Stockholm"}]` | | `volumes` | | `[]` | | `volumeMounts` | | `[]` | | `volumeClaimTemplates` | used for statefulset https://kubernetes.io/docs/concepts/workloads/controllers/statefulset | `[]` | diff --git a/values.yaml b/values.yaml index 70eed94..9eaf758 100644 --- a/values.yaml +++ b/values.yaml @@ -99,7 +99,8 @@ configs: {} # ConfigMaps that needs to be created # KEY: VALUE env: # environment variables the controller should have - TZ: Europe/Stockholm + - name: TZ + value: Europe/Stockholm # Additional volumes on the output Deployment definition. volumes: [] # - name: foo -- 2.45.2 From 4f2a9ba9b7bd0ccb20c1239c29ec02d784dc6df8 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Sat, 19 Oct 2024 11:23:43 +0200 Subject: [PATCH 3/6] . --- templates/_deployment.tpl | 13 +++++++++---- templates/_service.tpl | 2 +- templates/_statefulset.tpl | 14 ++++++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/templates/_deployment.tpl b/templates/_deployment.tpl index d7b896e..80a64e6 100644 --- a/templates/_deployment.tpl +++ b/templates/_deployment.tpl @@ -44,18 +44,23 @@ spec: {{- range $k, $v := $values.ports }} - name: {{ $k }} containerPort: {{ default $v.port $v.targetPort }} - protocol: {{ default "HTTP" $v.protocol }} {{- end -}} {{- end -}} {{- end }} env: {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} + {{- with .Values.livenessProbe }} livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} {{- with .Values.volumeMounts }} volumeMounts: {{- toYaml . | nindent 12 }} diff --git a/templates/_service.tpl b/templates/_service.tpl index 8ea41ae..9496595 100644 --- a/templates/_service.tpl +++ b/templates/_service.tpl @@ -19,7 +19,7 @@ spec: {{- range $k, $v := $values.ports }} - port: {{ $v.port }} targetPort: {{ default $v.port $v.targetPort }} - protocol: {{ default "HTTP" $v.protocol }} + protocol: {{ default "TCP" $v.protocol }} name: {{ $k }} {{- end }} selector: diff --git a/templates/_statefulset.tpl b/templates/_statefulset.tpl index c0f9add..55bc695 100644 --- a/templates/_statefulset.tpl +++ b/templates/_statefulset.tpl @@ -46,18 +46,24 @@ spec: {{- range $k, $v := $values.ports }} - name: {{ $k }} containerPort: {{ $v.targetPort | default $v.port }} - protocol: {{ $v.protocol }} + protocol: {{ default "TCP" $v.protocol }} {{- end -}} {{- end -}} {{- end }} env: {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} + {{- with .Values.livenessProbe }} livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: {{- range $i, $values := .Values.volumeClaimTemplates }} - name: {{ $values.name }} -- 2.45.2 From 04aa844ce6c8535403178e5e3068a0d0cc2d242d Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Sat, 19 Oct 2024 11:29:25 +0200 Subject: [PATCH 4/6] . --- templates/_statefulset.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/_statefulset.tpl b/templates/_statefulset.tpl index 55bc695..1908e40 100644 --- a/templates/_statefulset.tpl +++ b/templates/_statefulset.tpl @@ -46,7 +46,6 @@ spec: {{- range $k, $v := $values.ports }} - name: {{ $k }} containerPort: {{ $v.targetPort | default $v.port }} - protocol: {{ default "TCP" $v.protocol }} {{- end -}} {{- end -}} {{- end }} -- 2.45.2 From d4a800e3d4023663c164fabf358f50ca18296d00 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Sat, 19 Oct 2024 11:30:12 +0200 Subject: [PATCH 5/6] . --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 992168b..8268b8c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ # next - added env.TZ to default to Europe/Stockholm +- added deployment type # v1.0.0 - first version -- 2.45.2 From 0fe6d615a0559234a3f8407ec3b5e9013d7a05af Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Tue, 22 Oct 2024 14:29:12 +0200 Subject: [PATCH 6/6] . --- Chart.yaml | 2 +- README.md | 6 +++- templates/_configmaps.tpl | 2 +- templates/_deployment.tpl | 35 ++-------------------- templates/_helpers.tpl | 51 --------------------------------- templates/_ingress.tpl | 6 ++-- templates/_secrets.tpl | 2 +- templates/_statefulset.tpl | 34 +--------------------- templates/parts/_containers.tpl | 47 ++++++++++++++++++++++++++++++ templates/parts/_env.tpl | 26 +++++++++++++++++ values.yaml | 16 ++++++++--- 11 files changed, 99 insertions(+), 128 deletions(-) create mode 100644 templates/parts/_containers.tpl create mode 100644 templates/parts/_env.tpl diff --git a/Chart.yaml b/Chart.yaml index f795baf..470e730 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: lib description: Common functions for my helm charts at home type: library -version: 1.0.1 +version: 1.0.0 kubeVersion: ">=1.27.0" home: git.rre.nu sources: diff --git a/README.md b/README.md index 1e6f130..5459df6 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ The following table lists the configurable parameters of the Lib chart and their | `controller.enabled` | should the main workload be included or not | `true` | | `controller.type` | valid options are deployment, statefulset, job | `"deployment"` | | `controller.replicas` | number of replicas | `1` | +| `controller.lifecycle` | Define postStart and preStop handlers | `{}` | +| `controller.command` | override the containers entrypoint | `null` | +| `controller.args` | add argument to the override command | `[]` | | `image.repository` | container image name | `null` | | `image.pullPolicy` | kubernetes pull policy | `"IfNotPresent"` | | `image.tag` | Overrides the image tag whose default is the chart appVersion. | `""` | @@ -45,7 +48,8 @@ The following table lists the configurable parameters of the Lib chart and their | `autoscaling.targetCPUUtilizationPercentage` | | `80` | | `secrets` | Secrets that needs to be created | `{}` | | `configs` | ConfigMaps that needs to be created | `{}` | -| `env` | environment variables the controller should have | `[{"name": "TZ", "value": "Europe/Stockholm"}]` | +| `envFrom` | mount environment variables from secrets or configMaps | `[]` | +| `env.TZ` | | `"Europe/Stockholm"` | | `volumes` | | `[]` | | `volumeMounts` | | `[]` | | `volumeClaimTemplates` | used for statefulset https://kubernetes.io/docs/concepts/workloads/controllers/statefulset | `[]` | diff --git a/templates/_configmaps.tpl b/templates/_configmaps.tpl index 3be11c3..7e43ef7 100644 --- a/templates/_configmaps.tpl +++ b/templates/_configmaps.tpl @@ -1,6 +1,6 @@ {{- define "lib.configs" -}} {{- $fullName := include "lib.fullname" . -}} -{{- $namespace := .Values.namespace -}} +{{- $namespace := .Values.namespace | default "default" -}} {{- $commonLabels := include "lib.labels" . }} {{- range $name, $values := .Values.configs }} {{- if $values.enabled -}} diff --git a/templates/_deployment.tpl b/templates/_deployment.tpl index 80a64e6..c09de88 100644 --- a/templates/_deployment.tpl +++ b/templates/_deployment.tpl @@ -21,7 +21,7 @@ spec: {{- end }} labels: {{- include "lib.labels" . | nindent 8 }} - {{- with .Values.podLabels }} + {{- with .Values.controller.labels }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -33,38 +33,7 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - {{- range $name, $values := .Values.service -}} - {{- if $values.enabled -}} - {{- range $k, $v := $values.ports }} - - name: {{ $k }} - containerPort: {{ default $v.port $v.targetPort }} - {{- end -}} - {{- end -}} - {{- end }} - env: - {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} - {{- with .Values.livenessProbe }} - livenessProbe: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.readinessProbe }} - readinessProbe: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.volumeMounts }} - volumeMounts: - {{- toYaml . | nindent 12 }} - {{- end }} + {{- include "lib.parts.container" . | nindent 8 -}} {{- with .Values.volumes }} volumes: {{- toYaml . | nindent 8 }} diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index f8dcfd4..8b18887 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -72,54 +72,3 @@ Merge the local chart values and the library chart defaults {{- $_ := set . "Values" (deepCopy $mergedValues) -}} {{- end -}} {{- end -}} - -{{/* -Get all environment variables and -secrets that should be mounted as environment variables -*/}} -{{- define "lib.environmentVariables" -}} -{{- $envIncluded := "false" -}} -{{- $fullName := include "lib.fullname" . -}} -{{- range $name, $settings := .Values.secrets -}} -{{- if $settings.enabled -}} -{{- if $settings.env -}} -{{- $envIncluded := "true" -}} -{{- range $key, $value := $settings.data }} -- name: {{ $key }} - valueFrom: - secretKeyRef: - name: {{ $fullName }}-{{ $name }} - key: {{ $key }} -{{- end -}} -{{- range $key, $value := $settings.stringData }} -- name: {{ $key }} - valueFrom: - secretKeyRef: - name: {{ $fullName }}-{{ $name }} - key: {{ $key }} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- range $name, $settings := .Values.configs -}} -{{- if $settings.enabled -}} -{{- if $settings.env -}} -{{- $envIncluded := "true" -}} -{{- range $key, $value := $settings.data }} -- name: {{ $key }} - valueFrom: - configMapKeyRef: - name: {{ $fullName }}-{{ $name }} - key: {{ $key }} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- if $envIncluded = "true" -}} - {{- if .Values.env -}} - {{- toYaml .Values.env | nindent 0 -}} - {{- end -}} -{{- else -}} - {{- toYaml .Values.env | nindent 0 -}} -{{- end -}} -{{- end -}} diff --git a/templates/_ingress.tpl b/templates/_ingress.tpl index 0f1f9a5..30de297 100644 --- a/templates/_ingress.tpl +++ b/templates/_ingress.tpl @@ -7,6 +7,7 @@ {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} {{- end }} {{- end }} +--- {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1 {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} @@ -20,8 +21,7 @@ metadata: namespace: {{ .Values.namespace }} labels: {{- include "lib.labels" . | nindent 4 }} - {{- with .Values.ingressingresstservicePort }} - {{- $svcName := .Values.ingress.service -}} + {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} @@ -52,7 +52,7 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ $fullName }}-${{ $svcName }} + name: {{ $fullName }}-{{ $svcName }} port: number: {{ $svcPort }} {{- else }} diff --git a/templates/_secrets.tpl b/templates/_secrets.tpl index aa29987..101fa14 100644 --- a/templates/_secrets.tpl +++ b/templates/_secrets.tpl @@ -1,6 +1,6 @@ {{- define "lib.secrets" -}} {{- $fullName := include "lib.fullname" . -}} -{{- $namespace := .Values.namespace -}} +{{- $namespace := .Values.namespace | default "default" -}} {{- $commonLabels := include "lib.labels" . }} {{- range $name, $values := .Values.secrets }} {{- if $values.enabled -}} diff --git a/templates/_statefulset.tpl b/templates/_statefulset.tpl index 1908e40..b19fd04 100644 --- a/templates/_statefulset.tpl +++ b/templates/_statefulset.tpl @@ -35,39 +35,7 @@ spec: securityContext: {{- toYaml .Values.controller.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.controller.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - {{- range $name, $values := .Values.service -}} - {{- if $values.enabled -}} - {{- range $k, $v := $values.ports }} - - name: {{ $k }} - containerPort: {{ $v.targetPort | default $v.port }} - {{- end -}} - {{- end -}} - {{- end }} - env: - {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} - {{- with .Values.livenessProbe }} - livenessProbe: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.readinessProbe }} - readinessProbe: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - volumeMounts: - {{- range $i, $values := .Values.volumeClaimTemplates }} - - name: {{ $values.name }} - mountPath: {{ $values.mountPath }} - {{- end }} + {{- include "lib.parts.container" . | nindent 8 -}} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/templates/parts/_containers.tpl b/templates/parts/_containers.tpl new file mode 100644 index 0000000..423192a --- /dev/null +++ b/templates/parts/_containers.tpl @@ -0,0 +1,47 @@ +{{- define "lib.parts.container" -}} +{{/* +create the environment varable list +*/}} +- name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 4 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.controller.command }} + command: {{ toYaml . | nindent 4}} + {{- end }} + {{- with .Values.controller.args }} + args: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.controller.lifecycle }} + lifecycle: + {{- toYaml . | nindent 4 }} + {{- end }} + ports: + {{- range $name, $values := .Values.service -}} + {{- if $values.enabled -}} + {{- range $k, $v := $values.ports }} + - name: {{ $k }} + containerPort: {{ default $v.port $v.targetPort }} + {{- end -}} + {{- end -}} + {{- end }} + env: + {{- include "lib.parts.env" . | nindent 4 -}} + {{- with .Values.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/templates/parts/_env.tpl b/templates/parts/_env.tpl new file mode 100644 index 0000000..6d96acf --- /dev/null +++ b/templates/parts/_env.tpl @@ -0,0 +1,26 @@ +{{/* +Get all environment variables configMaps and +secrets that should be mounted as environment variables +*/}} +{{- define "lib.parts.env" -}} + {{/* + environment variables from .Values.env + */}} + {{- range $name, $value := .Values.env -}} + {{- printf "- name: %s" $name | nindent 0 }} + {{- printf "value: %s" $value | nindent 2 }} + {{- end -}} + {{/* + environment variables from configMaps + */}} + {{- range $cfgName, $settings := .Values.configs -}} + {{- if and $settings.enabled $settings.env -}} + {{- range $key, $value := $settings.data -}} + {{- printf "- name: %s" $key | nindent 0 }} + {{- printf "valueFrom:" | nindent 2 }} + {{- printf "configMapKeyRef:" | nindent 4 }} + {{- printf "name: %s" $key | nindent 5 }} + {{- end }} + {{- end }} + {{- end -}} +{{- end -}} diff --git a/values.yaml b/values.yaml index 9eaf758..32a8a1b 100644 --- a/values.yaml +++ b/values.yaml @@ -4,6 +4,9 @@ controller: # main workload enabled: true # should the main workload be included or not type: deployment # valid options are deployment, statefulset, job replicas: 1 # number of replicas + lifecycle: {} # Define postStart and preStop handlers + command: # override the containers entrypoint + args: [] # add argument to the override command image: repository: # container image name @@ -85,22 +88,27 @@ secrets: {} # Secrets that needs to be created # type: #default Opaque # annotations: {} # labels: {} -# env: false #should template load each key in the seacret as # data: # KEY: VALUE configs: {} # ConfigMaps that needs to be created # configs: # : +# enabled: false # should the configMap be created or not # annotations: {} # labels: {} -# env: false #should template load each key in the seacret as # data: # KEY: VALUE +envFrom: [] # mount environment variables from secrets or configMaps +# - configMapRef: +# name: config-map-name +# - secretRef: +# name: secret-name + env: # environment variables the controller should have - - name: TZ - value: Europe/Stockholm + TZ: Europe/Stockholm + # Additional volumes on the output Deployment definition. volumes: [] # - name: foo -- 2.45.2