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

feat: GCS FUSE support #283

Open
wants to merge 16 commits into
base: main
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
2 changes: 1 addition & 1 deletion charts/operator-wandb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: operator-wandb
description: A Helm chart for deploying W&B to Kubernetes
type: application
version: 0.21.8
version: 0.22.0
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,3 @@ mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATA
name: {{ $key }}
{{ end }}
{{- end }}

35 changes: 35 additions & 0 deletions charts/operator-wandb/charts/parquet/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.enabled }}
{{- $bucketProvider := (include "wandb.bucket" . | fromYaml).provider -}}
{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -32,6 +33,16 @@ spec:
{{- include "parquet.podLabels" . | nindent 8 }}
{{- include "parquet.labels" . | nindent 8 }}
annotations:
{{- if .Values.fuse.enabled }}
{{- if and (eq $bucketProvider "gcs") (eq .Values.global.cloudProvider "gcp") }}
gke-gcsfuse/volumes: "true"
gke-gcsfuse/ephemeral-storage-limit: "{{ index .Values.fuse.resources.limits "ephemeral-storage" }}"
gke-gcsfuse/cpu-request: "{{ .Values.fuse.resources.requests.cpu }}"
gke-gcsfuse/cpu-limit: "{{ .Values.fuse.resources.limits.cpu }}"
gke-gcsfuse/memory-request: "{{ .Values.fuse.resources.requests.memory }}"
gke-gcsfuse/memory-limit: "{{ .Values.fuse.resources.limits.memory }}"
{{- end }}
{{- end }}
{{- if .Values.pod.annotations -}}
{{- toYaml .Values.pod.annotations | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -64,6 +75,10 @@ spec:
subPath: customCA{{$index}}.crt
{{- end }}
{{- end }}
{{- if .Values.fuse.enabled }}
- name: fuse
mountPath: "/{{ .Values.global.bucket.name }}"
{{- end }}
ports:
- name: parquet
containerPort: 8087
Expand Down Expand Up @@ -167,6 +182,11 @@ spec:
value: "smtp://{{ .Values.global.email.smtp.user }}:{{ .Values.global.email.smtp.password }}@{{ .Values.global.email.smtp.host }}:{{ .Values.global.email.smtp.port }}"
{{- end }}

{{- if .Values.fuse.enabled }}
- name: GORILLA_PARQUET_FUSE_ENABLED
value: "true"
{{- end }}

{{- include "parquet.extraEnv" (dict "global" .Values.global "local" .Values) | nindent 12 }}
{{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}

Expand Down Expand Up @@ -194,6 +214,21 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
serviceAccountName: {{ include "parquet.serviceAccountName" . }}
volumes:
{{- if .Values.fuse.enabled }}
- name: fuse
{{- if and (eq $bucketProvider "gcs") (eq .Values.global.cloudProvider "gcp") }}
csi:
driver: gcsfuse.csi.storage.gke.io
readOnly: true
volumeAttributes:
bucketName: "{{ .Values.global.bucket.name }}"
mountOptions: "implicit-dirs"
fileCacheCapacity: "-1"
fileCacheForRangedRead: "true"
{{- else }}
emptyDir: {}
{{- end }}
{{- end }}
{{- if ne (include "wandb.redis.caCert" .) "" }}
- name: {{ include "parquet.fullname" . }}-redis-ca
secret:
Expand Down
11 changes: 11 additions & 0 deletions charts/operator-wandb/charts/parquet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ tolerations: []

traceRatio: 0

fuse:
enabled: false
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 2
memory: 2Gi
ephemeral-storage: 10Gi

envFrom: {}
extraEnv: {}
extraEnvFrom: {}
Expand Down
Loading