Skip to content

Commit

Permalink
fix: Normalize the service account create logic for all wandb applica…
Browse files Browse the repository at this point in the history
…tions (#178)
  • Loading branch information
danielpanzella authored Jul 18, 2024
1 parent e521ab8 commit 314ff0e
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 4 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.14.17
version: 0.15.0
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -14,3 +15,4 @@ metadata:
{{- if .Values.serviceAccount.annotations -}}
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions charts/operator-wandb/charts/app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ resources:

serviceAccount:
create: true
annotations: {}

role: {}
roleBinding: {}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
{{- toYaml .Values.pod.annotations | nindent 4 }}
{{- end }}
spec:
serviceAccountName: {{ include "console.fullname" . }}
serviceAccountName: {{ include "console.serviceAccountName" . }}
{{- if .tolerations }}
tolerations:
{{- toYaml .tolerations | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -14,3 +15,4 @@ metadata:
{{- if .Values.serviceAccount.annotations -}}
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/operator-wandb/charts/console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ extraCors: []
common:
labels: {}
deployment: {}
serviceAccount: {}
serviceAccount:
create: true
annotations: {}
clusterRole: {}

pod:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "flat-run-fields-updater.serviceAccountName" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "wandb.commonLabels" . | nindent 4 }}
{{- include "flat-run-fields-updater.commonLabels" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ spec:

resources:
{{- toYaml .Values.resources | nindent 12 }}
serviceAccountName: {{ include "parquet.serviceAccountName" . }}
volumes:
{{- if ne (include "wandb.redis.caCert" .) "" }}
- name: {{ include "parquet.fullname" . }}-redis-ca
Expand Down
17 changes: 17 additions & 0 deletions charts/operator-wandb/charts/parquet/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "parquet.serviceAccountName" . }}
labels:
{{- include "wandb.commonLabels" . | nindent 4 }}
{{- include "parquet.commonLabels" . | nindent 4 }}
{{- include "parquet.labels" . | nindent 4 }}
{{- if .Values.serviceAccount.labels -}}
{{- toYaml .Values.serviceAccount.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.serviceAccount.annotations -}}
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/operator-wandb/charts/parquet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ cronJob:
exportHistoryToParquet:
enabled: false
schedule: "11 * * * *"
serviceAccount: {}
serviceAccount:
create: true
annotations: {}
clusterRole: {}

service:
Expand Down

0 comments on commit 314ff0e

Please sign in to comment.