Merge "[COMMON] Fix condition equality bashisms"
[oom.git] / kubernetes / cps / values.yaml
1 #  Copyright (C) 2021 Pantheon.tech, Orange, Bell Canada.
2 #
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 #################################################################
16 # Secrets.
17 #################################################################
18 secrets:
19   - uid: pg-root-pass
20     name: &pgRootPassSecretName '{{ include "common.release" . }}-cps-pg-root-pass'
21     type: password
22     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "cps-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
23     password: '{{ .Values.postgres.config.pgRootpassword }}'
24     policy: generate
25   - uid: pg-user-creds
26     name: &pgUserCredsSecretName '{{ include "common.release" . }}-cps-pg-user-creds'
27     type: basicAuth
28     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "cps-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
29     login: '{{ .Values.postgres.config.pgUserName }}'
30     password: '{{ .Values.postgres.config.pgUserPassword }}'
31     passwordPolicy: generate
32   - uid: app-user-creds
33     type: basicAuth
34     externalSecret: '{{ tpl (default "" .Values.config.appUserExternalSecret) . }}'
35     login: '{{ .Values.config.appUserName }}'
36     password: '{{ .Values.config.appUserPassword }}'
37     passwordPolicy: generate
38
39 #################################################################
40 # Global configuration defaults.
41 #################################################################
42
43 # bitnami image doesn't support well single quote in password
44 passwordStrengthOverride: basic
45 global:
46   ingress:
47     virtualhost:
48       baseurl: "simpledemo.onap.org"
49
50 image: onap/cps-and-nf-proxy:1.0.1
51 containerPort: &svc_port 8080
52
53 service:
54   type: ClusterIP
55   name: cps
56   ports:
57     - name: &port http
58       port: *svc_port
59
60 pullPolicy: Always
61 # flag to enable debugging - application support required
62 debugEnabled: false
63 nodeSelector: {}
64 affinity: {}
65 # Resource Limit flavor -By Default using small
66 flavor: small
67 # default number of instances
68 replicaCount: 1
69 # Segregation for Different environment (Small and Large)
70 resources:
71   small:
72     limits:
73       cpu: 2
74       memory: 2Gi
75     requests:
76       cpu: 1
77       memory: 1Gi
78   large:
79     limits:
80       cpu: 4
81       memory: 4Gi
82     requests:
83       cpu: 2
84       memory: 2Gi
85   unlimited: {}
86 # probe configuration parameters
87 liveness:
88   initialDelaySeconds: 20
89   periodSeconds: 20
90   # necessary to disable liveness probe when setting breakpoints
91   # in debugger so K8s doesn't restart unresponsive container
92   enabled: true
93   path: /manage/health
94   port: *port
95
96 readiness:
97   initialDelaySeconds: 15
98   periodSeconds: 15
99   path: /manage/health
100   port: *port
101
102 ingress:
103   enabled: true
104   service:
105     - baseaddr: "cps"
106       path: "/"
107       name: "cps"
108       port: *svc_port
109
110 serviceAccount:
111   nameOverride: cps
112   roles:
113     - read
114
115 securityContext:
116   user_id: 100
117   group_id: 655533
118
119 #################################################################
120 # Application configuration defaults.
121 #################################################################
122
123 config:
124
125   # Set it for pre loading xnfdata, else set to null
126   liquibaseLabels: xnf-data-preload
127
128   # REST API basic authentication credentials (passsword is generated if not provided)
129   appUserName: cpsuser
130   #appUserPassword:
131
132 logging:
133   level: INFO
134   path: /tmp
135
136 #################################################################
137 # Postgres overriding defaults in the postgres
138 #################################################################
139 postgres:
140   nameOverride: &postgresName cps-postgres
141   service:
142     name: *postgresName
143     name2: cps-pg-primary
144     name3: cps-pg-replica
145   container:
146     name:
147       primary: cps-pg-primary
148       replica: cps-pg-replica
149   persistence:
150     mountSubPath: cps/data
151     mountInitPath: cps
152   config:
153     pgUserName: cps
154     pgDatabase: cpsdb
155     pgUserExternalSecret: *pgUserCredsSecretName
156     pgRootPasswordExternalSecret: *pgRootPassSecretName
157
158 readinessCheck:
159   wait_for:
160     - cps-postgres