Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully close kyuubi & add custom labels #6892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Gracefully close kyuubi & add customer labels
  • Loading branch information
HYBG committed Jan 15, 2025
commit 446de174043937b68192f5a26efbece394e5f205
24 changes: 24 additions & 0 deletions charts/kyuubi/templates/kyuubi-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ metadata:
name: {{ .Release.Name }}
labels:
{{- include "kyuubi.labels" . | nindent 4 }}
{{- with .Values.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down Expand Up @@ -129,6 +132,27 @@ spec:
{{- with .Values.volumeMounts }}
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
lifecycle:
{{- if .Values.lifecycle.postStart }}
postStart:
{{- if .Values.lifecycle.postStart.exec }}
exec:
{{- if .Values.lifecycle.postStart.exec.command }}
command:
{{- toYaml .Values.lifecycle.postStart.exec.command | nindent 16 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.lifecycle.preStop }}
preStop:
{{- if .Values.lifecycle.preStop.exec }}
exec:
{{- if .Values.lifecycle.preStop.exec.command }}
command:
{{- toYaml .Values.lifecycle.preStop.exec.command | nindent 16 }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.containers }}
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
Expand Down
12 changes: 12 additions & 0 deletions charts/kyuubi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# Kyuubi server numbers
replicaCount: 2

# Kyuubi labels
labels: ~

# controls how Kyuubi server pods are created during initial scale up,
# when replacing pods on nodes, or when scaling down.
# The default policy is `OrderedReady`, alternative policy is `Parallel`.
Expand Down Expand Up @@ -305,3 +308,12 @@ metrics:
enabled: false
# Content of Prometheus rule file
groups: []

# Kyuubi lifecycle
lifecycle:
postStart:
exec:
command: ['sh', '-c', "echo \"ok!!!\""]
preStop:
exec:
command: ["/bin/sh","-c","/opt/kyuubi/bin/kyuubi-ctl delete server --host $(hostname -I) --port \"10009\""]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: new line

Loading