Skip to content

Commit

Permalink
feat: add pre-stop hook to unregister a compute node before its pod's…
Browse files Browse the repository at this point in the history
… termination

Signed-off-by: arkbriar <[email protected]>
  • Loading branch information
arkbriar committed Apr 5, 2024
1 parent 37fdfed commit 6337cfb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/risingwave/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.54
version: 0.1.55

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v1.7.3
appVersion: v1.8.0

dependencies:
- name: common
Expand Down
9 changes: 9 additions & 0 deletions charts/risingwave/templates/compute-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ spec:
command:
- /risingwave/bin/risingwave
- compute-node
lifecycle:
preStop:
exec:
command:
- bash
- -c
- >-
/risingwave/bin/risingwave ctl meta unregister-workers --yes \
--workers ${POD_NAME}.{{ include "risingwave.computeHeadlessServiceName" . }}.{{.Release.Namespace}}.svc:{{ .Values.ports.compute.svc }}
{{- end }}
ports:
- containerPort: {{ .Values.ports.compute.svc }}
Expand Down
6 changes: 3 additions & 3 deletions charts/risingwave/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ diagnosticMode:
image:
registry:
repository: risingwavelabs/risingwave
tag: v1.7.3
tag: v1.8.0
digest: ""
## @param image.pullPolicy RisingWave image pull policy
## Specify a imagePullPolicy
Expand Down Expand Up @@ -1009,9 +1009,9 @@ computeComponent:
affinity: { }

## @param computeComponent.terminationGracePeriodSeconds Termination grace period in seconds.
## Defaults to 1 seconds.
## Defaults to 10 seconds.
##
terminationGracePeriodSeconds: 1
terminationGracePeriodSeconds: 10

## @param computeComponent.schedulerName Name of an alternate scheduler.
## Ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
Expand Down

0 comments on commit 6337cfb

Please sign in to comment.