Updating charts to use common resource template
[oom.git] / kubernetes / clamp / charts / mariadb / templates / deployment.yaml
index 1e17b9b..47d37bd 100644 (file)
@@ -1,3 +1,18 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
@@ -18,7 +33,7 @@ spec:
     spec:
       containers:
         - name: {{ include "common.name" .  }}
-          image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
@@ -58,7 +73,7 @@ spec:
           - mountPath: /var/lib/mysql
             name: clamp-mariadb-data
           resources:
-{{ toYaml .Values.resources | indent 12 }}
+{{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}