Skip to content

Commit

Permalink
Merge branch 'main' into issue-284
Browse files Browse the repository at this point in the history
  • Loading branch information
amanpruthi authored Sep 30, 2024
2 parents 13e75be + b5b60af commit 07bfab3
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 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.18.1
version: 0.18.4
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
4 changes: 3 additions & 1 deletion charts/operator-wandb/charts/app/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ metadata:
{{- include "wandb.commonLabels" . | nindent 4 }}
data:
SLACK_SECRET: {{ default "" .Values.global.slack.secret | b64enc }}
LICENSE: {{ default "" .Values.global.license | b64enc }}
{{- if and (not .Values.global.licenseSecret.name) (not .Values.global.licenseSecret.key) .Values.global.license }}
LICENSE: {{ .Values.global.license | b64enc }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/operator-wandb/charts/console/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rules:
resources: [ "secrets" ]
verbs: [ "get", "list", "watch", "patch", "create" ]
- apiGroups: [ "" ]
resources: [ "nodes", "namespaces", "pods", "pods/log", "configmaps", "services", "serviceaccounts", "events" ]
resources: [ "namespaces", "pods", "pods/log", "configmaps", "services", "serviceaccounts", "events" ]
verbs: [ "get", "list" ]
- apiGroups: [ "apps" ]
resources: [ "deployments", "statefulsets", "daemonsets", "replicasets", "controllerrevisions" ]
Expand Down
10 changes: 8 additions & 2 deletions charts/operator-wandb/templates/_bucket.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{{/*
Return name of secret where bucket information is stored
Return the bucket credentials secret name
*/}}
{{- define "wandb.bucket.secret" -}}
{{- print .Release.Name "-bucket" -}}
{{- if .Values.global.bucket.secretName -}}
{{ .Values.global.bucket.secretName }}
{{- else if .Values.global.defaultBucket.secretName -}}
{{ .Values.global.defaultBucket.secretName }}
{{- else }}
{{- print .Release.Name "-bucket" -}}
{{- end -}}
{{- end }}
4 changes: 3 additions & 1 deletion charts/operator-wandb/templates/bucket.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.global.bucket.secretName }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -6,4 +7,5 @@ metadata:
{{- include "wandb.commonLabels" . | nindent 4 }}
data:
ACCESS_KEY: {{ .Values.global.bucket.accessKey | default .Values.global.defaultBucket.accessKey | b64enc }}
SECRET_KEY: {{ .Values.global.bucket.secretKey | default .Values.global.defaultBucket.secretKey | b64enc }}
SECRET_KEY: {{ .Values.global.bucket.secretKey | default .Values.global.defaultBucket.secretKey | b64enc }}
{{- end }}
8 changes: 7 additions & 1 deletion charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ global:
host: "http://localhost:8080"
license: ""

licenseSecret:
name: ""
key: ""

cloudProvider: ""

storageClass: ""
Expand Down Expand Up @@ -100,9 +104,11 @@ global:
kmsKey: ""
secretKey: ""
accessKey: ""
secretName: ""

# If specified the application will use this bucket for all storage operations, and will not be overridable by the user.
bucket: {}
bucket:
secretName: ""

redis:
host: ""
Expand Down

0 comments on commit 07bfab3

Please sign in to comment.