Browse Source

[Improvement][Helm] Support for updateStrategy (#16334)

dev
Gallardot 5 months ago committed by GitHub
parent
commit
9ec31b021a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      deploy/kubernetes/dolphinscheduler/README.md
  2. 13
      deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl
  3. 1
      deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml
  4. 1
      deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
  5. 14
      deploy/kubernetes/dolphinscheduler/values.yaml

2
deploy/kubernetes/dolphinscheduler/README.md

@ -246,6 +246,7 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
| master.service.serviceMonitor.labels | object | `{}` | serviceMonitor.labels ServiceMonitor extra labels |
| master.service.serviceMonitor.path | string | `"/actuator/prometheus"` | serviceMonitor.path path of the metrics endpoint |
| master.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. |
| master.updateStrategy | object | `{"rollingUpdate":{"partition":0},"type":"RollingUpdate"}` | Update strategy ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies |
| minio.auth.rootPassword | string | `"minioadmin"` | minio password |
| minio.auth.rootUser | string | `"minioadmin"` | minio username |
| minio.defaultBuckets | string | `"dolphinscheduler"` | minio default buckets |
@ -358,6 +359,7 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
| worker.service.serviceMonitor.labels | object | `{}` | serviceMonitor.labels ServiceMonitor extra labels |
| worker.service.serviceMonitor.path | string | `"/actuator/prometheus"` | serviceMonitor.path path of the metrics endpoint |
| worker.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. |
| worker.updateStrategy | object | `{"rollingUpdate":{"partition":0},"type":"RollingUpdate"}` | Update strategy ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies |
| zookeeper.enabled | bool | `true` | If not exists external registry, the zookeeper registry will be used by default. |
| zookeeper.fourlwCommandsWhitelist | string | `"srvr,ruok,wchs,cons"` | A list of comma separated Four Letter Words commands to use |
| zookeeper.persistence.enabled | bool | `false` | Set `zookeeper.persistence.enabled` to true to mount a new volume for internal ZooKeeper |

13
deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl

@ -398,3 +398,16 @@ Create a ldap ssl volumeMount.
subPath: jks-file
{{- end -}}
{{- end -}}
{{/*
Renders a value that contains template.
Usage:
{{ include "dolphinscheduler.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "dolphinscheduler.tplvalues.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}

1
deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml

@ -23,6 +23,7 @@ metadata:
{{- include "dolphinscheduler.master.labels" . | nindent 4 }}
spec:
podManagementPolicy: {{ .Values.master.podManagementPolicy }}
updateStrategy: {{- include "dolphinscheduler.tplvalues.render" (dict "value" .Values.master.updateStrategy "context" $ ) | nindent 4 }}
replicas: {{ .Values.master.replicas }}
selector:
matchLabels:

1
deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml

@ -23,6 +23,7 @@ metadata:
{{- include "dolphinscheduler.worker.labels" . | nindent 4 }}
spec:
podManagementPolicy: {{ .Values.worker.podManagementPolicy }}
updateStrategy: {{- include "dolphinscheduler.tplvalues.render" (dict "value" .Values.worker.updateStrategy "context" $ ) | nindent 4 }}
replicas: {{ .Values.worker.replicas }}
selector:
matchLabels:

14
deploy/kubernetes/dolphinscheduler/values.yaml

@ -424,6 +424,13 @@ master:
enabled: true
# -- PodManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down.
podManagementPolicy: "Parallel"
# -- Update strategy
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
#
updateStrategy:
type: RollingUpdate
rollingUpdate:
partition: 0
# -- Replicas is the desired number of replicas of the given Template.
replicas: "3"
# -- You can use annotations to attach arbitrary non-identifying metadata to objects.
@ -562,6 +569,13 @@ worker:
enabled: true
# -- PodManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down.
podManagementPolicy: "Parallel"
# -- Update strategy
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
#
updateStrategy:
type: RollingUpdate
rollingUpdate:
partition: 0
# -- Replicas is the desired number of replicas of the given Template.
replicas: "3"
# -- You can use annotations to attach arbitrary non-identifying metadata to objects.

Loading…
Cancel
Save