Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 1 | {{/* |
vaibhavjayas | ea9aee0 | 2018-08-31 06:22:26 +0000 | [diff] [blame] | 2 | # Copyright © 2018 AT&T, Amdocs, Bell Canada |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 15 | */}} |
vaibhavjayas | ea9aee0 | 2018-08-31 06:22:26 +0000 | [diff] [blame] | 16 | |
milaszki | 326a5e7 | 2020-07-07 11:59:35 +0000 | [diff] [blame] | 17 | apiVersion: apps/v1 |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 18 | kind: Deployment |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 19 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 20 | spec: |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 21 | selector: {{- include "common.selectors" . | nindent 4 }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 22 | replicas: {{ .Values.replicaCount }} |
| 23 | template: |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 24 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 25 | spec: |
| 26 | initContainers: |
| 27 | - command: |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 28 | - sh |
| 29 | args: |
| 30 | - -c |
| 31 | - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done" |
| 32 | env: |
| 33 | - name: DB_USER |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 34 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 35 | - name: DB_PASSWORD |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 36 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 37 | - name: HTTP_USER |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 38 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "http-user-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 39 | - name: HTTP_PASSWORD |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 40 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "http-user-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 41 | - name: HTTP_ADMIN_USER |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 42 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "admin-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 43 | - name: HTTP_ADMIN_PASSWORD |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 44 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "admin-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 45 | - name: HTTP_NODE_USER |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 46 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "node-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 47 | - name: HTTP_NODE_PASSWORD |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 48 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "node-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 49 | - name: REST_CONF_USER |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 50 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 51 | - name: REST_CONF_PASSWORD |
Krzysztof Opasiak | c0a57f8 | 2020-03-23 15:50:13 +0100 | [diff] [blame] | 52 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 53 | volumeMounts: |
| 54 | - mountPath: /config-input |
| 55 | name: config-input |
| 56 | - mountPath: /config |
| 57 | name: config |
Sylvain Desbureaux | d9ede77 | 2020-11-19 17:04:40 +0100 | [diff] [blame] | 58 | image: {{ include "repositoryGenerator.image.envsubst" . }} |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 59 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 60 | name: {{ include "common.name" . }}-update-config |
| 61 | - command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 62 | - /app/ready.py |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 63 | args: |
Andreas Geissler | cfd8434 | 2023-08-16 17:18:49 +0200 | [diff] [blame] | 64 | - --app-name |
jmac | 4f76af4 | 2018-03-28 20:36:47 +0000 | [diff] [blame] | 65 | - {{ .Values.config.dbPodName }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 66 | env: |
| 67 | - name: NAMESPACE |
| 68 | valueFrom: |
| 69 | fieldRef: |
| 70 | apiVersion: v1 |
| 71 | fieldPath: metadata.namespace |
Sylvain Desbureaux | d9ede77 | 2020-11-19 17:04:40 +0100 | [diff] [blame] | 72 | image: {{ include "repositoryGenerator.image.readiness" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 73 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 74 | name: {{ include "common.name" . }}-readiness |
Andreas Geissler | 4753743 | 2024-02-27 08:55:23 +0100 | [diff] [blame] | 75 | resources: |
| 76 | limits: |
| 77 | cpu: "100m" |
Andreas Geissler | 8cbb3d9 | 2024-03-12 16:44:56 +0100 | [diff] [blame] | 78 | memory: "500Mi" |
Andreas Geissler | 4753743 | 2024-02-27 08:55:23 +0100 | [diff] [blame] | 79 | requests: |
| 80 | cpu: "3m" |
Andreas Geissler | 8cbb3d9 | 2024-03-12 16:44:56 +0100 | [diff] [blame] | 81 | memory: "20Mi" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 82 | containers: |
| 83 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | d9ede77 | 2020-11-19 17:04:40 +0100 | [diff] [blame] | 84 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 85 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
jmac | 4f76af4 | 2018-03-28 20:36:47 +0000 | [diff] [blame] | 86 | command: ["/bin/bash"] |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 87 | args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && ./start.sh sdnc1.0 && wait"] |
| 88 | ports: {{- include "common.containerPorts" . | indent 10 }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 89 | readinessProbe: |
| 90 | tcpSocket: |
| 91 | port: {{ .Values.service.internalPort }} |
| 92 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 93 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 94 | env: |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 95 | - name: SDNC_CONFIG_DIR |
| 96 | value: /opt/onap/sdnc/data/properties |
| 97 | volumeMounts: |
| 98 | - mountPath: /etc/localtime |
| 99 | name: localtime |
| 100 | readOnly: true |
| 101 | - name: config |
| 102 | mountPath: /opt/app/application.properties |
| 103 | subPath: application.properties |
| 104 | - name: config |
afenner | 291d787 | 2018-05-23 14:19:55 +0000 | [diff] [blame] | 105 | mountPath: /opt/onap/ccsdk/dgbuilder/releases/sdnc1.0/conf/svclogic.properties |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 106 | subPath: svclogic.properties |
| 107 | - name: config |
afenner | 291d787 | 2018-05-23 14:19:55 +0000 | [diff] [blame] | 108 | mountPath: /opt/onap/ccsdk/dgbuilder/svclogic/svclogic.properties |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 109 | subPath: svclogic.properties |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 110 | - name: config |
afenner | 291d787 | 2018-05-23 14:19:55 +0000 | [diff] [blame] | 111 | mountPath: /opt/onap/ccsdk/dgbuilder/releases/sdnc1.0/customSettings.js |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 112 | subPath: customSettings.js |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 113 | resources: {{ include "common.resources" . | nindent 12 }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 114 | {{- if .Values.nodeSelector }} |
| 115 | nodeSelector: |
| 116 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 117 | {{- end -}} |
| 118 | {{- if .Values.affinity }} |
| 119 | affinity: |
| 120 | {{ toYaml .Values.affinity | indent 10 }} |
| 121 | {{- end }} |
farida azmy | dc9aef0 | 2021-04-07 17:07:09 +0200 | [diff] [blame] | 122 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 123 | volumes: |
| 124 | - name: localtime |
| 125 | hostPath: |
| 126 | path: /etc/localtime |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 127 | - name: config-input |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 128 | configMap: |
| 129 | name: {{ include "common.fullname" . }}-config |
Krzysztof Opasiak | acdd90c | 2020-02-17 22:05:51 +0100 | [diff] [blame] | 130 | - name: config |
| 131 | emptyDir: |
| 132 | medium: Memory |
Andreas Geissler | bd0d31a | 2024-03-20 09:51:32 +0100 | [diff] [blame^] | 133 | {{- include "common.imagePullSecrets" . | nindent 6 }} |