[UUI] Make UUI SM compatible
[oom.git] / kubernetes / uui / components / uui-server / values.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2022 CMCC Corporation
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 # Default values for uui.
16 # This is a YAML-formatted file.
17 # Declare variables to be passed into your templates.
18
19 #################################################################
20 # Global configuration defaults.
21 #################################################################
22 global:
23   uuiPortPrefix: 303
24
25 secrets:
26   - uid: pg-root-pass
27     name: &pgRootPassSecretName '{{ include "common.release" . }}-uui-pg-root-pass'
28     type: password
29     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "uui-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
30     password: '{{ .Values.postgres.config.pgRootpassword }}'
31     policy: generate
32   - uid: pg-user-creds
33     name: &pgUserCredsSecretName '{{ include "common.release" . }}-uui-pg-user-creds'
34     type: basicAuth
35     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "uui-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
36     login: '{{ .Values.postgres.config.pgUserName }}'
37     password: '{{ .Values.postgres.config.pgUserPassword }}'
38     passwordPolicy: generate
39
40
41 #################################################################
42 # AAF part
43 #################################################################
44 certInitializer:
45   nameOverride: uui-server-cert-initializer
46   aafDeployFqi: deployer@people.osaaf.org
47   aafDeployPass: demo123456!
48   # aafDeployCredsExternalSecret: some secret
49   fqdn: uui
50   fqi: uui@uui.onap.org
51   fqi_namespace: org.onap.uui
52   public_fqdn: uui.onap.org
53   cadi_longitude: "0.0"
54   cadi_latitude: "0.0"
55   app_ns: org.osaaf.aaf
56   credsPath: /opt/app/osaaf/local
57   aaf_add_config: |
58     echo "*** changing them into shell safe ones"
59     export KEYSTORE_PASSWORD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1)
60     export TRUSTSORE_PASSWORD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1)
61     cd {{ .Values.credsPath }}
62     keytool -storepasswd -new "${KEYSTORE_PASSWORD}" \
63       -storepass "${cadi_keystore_password_p12}" \
64       -keystore {{ .Values.fqi_namespace }}.p12
65     keytool -storepasswd -new "${TRUSTSORE_PASSWORD}" \
66       -storepass "${cadi_truststore_password}" \
67       -keystore {{ .Values.fqi_namespace }}.trust.jks
68     echo "*** set key password as same password as keystore password"
69     keytool -keypasswd -new "${KEYSTORE_PASSWORD}" \
70       -keystore {{ .Values.fqi_namespace }}.jks \
71       -keypass "${cadi_keystore_password_p12}" \
72       -storepass "${KEYSTORE_PASSWORD}" -alias {{ .Values.fqi }}
73     echo "*** save the generated passwords"
74     echo "KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD}" > mycreds.prop
75     echo "TRUSTSORE_PASSWORD=${TRUSTSORE_PASSWORD}" >> mycreds.prop
76     echo "*** change ownership of certificates to targeted user"
77     chown -R 1000 {{ .Values.credsPath }}
78
79
80 #################################################################
81 # Application configuration defaults.
82 #################################################################
83
84 subChartsOnly:
85   enabled: true
86
87 flavor: small
88
89 # application image
90 repository: nexus3.onap.org:10001
91 image: onap/usecase-ui-server:5.1.3
92 pullPolicy: Always
93
94 # application configuration
95
96 msbaddr: msb-iag.{{include "common.namespace" .}}:80
97 mraddr: message-router.{{include "common.namespace" .}}:3904
98
99 # application configuration override for postgres
100 postgres:
101   nameOverride: &postgresName uui-server-postgres
102   service:
103     name: *postgresName
104     name2: uui-server-pg-primary
105     name3: uui-server-pg-replica
106   container:
107     name:
108       primary: uui-server-pg-primary
109       replica: uui-server-pg-replica
110   persistence:
111     mountSubPath: uui/uuiserver/data
112     mountInitPath: uui/uuiserver
113   config:
114     pgUserName: uui
115     pgDatabase: uuidb
116     pgUserExternalSecret: *pgUserCredsSecretName
117     pgRootPasswordExternalSecret: *pgRootPassSecretName
118
119
120
121 # flag to enable debugging - application support required
122 debugEnabled: false
123
124 # default number of instances
125 replicaCount: 1
126
127 nodeSelector: {}
128
129 affinity: {}
130
131 # probe configuration parameters
132 liveness:
133   initialDelaySeconds: 120
134   periodSeconds: 10
135   # necessary to disable liveness probe when setting breakpoints
136   # in debugger so K8s doesn't restart unresponsive container
137   enabled: true
138
139 readiness:
140   initialDelaySeconds: 60
141   periodSeconds: 10
142
143 service:
144   type: NodePort
145   name: uui-server
146   internalPort: 8082
147   ports:
148     - name: http
149       port: 8082
150       nodePort: '99'
151   annotations:
152     msb.onap.org/service-info: |
153       {{ if .Values.global.msbEnabled -}}[
154         {
155           "serviceName": "usecaseui-server",
156           "version": "v1",
157           "url": "/api/usecase-server/v1",
158           "path":"/iui/usecaseui",
159           "protocol": "REST",
160           "visualRange":"1",
161           "port": "{{ .Values.service.port }}",
162         }
163       ]{{ end }}
164
165 ingress:
166   enabled: false
167   service:
168     - baseaddr: "uui-server-api"
169       name: "uui-server"
170       port: 8082
171
172   # We usually recommend not to specify default resources and to leave this as a conscious
173   # choice for the user. This also increases chances charts run on environments with little
174   # resources, such as Minikube. If you do want to specify resources, uncomment the following
175   # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
176   #
177   # Example:
178   # Configure resource requests and limits
179   # ref: http://kubernetes.io/docs/user-guide/compute-resources/
180   # Minimum memory for development is 2 CPU cores and 4GB memory
181   # Minimum memory for production is 4 CPU cores and 8GB memory
182 resources:
183   small:
184     limits:
185       cpu: 1.5
186       memory: 350Mi
187     requests:
188       cpu: 1
189       memory: 245Mi
190   large:
191     limits:
192       cpu: 2
193       memory: 500Mi
194     requests:
195       cpu: 1
196       memory: 500Mi
197   unlimited: {}
198
199 serviceAccount:
200   nameOverride: uui-server
201   roles:
202     - read
203
204 securityContext:
205   user_id: 100
206   group_id: 655533
207
208 wait_for_job_container:
209   containers:
210     - '{{ include "common.name" . }}-job'