Skip to content

Commit

Permalink
feat: Adding support for k8s webhooks secret store (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk authored Oct 23, 2023
1 parent 2d98f7a commit 9d2ef9c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.tgz
.vscode/
dryrun.yaml
license.txt
test-values.yaml
4 changes: 2 additions & 2 deletions charts/wandb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: wandb
description: A Helm chart for deploying W&B to Kubernetes
type: application
version: 0.2.3
appVersion: "0.42.0"
version: 0.3.0
appVersion: "0.44.1"
icon: https://wandb.ai/logo.svg
maintainers:
- name: wandb
Expand Down
14 changes: 13 additions & 1 deletion charts/wandb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,16 @@ SQL configuration helpers, MySQL 8 needs session variable permissions
{{- if eq (include "wandb.mysqlVersion" .) "8" }}
{{- printf "SESSION_VARIABLES_ADMIN," -}}
{{- end }}
{{- end }}
{{- end }}


{{/*
Secrets Manager Role and Binding
*/}}
{{- define "wandb.secretManagerRoleName" -}}
{{- printf "%s-secret-manager-role" (include "wandb.fullname" .) -}}
{{- end -}}

{{- define "wandb.secretManagerRoleBindingName" -}}
{{- printf "%s-secret-manager-binding" (include "wandb.fullname" .) -}}
{{- end -}}
14 changes: 14 additions & 0 deletions charts/wandb/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "wandb.secretManagerRoleName" . }}
labels:
{{- include "wandb.labels" . | nindent 4 }}
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "create", "update", "delete"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]
14 changes: 14 additions & 0 deletions charts/wandb/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "wandb.secretManagerRoleBindingName" . }}
labels:
{{- include "wandb.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ include "wandb.serviceAccountName" . }}
roleRef:
kind: Role
name: {{ include "wandb.secretManagerRoleName" . }}
apiGroup: rbac.authorization.k8s.io

0 comments on commit 9d2ef9c

Please sign in to comment.