summaryrefslogtreecommitdiffstats
path: root/kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-23 16:48:20 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-04-16 09:58:05 +0200
commitf7768e895c64ff7234e38c35d557dbede2e49988 (patch)
treec2fe25619eb30cd221281505549afe31b4598fce /kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml
parentdd72a1cbebcff83017a43f4c80a5988bdd08e9ee (diff)
[DMaaP DR Node] v1.16+ compatible templates
Use the different "common" templates in order to create consistent and v1.16+ compatible templates for the different resources of DMaaP DR Node. Issue-ID: OOM-1971 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I399b168882d09bd8f08148758a0f683e15ac141c
Diffstat (limited to 'kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml')
-rw-r--r--kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml31
1 files changed, 5 insertions, 26 deletions
diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml
index e9ab9c96fe..d03d61690c 100644
--- a/kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml
+++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/post-install-job.yaml
@@ -1,27 +1,9 @@
apiVersion: batch/v1
kind: Job
-metadata:
- name: {{ include "common.fullname" . }}-post-install
- labels:
- app.kubernetes.io/managed-by: {{.Release.Service | quote }}
- app.kubernetes.io/instance: {{include "common.release" . | quote }}
- helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}"
- release: {{ include "common.release" . }}
- annotations:
- # This is what defines this resource as a hook. Without this line, the
- # job is considered part of the release.
- "helm.sh/hook": post-install
- "helm.sh/hook-weight": "-2"
- "helm.sh/hook-delete-policy": hook-succeeded
+metadata: {{ include "common.resourceMetadata" (dict "dot" . "suffix" "post-install" "annotations" .Values.job.annotations) | nindent 2 }}
spec:
template:
- metadata:
- name: {{ include "common.fullname" . }}
- labels:
- app.kubernetes.io/managed-by: {{.Release.Service | quote }}
- app.kubernetes.io/instance: {{include "common.release" . | quote }}
- helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}"
- release: {{ include "common.release" . }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
restartPolicy: Never
containers:
@@ -50,15 +32,12 @@ spec:
# NOTE: the basename of the subdirectory is important - it matches the DBCL API URI
- name: {{ include "common.fullname" . }}-dbc-drnodes
mountPath: /opt/app/config/dr_nodes/
- resources:
-{{ include "common.resources" . | indent 10 }}
+ resources: {{ include "common.resources" . | nindent 10 }}
{{- if .Values.nodeSelector }}
- nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+ nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
{{- end -}}
{{- if .Values.affinity }}
- affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+ affinity: {{ toYaml .Values.affinity | nindent 8 }}
{{- end }}
volumes:
- name: localtime