X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=charts%2Ftemplates%2Fdeployment.yaml;h=7d110cba254023f3ea30dc57ac845ca5a3575e9a;hb=ad9b5cb3883c9eacc897810cec8fe1c74bf7daa0;hp=194ca7e1976db95bd52c1baa63973116e9db9a1b;hpb=12249c7669e487cd9f37cee8475c89eb5490e0f0;p=pti%2Fo2.git diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml index 194ca7e..7d110cb 100644 --- a/charts/templates/deployment.yaml +++ b/charts/templates/deployment.yaml @@ -31,17 +31,19 @@ spec: app: o2api spec: serviceAccountName: {{ .Values.o2ims.serviceaccountname }} - # imagePullSecrets: - # - name: {{ .Values.o2ims.imagePullSecrets }} + {{- if .Values.imagePullSecrets }} imagePullSecrets: - - name: {{ .Values.o2ims.serviceaccountname }}-registry-secret + {{- range .Values.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} {{- if .Values.o2ims.affinity }} affinity: {{ toYaml .Values.o2ims.affinity | indent 8 }} {{- end }} containers: - name: postgres - image: postgres:9.6 + image: "{{ .Values.o2ims.images.tags.postgres }}" ports: - containerPort: 5432 env: @@ -49,20 +51,24 @@ spec: value: o2ims123 - name: POSTGRES_USER value: o2ims + - name: PGDATA + value: /var/lib/postgresql/data/pgdata command: ["/bin/bash", "/opt/postgres_start.sh"] volumeMounts: - name: scripts mountPath: /opt + - name: db-pv + mountPath: /var/lib/postgresql/data - name: redis - image: redis:alpine + image: "{{ .Values.o2ims.images.tags.redis }}" ports: - containerPort: 6379 - name: o2pubsub - image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}" + image: "{{ .Values.o2ims.images.tags.o2service }}" command: ["/bin/bash", "/opt/o2pubsub_start.sh"] env: - name: DB_HOST - value: postgres + value: localhost - name: DB_PASSWORD value: o2ims123 - name: LOGGING_CONFIG_LEVEL @@ -76,7 +82,7 @@ spec: - name: PYTHONDONTWRITEBYTECODE value: "1" - name: REDIS_HOST - value: redis + value: localhost - name: K8S_KUBECONFIG value: {{ .Values.ocloud.K8S_KUBECONFIG }} volumeMounts: @@ -86,14 +92,17 @@ spec: mountPath: /configs/o2app.conf subPath: config.json readOnly: true + - name: smocacrt + mountPath: /configs/smoca.crt + subPath: config.json - name: watcher - image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}" + image: "{{ .Values.o2ims.images.tags.o2service }}" command: ["/bin/bash", "/opt/o2watcher_start.sh"] env: - name: API_HOST_EXTERNAL_FLOATING value: {{ .Values.ocloud.API_HOST_EXTERNAL_FLOATING }} - name: DB_HOST - value: postgres + value: localhost - name: DB_PASSWORD value: o2ims123 - name: LOGGING_CONFIG_LEVEL @@ -107,7 +116,7 @@ spec: - name: PYTHONDONTWRITEBYTECODE value: "1" - name: REDIS_HOST - value: redis + value: localhost volumeMounts: - name: scripts mountPath: /opt @@ -116,14 +125,14 @@ spec: subPath: config.json readOnly: true - name: o2api - image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}" + image: "{{ .Values.o2ims.images.tags.o2service }}" ports: - containerPort: 80 env: - name: API_HOST_EXTERNAL_FLOATING value: {{ .Values.ocloud.API_HOST_EXTERNAL_FLOATING }} - name: DB_HOST - value: postgres + value: localhost - name: DB_PASSWORD value: o2ims123 - name: FLASK_APP @@ -140,7 +149,7 @@ spec: - name: PYTHONUNBUFFERED value: "1" - name: REDIS_HOST - value: redis + value: localhost - name: HELM_USER_PASSWD value: {{ .Values.ocloud.HELM_USER_PASSWD }} command: ["/bin/bash", "/opt/o2api_start.sh"] @@ -153,16 +162,17 @@ spec: mountPath: /configs/o2app.conf subPath: config.json readOnly: true - - name: caconfig - mountPath: /configs/ca.cert + - name: servercrt + mountPath: /configs/server.crt subPath: config.json readOnly: true - - name: serverkeyconfig + - name: serverkey mountPath: /configs/server.key subPath: config.json readOnly: true + {{- if .Values.o2dms.helm_cli_enable }} - name: helmcli - image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}" + image: "{{ .Values.o2ims.images.tags.o2service }}" ports: - containerPort: 22 env: @@ -174,6 +184,7 @@ spec: volumeMounts: - name: scripts mountPath: /opt + {{- end }} volumes: - name: scripts configMap: @@ -184,10 +195,15 @@ spec: name: {{ .Chart.Name }}-application-config name: applicationconfig - configMap: - name: {{ .Chart.Name }}-serverkeyconfig - name: serverkeyconfig + name: {{ .Chart.Name }}-serverkey + name: serverkey + - configMap: + name: {{ .Chart.Name }}-servercrt + name: servercrt - configMap: - name: {{ .Chart.Name }}-caconfig - name: caconfig + name: {{ .Chart.Name }}-smocacrt + name: smocacrt + - name: db-pv + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-db-pv --- -