From c03f6f5b6731a64590be6d1136c4039009daf0c1 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Wed, 3 Feb 2021 18:27:24 +0500 Subject: [PATCH] Add method to render common deployment configuration --- .../common/2101.0.0/templates/lib/deployments/_utils | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/common/2101.0.0/templates/lib/deployments/_utils b/library/common/2101.0.0/templates/lib/deployments/_utils index cc34cc36cc..b8b2f76ad5 100644 --- a/library/common/2101.0.0/templates/lib/deployments/_utils +++ b/library/common/2101.0.0/templates/lib/deployments/_utils @@ -25,6 +25,17 @@ Retrieve deployment pod's metadata */}} {{- define "common.deployment.pod.metadata" -}} metadata: + name: {{ template "common.names.fullname" . }} labels: {{ include "common.labels.selectorLabels" . | nindent 4 }} annotations: {{ include "common.annotations" . | nindent 4 }} {{- end -}} + + +{{/* +Retrieve common deployment configuration +*/}} +{{- define "common.deployment.common_config" -}} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +{{ include "common.deployment.metadata" . | nindent 0 }} +{{- end -}}