09bb32dd43aeaf472f39aeabb61e7d5aa552048b
[oom.git] / kubernetes / aai / components / aai-modelloader / values.yaml
1 # Copyright © 2018 Amdocs, Bell Canada, AT&T
2 # Modifications Copyright © 2020-2021 Orange
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.
15
16 # Default values for modelloader.
17 # This is a YAML-formatted file.
18 # Declare variables to be passed into your templates.
19 global: # global defaults
20   nodePortPrefix: 302
21   aaiSdcListenerKafkaUser: aai-sdc-list-user
22 #################################################################
23 # Secrets metaconfig
24 #################################################################
25 secrets:
26   - uid: aai-sdc-kafka-secret
27     externalSecret: '{{ tpl (default "" .Values.config.jaasConfExternalSecret) . }}'
28     type: genericKV
29     envs:
30       - name: sasl.jaas.config
31         value: '{{ .Values.config.someConfig }}'
32         policy: generate
33
34 #################################################################
35 # Certificate configuration
36 #################################################################
37 certInitializer:
38   nameOverride: aai-ml-cert-initializer
39   aafDeployFqi: deployer@people.osaaf.org
40   aafDeployPass: demo123456!
41   # aafDeployCredsExternalSecret: some secret
42   fqdn: aai
43   fqi: aai@aai.onap.org
44   public_fqdn: aai.onap.org
45   cadi_longitude: "0.0"
46   cadi_latitude: "0.0"
47   app_ns: org.osaaf.aaf
48   credsPath: /opt/app/osaaf/local
49   appMountPath: /opt/app/model-loader/config/auth/aaf
50   fqi_namespace: org.onap.aai
51   user_id: &user_id 1000
52   group_id: &group_id 1000
53   aaf_add_config: |
54     echo "*** changing them into shell safe ones"
55     export KEYSTORE_PLAIN_PASSWORD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1)
56     export TRUSTSTORE_PLAIN_PASSWORD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1)
57     cd {{ .Values.credsPath }}
58     keytool -storepasswd -new "${KEYSTORE_PLAIN_PASSWORD}" \
59       -storepass "${cadi_keystore_password_p12}" \
60       -keystore {{ .Values.fqi_namespace }}.p12
61     keytool -storepasswd -new "${TRUSTSTORE_PLAIN_PASSWORD}" \
62       -storepass "${cadi_truststore_password}" \
63       -keystore {{ .Values.fqi_namespace }}.trust.jks
64     echo "*** writing passwords into prop file"
65     echo "KEYSTORE_PLAIN_PASSWORD=${KEYSTORE_PLAIN_PASSWORD}" > {{ .Values.credsPath }}/mycreds.prop
66     echo "TRUSTSTORE_PLAIN_PASSWORD=${TRUSTSTORE_PLAIN_PASSWORD}" >> {{ .Values.credsPath }}/mycreds.prop
67     echo "*** change ownership of certificates to targeted user"
68     chown -R {{ .Values.user_id }}:{{ .Values.group_id }} {{ .Values.credsPath }}
69
70 # application image
71 image: onap/model-loader:1.12.0
72 pullPolicy: Always
73 restartPolicy: Always
74 flavor: small
75 flavorOverride: small
76
77 # application configuration
78 config:
79   someConfig: blah
80   kafka:
81     securityProtocol: SASL_PLAINTEXT
82     saslMechanism: SCRAM-SHA-512
83     authType: simple
84     sdcTopic:
85       pattern: SDC-DIST
86       consumerGroup: aai
87       clientId: aai-model-loader
88
89 # default number of instances
90 replicaCount: 1
91
92 updateStrategy:
93   type: RollingUpdate
94   maxUnavailable: 0
95   maxSurge: 1
96
97 nodeSelector: {}
98
99 affinity: {}
100
101 # probe configuration parameters
102 liveness:
103   initialDelaySeconds: 10
104   periodSeconds: 10
105   # necessary to disable liveness probe when setting breakpoints
106   # in debugger so K8s doesn't restart unresponsive container
107   enabled: true
108
109 readiness:
110   initialDelaySeconds: 10
111   periodSeconds: 10
112
113 resources:
114   small:
115     limits:
116       cpu: 2
117       memory: 4Gi
118     requests:
119       cpu: 0.5
120       memory: 1Gi
121   large:
122     limits:
123       cpu: 4
124       memory: 8Gi
125     requests:
126       cpu: 1
127       memory: 1536Mi
128   unlimited: {}
129
130 #Pods Service Account
131 serviceAccount:
132   nameOverride: aai-modelloader
133   roles:
134     - read
135
136 # Not fully used for now
137 securityContext:
138   user_id: *user_id
139   group_id: *group_id
140
141 #Log configuration
142 log:
143   path: /var/log/onap
144 logConfigMapNamePrefix: '{{ include "common.fullname" . }}'