Merge "[UUI] New Solve 2 components in one Docker"
[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.1
92 pullPolicy: Always
93
94 # application configuration
95
96 msbaddr: msb-iag.{{include "common.namespace" .}}:443
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   portName: uui-server
147   internalPort: 8082
148   nodePort: 99
149
150 ingress:
151   enabled: false
152   service:
153     - baseaddr: uui-server-api
154       name: "uui-server"
155       port: 8082
156   config:
157     ssl: "redirect"
158
159   # We usually recommend not to specify default resources and to leave this as a conscious
160   # choice for the user. This also increases chances charts run on environments with little
161   # resources, such as Minikube. If you do want to specify resources, uncomment the following
162   # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
163   #
164   # Example:
165   # Configure resource requests and limits
166   # ref: http://kubernetes.io/docs/user-guide/compute-resources/
167   # Minimum memory for development is 2 CPU cores and 4GB memory
168   # Minimum memory for production is 4 CPU cores and 8GB memory
169 resources:
170   small:
171     limits:
172       cpu: 1.5
173       memory: 350Mi
174     requests:
175       cpu: 1
176       memory: 245Mi
177   large:
178     limits:
179       cpu: 2
180       memory: 500Mi
181     requests:
182       cpu: 1
183       memory: 500Mi
184   unlimited: {}
185
186 serviceAccount:
187   nameOverride: uui-server
188   roles:
189     - read
190
191 securityContext:
192   user_id: 100
193   group_id: 655533