Merge "[COMMON] new logConfiguration chart"
[oom.git] / kubernetes / so / templates / deployment.yaml
index ca6be72..32f46c2 100755 (executable)
@@ -11,7 +11,7 @@
 # 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
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -21,6 +21,9 @@ metadata:
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ include "common.release" . }}
 spec:
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   replicas: {{ index .Values.replicaCount }}
   minReadySeconds: {{ index .Values.minReadySeconds }}
   strategy:
@@ -34,8 +37,9 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
-      initContainers:
-      - command:
+      initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
+      - name: {{ include "common.name" . }}-readiness
+        command:
         - /root/job_complete.py
         args:
         - --job-name
@@ -93,7 +97,7 @@ spec:
         - configMapRef:
             name: {{ include "common.fullname" . }}-configmap
         imagePullPolicy:  {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        volumeMounts:
+        volumeMounts: {{ include "so.certificate.volume-mounts" . | nindent 8 }}
         - name: logs
           mountPath: /app/logs
         - name: config
@@ -120,7 +124,7 @@ spec:
           mountPath: /var/log/onap/so
         - name: {{ include "common.fullname" . }}-logs
           mountPath: /var/log/onap
-      volumes:
+      volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
       - name: logs
         emptyDir: {}
       - name: config