Skip to content

Commit

Permalink
fix the annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk committed Jan 11, 2025
1 parent 5d73431 commit 2bc93f2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
3 changes: 3 additions & 0 deletions charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,9 @@ settingsMigrationHook:
"{{ .Release.Name }}-bucket-configmap": "configMapRef"
"{{ .Release.Name }}-bucket": "secretRef"
kind: Job
helmHookAnnotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
jobs:
smh:
ttlSecondsAfterFinished: 3600
Expand Down
4 changes: 4 additions & 0 deletions charts/wandb-base/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: {{ include "wandb-base.fullname" .}}
labels:
{{- include "wandb-base.labels" . | nindent 4 }}
{{- with .Values.helmHookAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- with .Values.role.rules }}
{{- toYaml . | nindent 4 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/wandb-base/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: {{ include "wandb-base.fullname" . }}
labels:
{{- include "wandb-base.labels" . | nindent 4 }}
{{- with .Values.helmHookAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "wandb-base.serviceAccountName" . }}
Expand Down
10 changes: 8 additions & 2 deletions charts/wandb-base/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ metadata:
name: {{ include "wandb-base.serviceAccountName" . }}
labels:
{{- include "wandb-base.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
{{- if or .Values.helmHookAnnotations .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.helmHookAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/wandb-base/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

helmHookAnnotations: {}

env: {}
envFrom: {}

Expand Down

0 comments on commit 2bc93f2

Please sign in to comment.