1411f31a612d5187e023112d03dfa550a4b5aca0
[cps.git] / cps-application / src / main / resources / application.yml
1 #  ============LICENSE_START=======================================================\r
2 #  Copyright (C) 2021 Pantheon.tech\r
3 #  Modifications Copyright (C) 2021 Bell Canada\r
4 #  Modifications Copyright (C) 2021 Nordix Foundation\r
5 #  ================================================================================\r
6 #  Licensed under the Apache License, Version 2.0 (the "License");\r
7 #  you may not use this file except in compliance with the License.\r
8 #  You may obtain a copy of the License at\r
9 #\r
10 #        http://www.apache.org/licenses/LICENSE-2.0\r
11 #\r
12 #  Unless required by applicable law or agreed to in writing, software\r
13 #  distributed under the License is distributed on an "AS IS" BASIS,\r
14 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15 #  See the License for the specific language governing permissions and\r
16 #  limitations under the License.\r
17 #\r
18 #  SPDX-License-Identifier: Apache-2.0\r
19 #  ============LICENSE_END=========================================================\r
20 \r
21 server:\r
22     port: 8080\r
23 \r
24 rest:\r
25     api:\r
26         cps-base-path: /cps/api\r
27         ncmp-base-path: /ncmp\r
28         ncmp-inventory-base-path: /ncmpInventory\r
29 \r
30 spring:\r
31     main:\r
32         banner-mode: "off"\r
33     jpa:\r
34         ddl-auto: create\r
35         open-in-view: false\r
36         properties:\r
37             hibernate:\r
38                 enable_lazy_load_no_trans: true\r
39                 dialect: org.hibernate.dialect.PostgreSQLDialect\r
40 \r
41     datasource:\r
42         url: jdbc:postgresql://${DB_HOST}:5432/cpsdb\r
43         username: ${DB_USERNAME}\r
44         password: ${DB_PASSWORD}\r
45         driverClassName: org.postgresql.Driver\r
46         initialization-mode: always\r
47 \r
48     cache:\r
49         type: caffeine\r
50         cache-names: yangSchema\r
51         caffeine:\r
52             spec: maximumSize=10000,expireAfterAccess=10m\r
53 \r
54     liquibase:\r
55         change-log: classpath:changelog/changelog-master.yaml\r
56         labels: ${LIQUIBASE_LABELS}\r
57 \r
58     servlet:\r
59         multipart:\r
60             enabled: true\r
61             max-file-size: 100MB\r
62             max-request-size: 100MB\r
63 \r
64     kafka:\r
65         bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}\r
66         security:\r
67             protocol: PLAINTEXT\r
68         producer:\r
69             value-serializer: org.springframework.kafka.support.serializer.JsonSerializer\r
70             client-id: cps-core\r
71 \r
72 notification:\r
73     data-updated:\r
74         enabled: false\r
75         topic: ${CPS_CHANGE_EVENT_TOPIC:cps.data-updated-events}\r
76         filters:\r
77             enabled-dataspaces: ${NOTIFICATION_DATASPACE_FILTER_PATTERNS:""}\r
78     async:\r
79         enabled: false\r
80         executor:\r
81             core-pool-size: 2\r
82             max-pool-size: 10\r
83             queue-capacity: 500\r
84             wait-for-tasks-to-complete-on-shutdown: true\r
85             thread-name-prefix: Async-\r
86 \r
87 \r
88 springdoc:\r
89     swagger-ui:\r
90         disable-swagger-default-url: true\r
91         urlsPrimaryName: cps-core\r
92         urls:\r
93             - name: cps-core\r
94               url: /api-docs/cps-core/openapi.yaml\r
95             - name: cps-ncmp\r
96               url: /api-docs/cps-ncmp/openapi.yaml\r
97             - name: cps-ncmp-inventory\r
98               url: /api-docs/cps-ncmp/openapi-inventory.yaml\r
99 \r
100 \r
101 security:\r
102     # comma-separated uri patterns which do not require authorization\r
103     permit-uri: /manage/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**\r
104     auth:\r
105         username: ${CPS_USERNAME}\r
106         password: ${CPS_PASSWORD}\r
107 \r
108 # Actuator\r
109 management:\r
110     server:\r
111         port: 8081\r
112     endpoints:\r
113         web:\r
114             base-path: /manage\r
115             exposure:\r
116                 include: info,health,loggers,prometheus\r
117     endpoint:\r
118         health:\r
119             show-details: always\r
120             # kubernetes probes: liveness and readiness\r
121             probes:\r
122                 enabled: true\r
123 \r
124 logging:\r
125     level:\r
126         org:\r
127             springframework: INFO\r
128 \r
129 dmi:\r
130     auth:\r
131         username: ${DMI_USERNAME}\r
132         password: ${DMI_PASSWORD}\r
133     api:\r
134         base-path: /dmi\r