Skip to content

Commit 4a76a07

Browse files
authored
[Improvement][Helm] Make configmap of api/master/worker/alert configuration (#16058)
Update deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml * Update deploy/kubernetes/dolphinscheduler/values.yaml
1 parent 2ab5f7d commit 4a76a07

10 files changed

Lines changed: 98 additions & 562 deletions

‎deploy/kubernetes/dolphinscheduler/README.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
1414
|-----|------|---------|-------------|
1515
| alert.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
1616
| alert.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
17+
| alert.customizedConfig | object | `{}` | configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml |
18+
| alert.enableCustomizedConfig | bool | `false` | enable configure custom config |
1719
| alert.enabled | bool | `true` | Enable or disable the Alert-Server component |
1820
| alert.env.JAVA_OPTS | string | `"-Xms512m -Xmx512m -Xmn256m"` | The jvm options for alert server |
1921
| alert.livenessProbe | object | `{"enabled":true,"failureThreshold":"3","initialDelaySeconds":"30","periodSeconds":"30","successThreshold":"1","timeoutSeconds":"5"}` | Periodic probe of container liveness. Container will be restarted if the probe fails. More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) |
@@ -52,6 +54,8 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
5254
| alert.tolerations | list | `[]` | Tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass. |
5355
| api.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
5456
| api.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
57+
| api.customizedConfig | object | `{}` | configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-api/src/main/resources/application.yaml |
58+
| api.enableCustomizedConfig | bool | `false` | enable configure custom config |
5559
| api.enabled | bool | `true` | Enable or disable the API-Server component |
5660
| api.env.JAVA_OPTS | string | `"-Xms512m -Xmx512m -Xmn256m"` | The jvm options for api server |
5761
| api.livenessProbe | object | `{"enabled":true,"failureThreshold":"3","initialDelaySeconds":"30","periodSeconds":"30","successThreshold":"1","timeoutSeconds":"5"}` | Periodic probe of container liveness. Container will be restarted if the probe fails. More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) |
@@ -191,6 +195,8 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
191195
| initImage.pullPolicy | string | `"IfNotPresent"` | Image pull policy. Options: Always, Never, IfNotPresent |
192196
| master.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
193197
| master.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
198+
| master.customizedConfig | object | `{}` | configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-master/src/main/resources/application.yaml |
199+
| master.enableCustomizedConfig | bool | `false` | enable configure custom config |
194200
| master.enabled | bool | `true` | Enable or disable the Master component |
195201
| master.env.JAVA_OPTS | string | `"-Xms1g -Xmx1g -Xmn512m"` | The jvm options for master server |
196202
| master.env.MASTER_DISPATCH_TASK_NUM | string | `"3"` | Master dispatch task number per batch |
@@ -297,6 +303,8 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
297303
| timezone | string | `"Asia/Shanghai"` | World time and date for cities in all time zones |
298304
| worker.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
299305
| worker.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
306+
| worker.customizedConfig | object | `{}` | configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-worker/src/main/resources/application.yaml |
307+
| worker.enableCustomizedConfig | bool | `false` | enable configure custom config |
300308
| worker.enabled | bool | `true` | Enable or disable the Worker component |
301309
| worker.env.DEFAULT_TENANT_ENABLED | bool | `false` | If set true, will use worker bootstrap user as the tenant to execute task when the tenant is `default`; |
302310
| worker.env.WORKER_EXEC_THREADS | string | `"100"` | Worker execute thread number to limit task instances |
@@ -315,7 +323,6 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
315323
| worker.keda.minReplicaCount | int | `0` | Minimum number of workers created by keda |
316324
| worker.keda.namespaceLabels | object | `{}` | Keda namespace labels |
317325
| worker.keda.pollingInterval | int | `5` | How often KEDA polls the DolphinScheduler DB to report new scale requests to the HPA |
318-
| worker.livenessProbe | object | `{"enabled":true,"failureThreshold":"3","initialDelaySeconds":"30","periodSeconds":"30","successThreshold":"1","timeoutSeconds":"5"}` | Periodic probe of container liveness. Container will be restarted if the probe fails. More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) |
319326
| worker.livenessProbe.enabled | bool | `true` | Turn on and off liveness probe |
320327
| worker.livenessProbe.failureThreshold | string | `"3"` | Minimum consecutive failures for the probe |
321328
| worker.livenessProbe.initialDelaySeconds | string | `"30"` | Delay before liveness probe is initiated |

‎deploy/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-alert.yaml‎

Lines changed: 6 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
{{- if and .Values.alert.enabled }}
17+
{{- if .Values.alert.enableCustomizedConfig }}
1818
apiVersion: v1
1919
kind: ConfigMap
2020
metadata:
@@ -23,93 +23,8 @@ metadata:
2323
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert
2424
{{- include "dolphinscheduler.alert.labels" . | nindent 4 }}
2525
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-
driver-class-name: org.postgresql.Driver
37-
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
38-
username: root
39-
password: root
40-
hikari:
41-
connection-test-query: select 1
42-
pool-name: DolphinScheduler
43-
44-
# Mybatis-plus configuration, you don't need to change it
45-
mybatis-plus:
46-
mapper-locations: classpath:org/apache/dolphinscheduler/dao/mapper/*Mapper.xml
47-
type-aliases-package: org.apache.dolphinscheduler.dao.entity
48-
configuration:
49-
cache-enabled: false
50-
call-setters-on-nulls: true
51-
map-underscore-to-camel-case: true
52-
jdbc-type-for-null: NULL
53-
global-config:
54-
db-config:
55-
id-type: auto
56-
banner: false
57-
58-
server:
59-
port: 50053
60-
61-
management:
62-
endpoints:
63-
web:
64-
exposure:
65-
include: health,metrics,prometheus
66-
endpoint:
67-
health:
68-
enabled: true
69-
show-details: always
70-
health:
71-
db:
72-
enabled: true
73-
defaults:
74-
enabled: false
75-
metrics:
76-
tags:
77-
application: ${spring.application.name}
78-
79-
alert:
80-
port: 50052
81-
# Mark each alert of alert server if late after x milliseconds as failed.
82-
# Define value is (0 = infinite), and alert server would be waiting alert result.
83-
wait-timeout: 0
84-
max-heartbeat-interval: 60s
85-
query_alert_threshold: 100
86-
87-
registry:
88-
type: zookeeper
89-
zookeeper:
90-
namespace: dolphinscheduler
91-
connect-string: localhost:2181
92-
retry-policy:
93-
base-sleep-time: 60ms
94-
max-sleep: 300ms
95-
max-retries: 5
96-
session-timeout: 30s
97-
connection-timeout: 9s
98-
block-until-connected: 600ms
99-
digest: ~
100-
101-
metrics:
102-
enabled: true
103-
104-
# Override by profile
105-
---
106-
spring:
107-
config:
108-
activate:
109-
on-profile: mysql
110-
datasource:
111-
driver-class-name: com.mysql.cj.jdbc.Driver
112-
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
113-
username: root
114-
password: root
115-
{{- end }}
26+
{{- range $path, $config := .Values.alert.customizedConfig }}
27+
{{ $path }}: |
28+
{{ $config | indent 4 -}}
29+
{{- end -}}
30+
{{- end -}}

0 commit comments

Comments
 (0)