X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=charts%2Ftemplates%2Fdeployment.yaml;h=a1e45822ffffb7f424a6213120e574f4df07c343;hb=29fa27bb53e2b4ff89f8ef61d0885df776bc14b1;hp=402fe029d91a2c991bf04ef57f81ece0691d5593;hpb=14fc8de3f80b6e1ab1e8351017383e99628cb8e3;p=pti%2Fo2.git diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml index 402fe02..a1e4582 100644 --- a/charts/templates/deployment.yaml +++ b/charts/templates/deployment.yaml @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Wind River Systems, Inc. +# Copyright (C) 2021-2023 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,6 +29,13 @@ spec: metadata: labels: app: o2api + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + annotations: + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ .Values.o2ims.serviceaccountname }} {{- if .Values.imagePullSecrets }} @@ -43,7 +50,7 @@ spec: {{- end }} containers: - name: postgres - image: "{{ .Values.o2ims.image.img_postgres }}" + image: "{{ .Values.o2ims.images.tags.postgres }}" ports: - containerPort: 5432 env: @@ -60,15 +67,15 @@ spec: - name: db-pv mountPath: /var/lib/postgresql/data - name: redis - image: "{{ .Values.o2ims.image.img_redis }}" + image: "{{ .Values.o2ims.images.tags.redis }}" ports: - containerPort: 6379 - name: o2pubsub - image: "{{ .Values.o2ims.image.img_o2 }}" + 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 @@ -82,7 +89,7 @@ spec: - name: PYTHONDONTWRITEBYTECODE value: "1" - name: REDIS_HOST - value: redis + value: localhost - name: K8S_KUBECONFIG value: {{ .Values.ocloud.K8S_KUBECONFIG }} volumeMounts: @@ -96,13 +103,13 @@ spec: mountPath: /configs/smoca.crt subPath: config.json - name: watcher - image: "{{ .Values.o2ims.image.img_o2 }}" + 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 @@ -116,7 +123,13 @@ spec: - name: PYTHONDONTWRITEBYTECODE value: "1" - name: REDIS_HOST - value: redis + value: localhost + {{- if default false .Values.o2ims.useHostCert }} + - name: REQUESTS_CA_BUNDLE + value: /etc/ssl/custom-cert.pem + {{- end }} + - name: CGTS_INSECURE_SSL + value: {{ ternary "1" "0" (default false .Values.o2ims.cgtsInsecureSSL) | quote }} volumeMounts: - name: scripts mountPath: /opt @@ -124,21 +137,26 @@ spec: mountPath: /configs/o2app.conf subPath: config.json readOnly: true + {{- if default false .Values.o2ims.useHostCert }} + - name: ca-certs + mountPath: /etc/ssl/custom-cert.pem + readOnly: true + {{- end }} - name: o2api - image: "{{ .Values.o2ims.image.img_o2 }}" + 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 - value: /src/o2app/entrypoints/flask_application.py - - name: FLASK_DEBUG - value: {{ .Values.o2ims.logginglevel }} + # - name: FLASK_APP + # value: /src/o2app/entrypoints/flask_application.py + # - name: FLASK_DEBUG + # value: {{ .Values.o2ims.logginglevel }} - name: LOGGING_CONFIG_LEVEL value: {{ .Values.o2ims.logginglevel }} - name: OS_AUTH_URL @@ -149,15 +167,17 @@ 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"] volumeMounts: - name: scripts mountPath: /opt - # - name: configs - # mountPath: /configs + {{- if .Values.o2dms.helm_cli_enable }} + - name: share + mountPath: /share + {{- end }} - name: applicationconfig mountPath: /configs/o2app.conf subPath: config.json @@ -172,7 +192,7 @@ spec: readOnly: true {{- if .Values.o2dms.helm_cli_enable }} - name: helmcli - image: "{{ .Values.o2ims.image.img_o2 }}" + image: "{{ .Values.o2ims.images.tags.o2service }}" ports: - containerPort: 22 env: @@ -184,13 +204,17 @@ spec: volumeMounts: - name: scripts mountPath: /opt + - name: share + mountPath: /share {{- end }} volumes: - name: scripts configMap: name: {{ .Chart.Name }}-scripts-configmap - # - name: configs - # emptyDir: {} + {{- if .Values.o2dms.helm_cli_enable }} + - name: share + emptyDir: {} + {{- end }} - configMap: name: {{ .Chart.Name }}-application-config name: applicationconfig @@ -206,4 +230,10 @@ spec: - name: db-pv persistentVolumeClaim: claimName: {{ .Chart.Name }}-db-pv + {{- if default false .Values.o2ims.useHostCert }} + - name: ca-certs + hostPath: + path: {{ .Values.o2ims.hostCertPath | quote }} + type: File + {{- end }} ---