From 60c7480788eee721c42e824ae22115073705c9c5 Mon Sep 17 00:00:00 2001 From: Sylvain Desbureaux Date: Thu, 12 Dec 2019 14:35:01 +0100 Subject: [COMMON] Create templates for services and PV Proposition of common templates to make service declaration and PV declaration consistent accross OOM. Propositions of templates for sub parties of resource definitions such as metadatas, selector and containerPorts. I've also made an example with cassandra. Change-Id: I8b8aa8eb61dafba75e89add1979114a0eefce243 Issue-ID: OOM-1971 Signed-off-by: Sylvain Desbureaux --- kubernetes/common/cassandra/templates/backup/cronjob.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kubernetes/common/cassandra/templates/backup') diff --git a/kubernetes/common/cassandra/templates/backup/cronjob.yaml b/kubernetes/common/cassandra/templates/backup/cronjob.yaml index 2edc8071f9..e4f2aabfa0 100644 --- a/kubernetes/common/cassandra/templates/backup/cronjob.yaml +++ b/kubernetes/common/cassandra/templates/backup/cronjob.yaml @@ -19,11 +19,7 @@ kind: CronJob metadata: name: {{ include "common.fullname" . }}-backup namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.fullname" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ include "common.release" . }} - heritage: {{ .Release.Service }} + labels: {{- include "common.labels" . | nindent 4 }} spec: schedule: {{ .Values.backup.cron | quote }} concurrencyPolicy: Forbid @@ -31,6 +27,10 @@ spec: jobTemplate: spec: template: + metadata: + labels: {{- include "common.labels" . | nindent 12 }} + annotations: {{- include "common.tplValue" (dict "value" .Values.podAnnotations "context" .) | nindent 12 }} + name: {{ include "common.name" . }} spec: restartPolicy: Never initContainers: -- cgit 1.2.3-korg