Merge "[DCAEMOD] Uses new tpls for repos / images"
[oom.git] / kubernetes / common / postgres / templates / _deployment.tpl
index 456aa32..6142baa 100644 (file)
@@ -30,7 +30,6 @@ metadata:
     heritage: {{ $dot.Release.Service }}
     name: "{{ index $dot.Values "container" "name" $pgMode }}"
 spec:
-  serviceName: {{ $dot.Values.service.name }}
   replicas: 1
   selector:
     matchLabels:
@@ -74,7 +73,7 @@ spec:
           subPath: setup.sql
         - mountPath: /config
           name: pgconf
-        image: "{{ $dot.Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" $dot }}
         imagePullPolicy: {{ $dot.Values.global.pullPolicy | default $dot.Values.pullPolicy }}
         name: {{ include "common.name" $dot }}-update-config
 
@@ -85,14 +84,14 @@ spec:
         - |
           chown 26:26 /podroot/;
           chmod 700 /podroot/;
-        image: {{ $dot.Values.global.busyboxRepository | default $dot.Values.busyboxRepository }}/{{ $dot.Values.busyboxImage }}
+        image: {{ include "repositoryGenerator.image.busybox" $dot }}
         imagePullPolicy: {{ $dot.Values.global.pullPolicy | default $dot.Values.pullPolicy }}
         volumeMounts:
         - name: {{ include "common.fullname" $dot }}-data
           mountPath: /podroot/
       containers:
       - name: {{ include "common.name" $dot }}
-        image: "{{ $dot.Values.postgresRepository }}/{{ $dot.Values.image }}"
+        image: {{ include "repositoryGenerator.image.postgres" $dot }}
         imagePullPolicy: {{ $dot.Values.global.pullPolicy | default $dot.Values.pullPolicy }}
         ports:
         - containerPort: {{ $dot.Values.service.internalPort }}
@@ -147,8 +146,7 @@ spec:
         - mountPath: /backup
           name: {{ include "common.fullname" $dot }}-backup
           readOnly: true
-        resources:
-{{ include "common.resources" $dot | indent 12 }}
+        resources: {{ include "common.resources" $dot | nindent 12 }}
         {{- if $dot.Values.nodeSelector }}
         nodeSelector:
 {{ toYaml $dot.Values.nodeSelector | indent 10 }}