From 24ad2b83e0615948d0018135ffff04968a6e688e Mon Sep 17 00:00:00 2001 From: Isaac Hall <40443+isaachall@users.noreply.github.com> Date: Tue, 15 Oct 2024 06:20:45 -0700 Subject: [PATCH] feat: runtimeClassName annotation support so we can support gVisor (GKE Sandbox) (#100) * feat: runtimeClassName support so we can support gVisor (GKE Sandbox) * Bump chart version to 0.7.3 --- charts/quickwit/Chart.yaml | 2 +- .../quickwit/templates/control-plane-deployment.yaml | 5 ++++- charts/quickwit/templates/indexer-statefulset.yaml | 3 +++ charts/quickwit/templates/janitor-deployment.yaml | 7 +++++-- charts/quickwit/templates/job-create-indices.yaml | 3 +++ charts/quickwit/templates/job-create-sources.yaml | 3 +++ charts/quickwit/templates/metastore-deployment.yaml | 3 +++ charts/quickwit/templates/searcher-statefulset.yaml | 3 +++ charts/quickwit/values.yaml | 12 ++++++++++++ 9 files changed, 37 insertions(+), 4 deletions(-) diff --git a/charts/quickwit/Chart.yaml b/charts/quickwit/Chart.yaml index 6871717..39b1e8b 100644 --- a/charts/quickwit/Chart.yaml +++ b/charts/quickwit/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: quickwit description: Sub-second search & analytics engine on cloud storage. type: application -version: 0.7.2 +version: 0.7.3 appVersion: "v0.8.2" keywords: - quickwit diff --git a/charts/quickwit/templates/control-plane-deployment.yaml b/charts/quickwit/templates/control-plane-deployment.yaml index 3d5648d..38ff065 100644 --- a/charts/quickwit/templates/control-plane-deployment.yaml +++ b/charts/quickwit/templates/control-plane-deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: {{ include "quickwit.fullname" . }}-control-plane labels: - {{- include "quickwit.labels" . | nindent 4 }} + {{- include "quickwit.labels" . | nindent 4 }} annotations: {{- with .Values.annotations }} {{- toYaml . | nindent 4 }} @@ -121,3 +121,6 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.control_plane.runtimeClassName }} + runtimeClassName: {{ .Values.control_plane.runtimeClassName | quote }} + {{- end }} diff --git a/charts/quickwit/templates/indexer-statefulset.yaml b/charts/quickwit/templates/indexer-statefulset.yaml index 1e3506c..099c27c 100644 --- a/charts/quickwit/templates/indexer-statefulset.yaml +++ b/charts/quickwit/templates/indexer-statefulset.yaml @@ -132,6 +132,9 @@ spec: lifecycle: {{- toYaml . | nindent 8 }} {{- end}} + {{- if .Values.indexer.runtimeClassName }} + runtimeClassName: {{ .Values.indexer.runtimeClassName | quote }} + {{- end }} {{- if .Values.indexer.persistentVolume.enabled }} volumeClaimTemplates: - metadata: diff --git a/charts/quickwit/templates/janitor-deployment.yaml b/charts/quickwit/templates/janitor-deployment.yaml index 6fb5dc9..28e766f 100644 --- a/charts/quickwit/templates/janitor-deployment.yaml +++ b/charts/quickwit/templates/janitor-deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: name: {{ include "quickwit.fullname" . }}-janitor labels: - {{- include "quickwit.labels" . | nindent 4 }} + {{- include "quickwit.labels" . | nindent 4 }} annotations: {{- with .Values.annotations }} {{- toYaml . | nindent 4 }} @@ -122,4 +122,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} -{{- end }} + {{- if .Values.janitor.runtimeClassName }} + runtimeClassName: {{ .Values.janitor.runtimeClassName | quote }} + {{- end }} +{{- end }} diff --git a/charts/quickwit/templates/job-create-indices.yaml b/charts/quickwit/templates/job-create-indices.yaml index 13fd304..02df3dd 100644 --- a/charts/quickwit/templates/job-create-indices.yaml +++ b/charts/quickwit/templates/job-create-indices.yaml @@ -98,5 +98,8 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.bootstrap.runtimeClassName }} + runtimeClassName: {{ .Values.bootstrap.runtimeClassName | quote }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/quickwit/templates/job-create-sources.yaml b/charts/quickwit/templates/job-create-sources.yaml index e10848a..df93089 100644 --- a/charts/quickwit/templates/job-create-sources.yaml +++ b/charts/quickwit/templates/job-create-sources.yaml @@ -100,5 +100,8 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.bootstrap.runtimeClassName }} + runtimeClassName: {{ .Values.bootstrap.runtimeClassName | quote }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/quickwit/templates/metastore-deployment.yaml b/charts/quickwit/templates/metastore-deployment.yaml index 80b461d..b4eb4dc 100644 --- a/charts/quickwit/templates/metastore-deployment.yaml +++ b/charts/quickwit/templates/metastore-deployment.yaml @@ -120,3 +120,6 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.metastore.runtimeClassName }} + runtimeClassName: {{ .Values.metastore.runtimeClassName | quote }} + {{- end }} diff --git a/charts/quickwit/templates/searcher-statefulset.yaml b/charts/quickwit/templates/searcher-statefulset.yaml index e074d0c..0e32e4d 100644 --- a/charts/quickwit/templates/searcher-statefulset.yaml +++ b/charts/quickwit/templates/searcher-statefulset.yaml @@ -131,6 +131,9 @@ spec: lifecycle: {{- toYaml . | nindent 8 }} {{- end}} + {{- if .Values.searcher.runtimeClassName }} + runtimeClassName: {{ .Values.searcher.runtimeClassName | quote }} + {{- end }} {{- if .Values.searcher.persistentVolume.enabled }} volumeClaimTemplates: - metadata: diff --git a/charts/quickwit/values.yaml b/charts/quickwit/values.yaml index dd24e67..eba14f5 100644 --- a/charts/quickwit/values.yaml +++ b/charts/quickwit/values.yaml @@ -133,6 +133,8 @@ searcher: affinity: {} + runtimeClassName: "" + indexer: replicaCount: 1 @@ -216,6 +218,8 @@ indexer: # See https://quickwit.io/docs/configuration/index-config#indexing-settings terminationGracePeriodSeconds: 120 + runtimeClassName: "" + persistentVolume: enabled: false # storage: "1Gi" @@ -288,6 +292,8 @@ metastore: affinity: {} + runtimeClassName: "" + control_plane: # Extra env for control plane extraEnv: {} @@ -349,6 +355,8 @@ control_plane: affinity: {} + runtimeClassName: "" + janitor: # Enable Janitor service enabled: true @@ -413,6 +421,8 @@ janitor: affinity: {} + runtimeClassName: "" + # Deploy jobs to bootstrap creation of indexes and sources for quickwit clusters bootstrap: # Enable bootstrap jobs @@ -441,6 +451,8 @@ bootstrap: affinity: {} + runtimeClassName: "" + sources: # Override command for starting container command: []