[VID] Obfuscate truststore password at the entrypoint
[oom.git] / kubernetes / vid / values.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 # Copyright © 2020 Samsung Electronics
3 # Copyright © 2021 Orange
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 # Default values for vid.
18 # This is a YAML-formatted file.
19 # Declare variables to be passed into your templates.
20 global:
21   nodePortPrefix: 302
22   mariadbGalera: &mariadbGalera
23     #This flag allows VID to instantiate its own mariadb-galera cluster
24     localCluster: false
25     service: mariadb-galera
26     internalPort: 3306
27     nameOverride: mariadb-galera
28
29 #################################################################
30 # Secrets metaconfig
31 #################################################################
32 secrets:
33   - uid: vid-db-user-secret
34     name: &dbUserSecretName '{{ include "common.release" . }}-vid-db-user-secret'
35     type: basicAuth
36     externalSecret: '{{ tpl (default "" .Values.config.db.userCredentialsExternalSecret) . }}'
37     login: '{{ .Values.config.db.userName }}'
38     password: '{{ .Values.config.db.userPassword }}'
39
40 #################################################################
41 # AAF part
42 #################################################################
43 certInitializer:
44   nameOverride: vid-cert-initializer
45   aafDeployFqi: deployer@people.osaaf.org
46   aafDeployPass: demo123456!
47   # aafDeployCredsExternalSecret: some secret
48   fqdn: vid
49   fqi: vid@vid.onap.org
50   public_fqdn: vid.onap.org
51   fqi_namespace: "org.onap.vid"
52   cadi_longitude: "0.0"
53   cadi_latitude: "0.0"
54   app_ns: org.osaaf.aaf
55   credsPath: /opt/app/osaaf/local
56   aaf_add_config: |
57     echo "*** retrieving password for keystore and trustore"
58     export $(/opt/app/aaf_config/bin/agent.sh local showpass \
59     {{.Values.fqi}} {{ .Values.fqdn }} | grep '^c' | xargs -0)
60     if [ -z "$cadi_keystore_password" ]
61     then
62       echo "  /!\ certificates retrieval failed"
63       exit 1
64     else
65       echo "*** changing them into shell safe ones"
66       export KEYSTORE_PASSWD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1)
67       export TRUSTORE_PASSWD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1)
68       cd {{ .Values.credsPath }}
69       keytool -storepasswd -new "${KEYSTORE_PASSWD}" \
70         -storepass "${cadi_keystore_password_jks}" \
71         -keystore {{ .Values.fqi_namespace }}.jks
72       keytool -storepasswd -new "${TRUSTORE_PASSWD}" \
73         -storepass "${cadi_truststore_password}" \
74         -keystore {{ .Values.fqi_namespace }}.trust.jks
75       echo "*** set key password as same password as keystore password"
76       keytool -keypasswd -new "${KEYSTORE_PASSWD}" \
77         -keystore {{ .Values.fqi_namespace }}.jks \
78         -keypass "${cadi_keystore_password_jks}" \
79         -storepass "${KEYSTORE_PASSWD}" -alias {{ .Values.fqi }}
80       echo "*** save the generated passwords"
81       echo "VID_KEYSTORE_PASSWORD=${KEYSTORE_PASSWD}" > mycreds.prop
82       echo "VID_TRUSTSTORE_PASSWORD=${TRUSTORE_PASSWD}" >> mycreds.prop
83       echo "*** change ownership of certificates to targeted user"
84       chown -R 1000 .
85     fi
86
87 subChartsOnly:
88   enabled: true
89
90 # application image
91 image: onap/vid:8.0.2
92 pullPolicy: Always
93
94 # application configuration
95 config:
96   db:
97     userName: vidadmin
98 #    userCredentialsExternalSecret: some secret
99 #    userPassword: password
100   asdcclientrestauth: "Basic dmlkOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
101   asdcclientrestport: "8443"
102   vidaaiport: "8443"
103   onapport: "30225"
104   onapportrest: "8443"
105   portalhost: "portal.api.simpledemo.onap.org"
106   msoport: "8080"
107   vidmsopass: OBF:1ih71i271vny1yf41ymf1ylz1yf21vn41hzj1icz
108   msodme2serverurl: http://localhost:8081
109   vidcontactuslink: https://todo_contact_us_link.com
110   vidmysqlmaxconnections: "5"
111   logstashServiceName: log-ls
112   logstashPort: 5044
113   roleaccesscentralized: remote
114
115 mariadb-galera:
116   db:
117     # password:
118     externalSecret: *dbUserSecretName
119     name: &mysqlDbName vid_openecomp_epsdk
120   nameOverride: &vid-galera vid-galera
121   replicaCount: 3
122   persistence:
123     enabled: true
124     mountSubPath: vid/maria/data
125   externalConfig: |-
126     [mysqld]
127     lower_case_table_names = 1
128   serviceAccount:
129     nameOverride: *vid-galera
130
131 mariadb-init:
132   config:
133     userCredentialsExternalSecret: *dbUserSecretName
134     mysqlDatabase: *mysqlDbName
135   nameOverride: vid-mariadb-init
136   # A configMap of same name is created. It points to file that will be run after
137   # The DB has been created.
138   dbScriptConfigMap: '{{ include "common.release" . }}-vid-db-init'
139
140 # default number of instances
141 replicaCount: 1
142
143 nodeSelector: {}
144
145 affinity: {}
146
147 # probe configuration parameters
148 liveness:
149   initialDelaySeconds: 120
150   periodSeconds: 10
151   # necessary to disable liveness probe when setting breakpoints
152   # in debugger so K8s doesn't restart unresponsive container
153   enabled: true
154
155 readiness:
156   initialDelaySeconds: 10
157   periodSeconds: 10
158
159 service:
160   type: NodePort
161   name: vid
162   portName: vid
163   externalPort: 8443
164   internalPort: 8443
165   nodePort: "00"
166   externalHttpPort: 8080
167   internalHttpPort: 8080
168
169 ingress:
170   enabled: false
171   service:
172     - baseaddr: "vid.api"
173       name: "vid-http"
174       port: 8443
175   config:
176     ssl: "redirect"
177
178 # Resource Limit flavor -By Default using small
179 flavor: small
180 # Segregation for Different environment (Small and Large)
181 resources:
182   small:
183     limits:
184       cpu: 200m
185       memory: 2Gi
186     requests:
187       cpu: 100m
188       memory: 1Gi
189   large:
190     limits:
191       cpu: 400m
192       memory: 4Gi
193     requests:
194       cpu: 200m
195       memory: 2Gi
196   unlimited: {}