Skip to content

Commit 3037830

Browse files
committed
[Feature][Helm] make api/master/worker/alert application.yaml configurable
1 parent 61915a2 commit 3037830

8 files changed

Lines changed: 642 additions & 0 deletions
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
{{- if and .Values.alert.enabled }}
18+
apiVersion: v1
19+
kind: ConfigMap
20+
metadata:
21+
name: {{ include "dolphinscheduler.fullname" . }}-alert
22+
labels:
23+
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert
24+
{{- include "dolphinscheduler.alert.labels" . | nindent 4 }}
25+
data:
26+
application.yaml: |
27+
spring:
28+
profiles:
29+
active: {{ .Values.datasource.profile }}
30+
jackson:
31+
time-zone: UTC
32+
date-format: "yyyy-MM-dd HH:mm:ss"
33+
banner:
34+
charset: UTF-8
35+
datasource:
36+
profile: postgresql
37+
config:
38+
driver-class-name: org.postgresql.Driver
39+
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
40+
username: root
41+
password: root
42+
hikari:
43+
connection-test-query: select 1
44+
pool-name: DolphinScheduler
45+
46+
# Mybatis-plus configuration, you don't need to change it
47+
mybatis-plus:
48+
mapper-locations: classpath:org/apache/dolphinscheduler/dao/mapper/*Mapper.xml
49+
type-aliases-package: org.apache.dolphinscheduler.dao.entity
50+
configuration:
51+
cache-enabled: false
52+
call-setters-on-nulls: true
53+
map-underscore-to-camel-case: true
54+
jdbc-type-for-null: NULL
55+
global-config:
56+
db-config:
57+
id-type: auto
58+
banner: false
59+
60+
server:
61+
port: 50053
62+
63+
management:
64+
endpoints:
65+
web:
66+
exposure:
67+
include: health,metrics,prometheus
68+
endpoint:
69+
health:
70+
enabled: true
71+
show-details: always
72+
health:
73+
db:
74+
enabled: true
75+
defaults:
76+
enabled: false
77+
metrics:
78+
tags:
79+
application: ${spring.application.name}
80+
81+
alert:
82+
port: 50052
83+
# Mark each alert of alert server if late after x milliseconds as failed.
84+
# Define value is (0 = infinite), and alert server would be waiting alert result.
85+
wait-timeout: 0
86+
max-heartbeat-interval: 60s
87+
query_alert_threshold: 100
88+
89+
registry:
90+
type: zookeeper
91+
zookeeper:
92+
namespace: dolphinscheduler
93+
connect-string: localhost:2181
94+
retry-policy:
95+
base-sleep-time: 60ms
96+
max-sleep: 300ms
97+
max-retries: 5
98+
session-timeout: 30s
99+
connection-timeout: 9s
100+
block-until-connected: 600ms
101+
digest: ~
102+
103+
metrics:
104+
enabled: true
105+
{{- end }}
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
{{- if and .Values.api.enabled }}
18+
apiVersion: v1
19+
kind: ConfigMap
20+
metadata:
21+
name: {{ include "dolphinscheduler.fullname" . }}-api
22+
labels:
23+
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-api
24+
{{- include "dolphinscheduler.api.labels" . | nindent 4 }}
25+
data:
26+
application.yaml: |
27+
server:
28+
port: 12345
29+
servlet:
30+
session:
31+
timeout: 120m
32+
context-path: /dolphinscheduler/
33+
compression:
34+
enabled: true
35+
mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml
36+
jetty:
37+
max-http-form-post-size: 5000000
38+
accesslog:
39+
enabled: true
40+
custom-format: '%{client}a - %u %t "%r" %s %O %{ms}Tms'
41+
42+
spring:
43+
profiles:
44+
active: {{ .Values.datasource.profile }}
45+
banner:
46+
charset: UTF-8
47+
jackson:
48+
time-zone: UTC
49+
date-format: "yyyy-MM-dd HH:mm:ss"
50+
servlet:
51+
multipart:
52+
max-file-size: 1024MB
53+
max-request-size: 1024MB
54+
messages:
55+
basename: i18n/messages
56+
datasource:
57+
profile: postgresql
58+
config:
59+
driver-class-name: org.postgresql.Driver
60+
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
61+
username: root
62+
password: root
63+
hikari:
64+
connection-test-query: select 1
65+
pool-name: DolphinScheduler
66+
quartz:
67+
auto-startup: false
68+
job-store-type: jdbc
69+
jdbc:
70+
initialize-schema: never
71+
properties:
72+
org.quartz.jobStore.isClustered: true
73+
org.quartz.jobStore.class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
74+
org.quartz.scheduler.instanceId: AUTO
75+
org.quartz.jobStore.tablePrefix: QRTZ_
76+
org.quartz.jobStore.acquireTriggersWithinLock: true
77+
org.quartz.scheduler.instanceName: DolphinScheduler
78+
org.quartz.threadPool.class: org.apache.dolphinscheduler.scheduler.quartz.QuartzZeroSizeThreadPool
79+
org.quartz.jobStore.useProperties: false
80+
org.quartz.jobStore.misfireThreshold: 60000
81+
org.quartz.scheduler.makeSchedulerThreadDaemon: true
82+
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
83+
org.quartz.jobStore.clusterCheckinInterval: 5000
84+
org.quartz.scheduler.batchTriggerAcquisitionMaxCount: 1
85+
mvc:
86+
pathmatch:
87+
matching-strategy: ANT_PATH_MATCHER
88+
static-path-pattern: /static/**
89+
springdoc:
90+
swagger-ui:
91+
path: /swagger-ui.html
92+
packages-to-scan: org.apache.dolphinscheduler.api
93+
94+
# Mybatis-plus configuration, you don't need to change it
95+
mybatis-plus:
96+
mapper-locations: classpath:org/apache/dolphinscheduler/dao/mapper/*Mapper.xml
97+
type-aliases-package: org.apache.dolphinscheduler.dao.entity
98+
configuration:
99+
cache-enabled: false
100+
call-setters-on-nulls: true
101+
map-underscore-to-camel-case: true
102+
jdbc-type-for-null: NULL
103+
global-config:
104+
db-config:
105+
id-type: auto
106+
banner: false
107+
108+
management:
109+
endpoints:
110+
web:
111+
exposure:
112+
include: health,metrics,prometheus
113+
endpoint:
114+
health:
115+
enabled: true
116+
show-details: always
117+
health:
118+
db:
119+
enabled: true
120+
defaults:
121+
enabled: false
122+
metrics:
123+
tags:
124+
application: ${spring.application.name}
125+
126+
registry:
127+
type: zookeeper
128+
zookeeper:
129+
namespace: dolphinscheduler
130+
connect-string: localhost:2181
131+
retry-policy:
132+
base-sleep-time: 60ms
133+
max-sleep: 300ms
134+
max-retries: 5
135+
session-timeout: 60s
136+
connection-timeout: 15s
137+
block-until-connected: 15s
138+
digest: ~
139+
140+
api:
141+
audit-enable: false
142+
# Traffic control, if you turn on this config, the maximum number of request/s will be limited.
143+
# global max request number per second
144+
# default tenant-level max request number
145+
traffic-control:
146+
global-switch: false
147+
max-global-qps-rate: 300
148+
tenant-switch: false
149+
default-tenant-qps-rate: 10
150+
#customize-tenant-qps-rate:
151+
# eg.
152+
#tenant1: 11
153+
#tenant2: 20
154+
python-gateway:
155+
# Weather enable python gateway server or not. The default value is false.
156+
enabled: false
157+
# Authentication token for connection from python api to python gateway server. Should be changed the default value
158+
# when you deploy in public network.
159+
auth-token: jwUDzpLsNKEFER4*a8gruBH_GsAurNxU7A@Xc
160+
# The address of Python gateway server start. Set its value to `0.0.0.0` if your Python API run in different
161+
# between Python gateway server. It could be be specific to other address like `127.0.0.1` or `localhost`
162+
gateway-server-address: 0.0.0.0
163+
# The port of Python gateway server start. Define which port you could connect to Python gateway server from
164+
# Python API side.
165+
gateway-server-port: 25333
166+
# The address of Python callback client.
167+
python-address: 127.0.0.1
168+
# The port of Python callback client.
169+
python-port: 25334
170+
# Close connection of socket server if no other request accept after x milliseconds. Define value is (0 = infinite),
171+
# and socket server would never close even though no requests accept
172+
connect-timeout: 0
173+
# Close each active connection of socket server if python program not active after x milliseconds. Define value is
174+
# (0 = infinite), and socket server would never close even though no requests accept
175+
read-timeout: 0
176+
177+
metrics:
178+
enabled: true
179+
180+
security:
181+
authentication:
182+
# Authentication types (supported types: PASSWORD,LDAP,CASDOOR_SSO)
183+
type: PASSWORD
184+
# IF you set type `LDAP`, below config will be effective
185+
ldap:
186+
# ldap server config
187+
urls: ldap://ldap.forumsys.com:389/
188+
base-dn: dc=example,dc=com
189+
username: cn=read-only-admin,dc=example,dc=com
190+
password: password
191+
user:
192+
# admin userId when you use LDAP login
193+
admin: read-only-admin
194+
identity-attribute: uid
195+
email-attribute: mail
196+
# action when ldap user is not exist (supported types: CREATE,DENY)
197+
not-exist-action: CREATE
198+
ssl:
199+
enable: false
200+
# jks file absolute path && password
201+
trust-store: "/ldapkeystore.jks"
202+
trust-store-password: "password"
203+
casdoor:
204+
user:
205+
admin: ""
206+
oauth2:
207+
enable: false
208+
provider:
209+
github:
210+
authorizationUri: ""
211+
redirectUri: ""
212+
clientId: ""
213+
clientSecret: ""
214+
tokenUri: ""
215+
userInfoUri: ""
216+
callbackUrl: ""
217+
iconUri: ""
218+
provider: github
219+
google:
220+
authorizationUri: ""
221+
redirectUri: ""
222+
clientId: ""
223+
clientSecret: ""
224+
tokenUri: ""
225+
userInfoUri: ""
226+
callbackUrl: ""
227+
iconUri: ""
228+
provider: google
229+
casdoor:
230+
# Your Casdoor server url
231+
endpoint: ""
232+
client-id: ""
233+
client-secret: ""
234+
# The certificate may be multi-line, you can use `|-` for ease
235+
certificate: ""
236+
# Your organization name added in Casdoor
237+
organization-name: ""
238+
# Your application name added in Casdoor
239+
application-name: ""
240+
# Doplhinscheduler login url
241+
redirect-url: ""
242+
{{- end }}
243+
244+
245+

0 commit comments

Comments
 (0)