Skip to content

Commit

Permalink
Rename bucket providers and and weave pvc
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Aug 30, 2023
1 parent 8878651 commit 429f246
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 8 deletions.
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.6.1
version: 0.7.0
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
7 changes: 2 additions & 5 deletions charts/operator-wandb/charts/app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,13 @@ app deployments.
{{- end }}

{{- define "app.bucket" -}}
{{- if eq .Values.global.bucket.provider "azure" }}
{{- if eq .Values.global.bucket.provider "az" }}
{{- printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}}
{{- end }}
{{- if eq .Values.global.bucket.provider "google" }}
{{- if eq .Values.global.bucket.provider "gcs" }}
{{- printf "gs://%s" .Values.global.bucket.name -}}
{{- end }}
{{- if eq .Values.global.bucket.provider "s3" }}
{{- printf "s3://%s" .Values.global.bucket.name -}}
{{- end }}
{{- if eq .Values.global.bucket.provider "aws" }}
{{- printf "s3://%s" .Values.global.bucket.name -}}
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions charts/operator-wandb/charts/parquet/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,15 @@ app deployments.
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end -}}

{{- define "app.bucket" -}}
{{- if eq .Values.global.bucket.provider "az" }}
{{- printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}}
{{- end }}
{{- if eq .Values.global.bucket.provider "gcs" }}
{{- printf "gs://%s" .Values.global.bucket.name -}}
{{- end }}
{{- if eq .Values.global.bucket.provider "s3" }}
{{- printf "s3://%s" .Values.global.bucket.name -}}
{{- end }}
{{- end }}
25 changes: 25 additions & 0 deletions charts/operator-wandb/charts/parquet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,31 @@ spec:
- name: LOGGING_ENABLED
value: 'true'

- name: MYSQL_PORT
value: "{{ include "wandb.mysql.port" . }}"
- name: MYSQL_HOST
value: "{{ include "wandb.mysql.host" . }}"
- name: MYSQL_DATABASE
value: "{{ include "wandb.mysql.database" . }}"
- name: MYSQL_USER
value: "{{ include "wandb.mysql.user" . }}"
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "wandb.mysql.passwordSecret" . }}
key: MYSQL_PASSWORD
- name: MYSQL
value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)"

- name: BUCKET
value: "{{ include "parquet.bucket" . }}"
- name: BUCKET_QUEUE
value: "internal://"
- name: AWS_REGION
value: {{ .Values.global.bucket.region }}
- name: AWS_S3_KMS_ID
value: "{{ .Values.global.bucket.kmsKey }}"

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

Expand Down
4 changes: 2 additions & 2 deletions charts/operator-wandb/charts/weave/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
{{- if eq .Values.persistence.provider "" }}
{{ include "wandb.storageClass" . | nindent 4 }}
{{- else }}
storageClassName: {{ template "weave.fullname" . }}-{{ .Values.persistence.provider }}-cache
storageClassName: {{ template "weave.fullname" . }}-cache-{{ .Values.persistence.provider }}
{{- end }}
resources:
requests:
Expand All @@ -23,7 +23,7 @@ spec:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ template "weave.fullname" . }}-{{ .Values.persistence.provider }}-cache
name: {{ template "weave.fullname" . }}-cache-{{ .Values.persistence.provider }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "wandb.commonLabels" . | nindent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ global:
issuer: ""

bucket:
# az, s3, gcs
provider: "s3"
name: ""
path: ""
Expand Down Expand Up @@ -97,6 +98,8 @@ app:

weave:
install: true
# # azurefile, filestore
# provider: ""
storageClass: ""
image:
repository: wandb/local
Expand Down

0 comments on commit 429f246

Please sign in to comment.