Skip to content

Commit

Permalink
fix: Add an SA for weave-trace deployment (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpanzella authored Jul 22, 2024
1 parent 6a16c8d commit b5aceec
Show file tree
Hide file tree
Showing 7 changed files with 43 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.15.2
version: 0.15.3
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ spec:

resources:
{{- toYaml .Values.resources | nindent 12 }}
serviceAccountName: {{ include "weaveTrace.serviceAccountName" . }}
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
Expand Down
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 "weaveTrace.serviceAccountName" . }}
labels:
{{- include "wandb.commonLabels" . | nindent 4 }}
{{- include "weaveTrace.commonLabels" . | nindent 4 }}
{{- include "weaveTrace.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/weave-trace/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ extraCors: []
common:
labels: {}
deployment: {}
serviceAccount: {}
serviceAccount:
create: true
annotations: {}
clusterRole: {}

service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:

resources:
{{- toYaml .Values.cacheClear.resources | nindent 12 }}

serviceAccountName: {{ include "weave.serviceAccountName" . }}
volumes:
- name: cache
emptyDir:
Expand Down
17 changes: 17 additions & 0 deletions charts/operator-wandb/charts/weave/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 "weave.serviceAccountName" . }}
labels:
{{- include "wandb.commonLabels" . | nindent 4 }}
{{- include "weave.commonLabels" . | nindent 4 }}
{{- include "weave.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/weave/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ extraCors: []
common:
labels: {}
deployment: {}
serviceAccount: {}
serviceAccount:
create: true
annotations: {}
clusterRole: {}

service:
Expand Down

0 comments on commit b5aceec

Please sign in to comment.