[POLICY][COMMON] Create Authorization Policies for Policy
[oom.git] / kubernetes / policy / components / policy-api / values.yaml
1 #  ============LICENSE_START=======================================================
2 #   Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
3 #   Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
4 #   Modification (C) 2023 Deutsche Telekom. All rights reserved.
5 #  ================================================================================
6 #  Licensed under the Apache License, Version 2.0 (the "License");
7 #  you may not use this file except in compliance with the License.
8 #  You may obtain a copy of the License at
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #  Unless required by applicable law or agreed to in writing, software
13 #  distributed under the License is distributed on an "AS IS" BASIS,
14 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #  See the License for the specific language governing permissions and
16 #  limitations under the License.
17 #
18 #  SPDX-License-Identifier: Apache-2.0
19 #  ============LICENSE_END=========================================================
20
21 #################################################################
22 # Global configuration defaults.
23 #################################################################
24 global:
25   nodePortPrefix: 304
26   persistence: {}
27
28 #################################################################
29 # Secrets metaconfig
30 #################################################################
31 secrets:
32   - uid: db-creds
33     type: basicAuth
34     externalSecret: '{{ tpl (default "" .Values.db.credsExternalSecret) . }}'
35     login: '{{ .Values.db.user }}'
36     password: '{{ .Values.db.password }}'
37     passwordPolicy: required
38   - uid: restserver-creds
39     type: basicAuth
40     externalSecret: '{{ tpl (default "" .Values.restServer.apiUserExternalSecret) . }}'
41     login: '{{ .Values.restServer.user }}'
42     password: '{{ .Values.restServer.password }}'
43     passwordPolicy: required
44
45 #################################################################
46 # Application configuration defaults.
47 #################################################################
48 # application image
49 image: onap/policy-api:2.8.1
50 pullPolicy: Always
51
52 # flag to enable debugging - application support required
53 debugEnabled: false
54
55 # application configuration
56 db:
57   user: policy_user
58   password: policy_user
59   service:
60     name: policy-mariadb
61     internalPort: 3306
62
63 restServer:
64   user: policyadmin
65   password: zb!XztG34
66
67 # default number of instances
68 replicaCount: 1
69
70 nodeSelector: {}
71
72 affinity: {}
73
74 # probe configuration parameters
75 liveness:
76   initialDelaySeconds: 60
77   periodSeconds: 10
78   # necessary to disable liveness probe when setting breakpoints
79   # in debugger so K8s doesn't restart unresponsive container
80   enabled: true
81
82 readiness:
83   initialDelaySeconds: 10
84   periodSeconds: 120
85   api: /policy/api/v1/healthcheck
86   successThreshold: 1
87   failureThreshold: 3
88   timeout: 60
89
90 service:
91   type: ClusterIP
92   name: policy-api
93   internalPort: 6969
94   ports:
95     - name: http
96       port: 6969
97
98 ingress:
99   enabled: false
100
101 serviceMesh:
102   authorizationPolicy:
103     authorizedPrincipals:
104       - serviceAccount: policy-pap-read
105
106 flavor: small
107 resources:
108   small:
109     limits:
110       cpu: 1
111       memory: 4Gi
112     requests:
113       cpu: 100m
114       memory: 1Gi
115   large:
116     limits:
117       cpu: 2
118       memory: 8Gi
119     requests:
120       cpu: 200m
121       memory: 2Gi
122   unlimited: {}
123
124 #Pods Service Account
125 serviceAccount:
126   nameOverride: policy-api
127   roles:
128     - read
129
130 metrics:
131   serviceMonitor:
132     # Override the labels based on the Prometheus config parameter: serviceMonitorSelector.
133     # The default operator for prometheus enforces the below label.
134     labels:
135       release: prometheus
136     enabled: true
137     port: policy-api
138     interval: 60s
139     isHttps: false
140     basicAuth:
141       enabled: true
142       externalSecretNameSuffix: policy-api-user-creds
143       externalSecretUserKey: login
144       externalSecretPasswordKey: password
145     selector:
146       app: '{{ include "common.name" . }}'
147       chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
148       release: '{{ include "common.release" . }}'
149       heritage: '{{ .Release.Service }}'