X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Foof%2Ftemplates%2Fdeployment.yaml;h=76d1a626043ba1830491302725f34976528edcfb;hb=1418b0127785ae145a83190b51b0d032e3e41d94;hp=ffcbb6574f6836e74937bbf12777af843635a284;hpb=811fdec95acf7b10fdcbab3da96306f3c8689eb0;p=oom.git diff --git a/kubernetes/oof/templates/deployment.yaml b/kubernetes/oof/templates/deployment.yaml index ffcbb6574f..76d1a62604 100644 --- a/kubernetes/oof/templates/deployment.yaml +++ b/kubernetes/oof/templates/deployment.yaml @@ -1,5 +1,6 @@ # Copyright © 2017 Amdocs, Bell Canada # Modifications Copyright © 2018 AT&T,VMware +# Modifications Copyright (C) 2020 Wipro Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +14,7 @@ # 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" . }} @@ -24,6 +25,9 @@ metadata: release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: + selector: + matchLabels: + app: {{ include "common.name" . }} replicas: {{ .Values.replicaCount }} template: metadata: @@ -33,7 +37,7 @@ spec: spec: initContainers: - command: - - /root/ready.py + - /app/ready.py args: - --container-name - policy-xacml-pdp @@ -43,7 +47,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-readiness - command: @@ -61,10 +65,10 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + image: "{{ .Values.global.dockerHubRepository }}/{{ .Values.global.curlImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-osdf-sms-readiness - +{{ include "common.certInitializer.initContainer" . | indent 6 }} containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" @@ -87,6 +91,7 @@ spec: periodSeconds: {{ .Values.readiness.periodSeconds }} env: volumeMounts: +{{ include "common.certInitializer.volumeMount" . | indent 10 }} - mountPath: /etc/localtime name: localtime readOnly: true @@ -96,15 +101,12 @@ spec: - mountPath: /opt/app/ssl_cert/aaf_root_ca.cer name: {{ include "common.fullname" . }}-config subPath: aaf_root_ca.cer - - mountPath: /opt/app/ssl_cert/org.onap.oof.crt - name: {{ include "common.fullname" . }}-config - subPath: org.onap.oof.crt - - mountPath: /opt/app/ssl_cert/org.onap.oof.key - name: {{ include "common.fullname" . }}-config - subPath: org.onap.oof.key - mountPath: /opt/osdf/config/common_config.yaml name: {{ include "common.fullname" . }}-config subPath: common_config.yaml + - mountPath: /opt/osdf/config/log.yml + name: {{ include "common.fullname" . }}-config + subPath: log.yml resources: {{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} @@ -117,6 +119,7 @@ spec: {{- end }} volumes: + {{ include "common.certInitializer.volumes" . | nindent 8 }} - name: localtime hostPath: path: /etc/localtime @@ -130,9 +133,7 @@ spec: path: aaf_root_ca.cer - key: common_config.yaml path: common_config.yaml - - key: org.onap.oof.crt - path: org.onap.oof.crt - - key: org.onap.oof.key - path: org.onap.oof.key + - key: log.yml + path: log.yml imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"