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 customer labels #6707

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
24 changes: 2 additions & 22 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 @@ -115,6 +118,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 @@ -304,3 +307,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\""]
Loading