Skip to content

Commit

Permalink
feat(query): support custom session affinity (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Mar 29, 2024
1 parent 1dbde61 commit 4eedb68
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/databend-query/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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.9.0
version: 0.9.1

# 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
Expand Down
5 changes: 5 additions & 0 deletions charts/databend-query/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ spec:
{{- if eq (lower .Values.workload) "statefulset" }}
statefulset.kubernetes.io/pod-name: {{ include "databend-query.fullname" . }}-0
{{- end }}
{{- with .Values.service.sessionAffinity }}
sessionAffinity: {{ .type }}
sessionAffinityConfig:
{{- toYaml .config | nindent 4 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/databend-query/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ service:
# Annotations to add to the service
annotations: {}

sessionAffinity:
type: None
config: {}

envs: []
# - name: SENTRY_TRACES_SAMPLE_RATE
# value: "0.5"
Expand Down
6 changes: 6 additions & 0 deletions examples/query-cluster-as-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
replicaCount: 3
workload: Deployment
service:
sessionAffinity:
type: ClientIP
config:
clientIP:
timeoutSeconds: 600

0 comments on commit 4eedb68

Please sign in to comment.