Răsfoiți Sursa

Add method to render common deployment configuration

Waqar Ahmed 4 ani în urmă
părinte
comite
c03f6f5b67
1 a modificat fișierele cu 11 adăugiri și 0 ștergeri
  1. 11 0
      library/common/2101.0.0/templates/lib/deployments/_utils

+ 11 - 0
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 -}}