X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fvid%2Ftemplates%2Fdeployment.yaml;h=9221af7dcf95e63332c70c650e9100600ab70b87;hb=132fd4f59c99986560bc4588ffd51bcb63bcd2e2;hp=5cd4f383313ddf5058c33f8dddb8c26291c2324c;hpb=ba578f8df7a3d2ad3f4a43ef3e850b3b91518f40;p=oom.git diff --git a/kubernetes/vid/templates/deployment.yaml b/kubernetes/vid/templates/deployment.yaml index 5cd4f38331..5423febaf5 100644 --- a/kubernetes/vid/templates/deployment.yaml +++ b/kubernetes/vid/templates/deployment.yaml @@ -1,4 +1,6 @@ +{{/* # Copyright © 2017 Amdocs, Bell Canada +# Copyright © 2020 Samsung Electronics # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +13,9 @@ # 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" . }} @@ -20,29 +23,32 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: + selector: + matchLabels: + app: {{ include "common.name" . }} replicas: {{ .Values.replicaCount }} template: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: initContainers: - command: - - /root/job_complete.py + - /app/ready.py args: - --job-name - - vid-config-galera + - {{ include "common.fullname" . }}-galera-config env: - name: NAMESPACE valueFrom: 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 containers: @@ -72,14 +78,14 @@ spec: value: "{{ .Values.config.asdcclientrestauth }}" - name: ASDC_CLIENT_REST_PORT value: "{{ .Values.config.asdcclientrestport }}" - - name: VID_AAI_HOST - value: aai.{{ include "common.namespace" . }} - - name: VID_AAI_PORT - value: "{{ .Values.config.vidaaiport }}" + - name: ASDC_CLIENT_REST_PROTOCOL + value: "https" + - name: VID_AAI_URL + value: https://aai.{{ include "common.namespace" . }}:{{ .Values.config.vidaaiport }} - name: VID_ECOMP_SHARED_CONTEXT_REST_URL value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context - name: VID_MSO_SERVER_URL - value: https://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }} + value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}/onap/so/infra - name: VID_MSO_PASS value: "{{ .Values.config.vidmsopass }}" - name: MSO_DME2_SERVER_URL @@ -87,28 +93,32 @@ spec: - name: MSO_DME2_ENABLED value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }} - name: VID_ECOMP_REDIRECT_URL - value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm + value: https://{{ .Values.config.portalhost }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm - name: VID_ECOMP_REST_URL - value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/auxapi + value: https://portal-app:{{ .Values.config.onapportrest }}/ONAPPORTAL/auxapi + - name: VID_ROLE_ACCESS_CENTRALIZED + value: "{{ .Values.config.roleaccesscentralized }}" - name: VID_CONTACT_US_LINK value: "{{ .Values.config.vidcontactuslink }}" + - name: VID_KEYSTORE_PASSWORD + value: {{ .Values.config.vidkeystorepassword | quote }} - name: VID_UEB_URL_LIST value: message-router.{{ include "common.namespace" . }} - name: VID_MYSQL_HOST - value: "{{ .Values.config.vidmysqlhost }}" + value: {{ index .Values "mariadb-galera" "service" "name" }} - name: VID_MYSQL_PORT - value: "{{ .Values.config.vidmysqlport }}" + value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}" - name: VID_MYSQL_DBNAME - value: "{{ .Values.config.vidmysqldbname }}" + value: {{ index .Values "mariadb-galera" "config" "mysqlDatabase" }} - name: VID_MYSQL_USER - value: "{{ .Values.config.vidmysqluser }}" + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "login") | indent 14 }} - name: VID_MYSQL_PASS - value: "{{ .Values.config.vidmysqlpassword }}" - #valueFrom: - # secretKeyRef: {name: {{ include "common.fullname" . }}, key: vid-password} + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "password") | indent 14 }} - name: VID_MYSQL_MAXCONNECTIONS value: "{{ .Values.config.vidmysqlmaxconnections }}" volumeMounts: + - mountPath: /opt/app/vid/etc + name: vid-certs - mountPath: /etc/localtime name: localtime readOnly: true @@ -118,7 +128,7 @@ spec: name: vid-logback subPath: logback.xml resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} @@ -140,6 +150,9 @@ spec: - mountPath: /usr/share/filebeat/data name: vid-data-filebeat volumes: + - name: vid-certs + secret: + secretName: {{ include "common.fullname" . }}-certs - name: localtime hostPath: path: /etc/localtime @@ -155,4 +168,3 @@ spec: name: {{ include "common.fullname" . }}-log-configmap imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" -