Skip to content

Commit e1892ca

Browse files
externalize common config
1 parent e42e4bf commit e1892ca

File tree

9 files changed

+94
-550
lines changed

9 files changed

+94
-550
lines changed

cloudbank-v4/account/src/main/resources/application.yaml

Lines changed: 3 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
spring:
55
application:
66
name: account
7-
threads:
8-
virtual:
9-
enabled: true
107
jpa:
118
hibernate:
129
ddl-auto: validate
@@ -19,7 +16,9 @@ spring:
1916
lra:
2017
coordinator-url: ${MP_LRA_COORDINATOR_URL}
2118
propagation-active: true
22-
headers-propagation-prefix: "{x-b3-, oracle-tmm-, authorization, refresh-}"
19+
headers-propagation-prefix: "{x-b3-, oracle-tmm-, authorization, refresh-}"
20+
config:
21+
import: classpath:common.yaml
2322

2423
liquibase:
2524
change-log: classpath:db/changelog/controller.yaml
@@ -41,71 +40,4 @@ spring:
4140
min-pool-size: 10
4241
max-pool-size: 30
4342

44-
eureka:
45-
instance:
46-
hostname: ${spring.application.name}
47-
preferIpAddress: true
48-
client:
49-
service-url:
50-
defaultZone: ${eureka.service-url}
51-
fetch-registry: true
52-
register-with-eureka: true
53-
enabled: true
54-
55-
management:
56-
endpoint:
57-
health:
58-
show-details: always
59-
show-components: always
60-
endpoints:
61-
web:
62-
exposure:
63-
include: "*"
64-
metrics:
65-
tags:
66-
application: ${spring.application.name}
67-
distribution:
68-
percentiles[http.server.requests]: 0.5, 0.90, 0.95, 0.99
69-
percentiles-histogram[http.server.requests]: true
70-
slo[http.server.requests]: 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s
71-
percentiles[http.client.requests]: 0.5, 0.90, 0.95, 0.99
72-
percentiles-histogram[http.client.requests]: true
73-
slo[http.client.requests]: 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s
74-
health:
75-
probes:
76-
enabled: true
77-
tracing:
78-
sampling:
79-
probability: 1.0
80-
info:
81-
os:
82-
enabled: true
83-
env:
84-
enabled: true
85-
java:
86-
enabled: true
87-
otlp:
88-
tracing:
89-
endpoint: ${otel.exporter.otlp.endpoint}
90-
observations:
91-
key-values:
92-
app: ${spring.application.name}
93-
94-
logging:
95-
level:
96-
root: INFO
97-
com.example: INFO
98-
org.springframework.web.filter.AbstractRequestLoggingFilter: INFO
99-
100-
jdbc:
101-
datasource-proxy:
102-
query:
103-
enable-logging: true
104-
log-level: INFO
105-
include-parameter-values: true
106-
107-
request:
108-
logging:
109-
shouldLog: true
110-
11143

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,12 @@
11
spring:
22
application:
33
name: chatbot
4-
threads:
5-
virtual:
6-
enabled: true
74
ai:
85
ollama:
96
base-url: http://ollama.ollama.svc.cluster.local:11434
107
chat:
118
enabled: true
129
options:
1310
model: llama3
14-
15-
eureka:
16-
instance:
17-
hostname: ${spring.application.name}
18-
preferIpAddress: true
19-
client:
20-
service-url:
21-
defaultZone: ${eureka.service-url}
22-
fetch-registry: true
23-
register-with-eureka: true
24-
enabled: true
25-
26-
management:
27-
endpoint:
28-
health:
29-
show-details: always
30-
show-components: always
31-
endpoints:
32-
web:
33-
exposure:
34-
include: "*"
35-
metrics:
36-
tags:
37-
application: ${spring.application.name}
38-
distribution:
39-
percentiles[http.server.requests]: 0.5, 0.90, 0.95, 0.99
40-
percentiles-histogram[http.server.requests]: true
41-
slo[http.server.requests]: 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s
42-
percentiles[http.client.requests]: 0.5, 0.90, 0.95, 0.99
43-
percentiles-histogram[http.client.requests]: true
44-
slo[http.client.requests]: 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s
45-
health:
46-
probes:
47-
enabled: true
48-
tracing:
49-
sampling:
50-
probability: 1.0
51-
info:
52-
os:
53-
enabled: true
54-
env:
55-
enabled: true
56-
java:
57-
enabled: true
58-
otlp:
59-
tracing:
60-
endpoint: ${otel.exporter.otlp.endpoint}
61-
observations:
62-
key-values:
63-
app: ${spring.application.name}
64-
65-
logging:
66-
level:
67-
root: INFO
68-
com.example: INFO
69-
org.springframework.web.filter.AbstractRequestLoggingFilter: INFO
70-
71-
request:
72-
logging:
73-
shouldLog: true
11+
config:
12+
import: classpath:common.yaml

cloudbank-v4/checks/src/main/resources/application.yaml

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
spring:
55
application:
66
name: checks
7-
threads:
8-
virtual:
9-
enabled: true
107
datasource:
118
url: ${spring.datasource.url}
129
username: ${spring.datasource.username}
@@ -18,72 +15,5 @@ spring:
1815
initial-pool-size: 15
1916
min-pool-size: 10
2017
max-pool-size: 30
21-
22-
eureka:
23-
instance:
24-
hostname: ${spring.application.name}
25-
preferIpAddress: true
26-
client:
27-
service-url:
28-
defaultZone: ${eureka.service-url}
29-
fetch-registry: true
30-
register-with-eureka: true
31-
enabled: true
32-
33-
management:
34-
endpoint:
35-
health:
36-
show-details: always
37-
show-components: always
38-
endpoints:
39-
web:
40-
exposure:
41-
include: "*"
42-
metrics:
43-
tags:
44-
application: ${spring.application.name}
45-
distribution:
46-
percentiles[http.server.requests]: 0.5, 0.90, 0.95, 0.99
47-
percentiles-histogram[http.server.requests]: true
48-
slo[http.server.requests]: 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s
49-
percentiles[http.client.requests]: 0.5, 0.90, 0.95, 0.99
50-
percentiles-histogram[http.client.requests]: true
51-
slo[http.client.requests]: 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s
52-
health:
53-
probes:
54-
enabled: true
55-
tracing:
56-
sampling:
57-
probability: 1.0
58-
info:
59-
os:
60-
enabled: true
61-
env:
62-
enabled: true
63-
java:
64-
enabled: true
65-
otlp:
66-
tracing:
67-
endpoint: ${otel.exporter.otlp.endpoint}
68-
observations:
69-
key-values:
70-
app: ${spring.application.name}
71-
72-
logging:
73-
level:
74-
root: INFO
75-
com.example: INFO
76-
org.springframework.web.filter.AbstractRequestLoggingFilter: INFO
77-
78-
jdbc:
79-
datasource-proxy:
80-
query:
81-
enable-logging: true
82-
log-level: INFO
83-
include-parameter-values: true
84-
85-
request:
86-
logging:
87-
shouldLog: true
88-
89-
18+
config:
19+
import: classpath:common.yaml
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Copyright (c) 2024, Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3+
4+
spring:
5+
threads:
6+
virtual:
7+
enabled: true
8+
9+
eureka:
10+
instance:
11+
hostname: ${spring.application.name}
12+
preferIpAddress: true
13+
client:
14+
service-url:
15+
defaultZone: ${eureka.service-url}
16+
fetch-registry: true
17+
register-with-eureka: true
18+
enabled: true
19+
20+
management:
21+
endpoint:
22+
health:
23+
show-details: always
24+
show-components: always
25+
endpoints:
26+
web:
27+
exposure:
28+
include: "*"
29+
metrics:
30+
tags:
31+
application: ${spring.application.name}
32+
distribution:
33+
percentiles[http.server.requests]: 0.5, 0.90, 0.95, 0.99
34+
percentiles-histogram[http.server.requests]: true
35+
slo[http.server.requests]: 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s
36+
percentiles[http.client.requests]: 0.5, 0.90, 0.95, 0.99
37+
percentiles-histogram[http.client.requests]: true
38+
slo[http.client.requests]: 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s
39+
health:
40+
probes:
41+
enabled: true
42+
tracing:
43+
sampling:
44+
probability: 1.0
45+
info:
46+
os:
47+
enabled: true
48+
env:
49+
enabled: true
50+
java:
51+
enabled: true
52+
otlp:
53+
tracing:
54+
endpoint: ${otel.exporter.otlp.endpoint}
55+
observations:
56+
key-values:
57+
app: ${spring.application.name}
58+
59+
logging:
60+
level:
61+
root: INFO
62+
com.example: INFO
63+
org.springframework.web.filter.AbstractRequestLoggingFilter: INFO
64+
65+
jdbc:
66+
datasource-proxy:
67+
query:
68+
enable-logging: true
69+
log-level: INFO
70+
include-parameter-values: true
71+
72+
request:
73+
logging:
74+
shouldLog: true

0 commit comments

Comments
 (0)