Skip to content

Commit

Permalink
Change bucket values scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Aug 29, 2023
1 parent b7cbf1a commit 09669b1
Show file tree
Hide file tree
Showing 6 changed files with 31 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.4.4
version: 0.5.0
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
Empty file.
15 changes: 15 additions & 0 deletions charts/operator-wandb/charts/app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,18 @@ app deployments.
{{- print $cs -}}
{{- end }}
{{- end }}

{{- define "app.bucket" -}}
{{- if eq .Values.global.bucket.provider "azure" }}
{{- printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}}
{{- end }}
{{- if eq .Values.global.bucket.provider "google" }}
{{- printf "gs://%s" .Values.global.bucket.name .Values.global.bucket.path -}}
{{- 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 }}
9 changes: 6 additions & 3 deletions charts/operator-wandb/charts/app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,16 @@ spec:
value: "{{ .Values.global.auth.sessionLengthHours }}h"

- name: BUCKET
value: {{ .Values.global.storage.connectionString }}
value: "{{ include "app.bucket" . }}"
- name: BUCKET_QUEUE
value: "internal://"
- name: AWS_REGION
value: {{ .Values.global.storage.region }}
value: {{ .Values.global.bucket.region }}
- name: AWS_S3_KMS_ID
value: "{{ .Values.global.storage.kmsKeyArn }}"
value: "{{ .Values.global.bucket.kmsKeyArn }}"

- name: OPERATOR_ENABLED
value: "true"

- name: LOGGING_ENABLED
value: 'true'
Expand Down
2 changes: 1 addition & 1 deletion charts/operator-wandb/charts/weave/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
{{- include "weave.commonLabels" . | nindent 4 }}
{{- include "weave.labels" . | nindent 4 }}
spec:
accessModes: [ReadWriteOnce]
accessModes: [ReadWriteMany]
{{ include "wandb.storageClass" . | nindent 4 }}
resources:
requests:
Expand Down
11 changes: 8 additions & 3 deletions charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ global:
authMethod: ""
issuer: ""

storage:
connectionString: ""
bucket:
provider: "s3"
name: ""
path: ""
region: ""
kmsKeyArn: ""
kmsKey: ""
secretKey: ""
accessKey: ""

redis:
host: ""
Expand Down Expand Up @@ -92,6 +96,7 @@ app:

weave:
install: true
storageClass: ""
image:
repository: wandb/local
tag: latest
Expand Down

0 comments on commit 09669b1

Please sign in to comment.