Skip to content

Commit 9d2ef9c

Browse files
feat: Adding support for k8s webhooks secret store (#33)
1 parent 2d98f7a commit 9d2ef9c

File tree

5 files changed

+44
-3
lines changed

5 files changed

+44
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.tgz
22
.vscode/
33
dryrun.yaml
4+
license.txt
45
test-values.yaml

charts/wandb/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: wandb
33
description: A Helm chart for deploying W&B to Kubernetes
44
type: application
5-
version: 0.2.3
6-
appVersion: "0.42.0"
5+
version: 0.3.0
6+
appVersion: "0.44.1"
77
icon: https://wandb.ai/logo.svg
88
maintainers:
99
- name: wandb

charts/wandb/templates/_helpers.tpl

+13-1
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,16 @@ SQL configuration helpers, MySQL 8 needs session variable permissions
8787
{{- if eq (include "wandb.mysqlVersion" .) "8" }}
8888
{{- printf "SESSION_VARIABLES_ADMIN," -}}
8989
{{- end }}
90-
{{- end }}
90+
{{- end }}
91+
92+
93+
{{/*
94+
Secrets Manager Role and Binding
95+
*/}}
96+
{{- define "wandb.secretManagerRoleName" -}}
97+
{{- printf "%s-secret-manager-role" (include "wandb.fullname" .) -}}
98+
{{- end -}}
99+
100+
{{- define "wandb.secretManagerRoleBindingName" -}}
101+
{{- printf "%s-secret-manager-binding" (include "wandb.fullname" .) -}}
102+
{{- end -}}

charts/wandb/templates/role.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: Role
4+
metadata:
5+
name: {{ include "wandb.secretManagerRoleName" . }}
6+
labels:
7+
{{- include "wandb.labels" . | nindent 4 }}
8+
rules:
9+
- apiGroups: [""]
10+
resources: ["secrets"]
11+
verbs: ["get", "create", "update", "delete"]
12+
- apiGroups: [""]
13+
resources: ["namespaces"]
14+
verbs: ["get"]
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: RoleBinding
4+
metadata:
5+
name: {{ include "wandb.secretManagerRoleBindingName" . }}
6+
labels:
7+
{{- include "wandb.labels" . | nindent 4 }}
8+
subjects:
9+
- kind: ServiceAccount
10+
name: {{ include "wandb.serviceAccountName" . }}
11+
roleRef:
12+
kind: Role
13+
name: {{ include "wandb.secretManagerRoleName" . }}
14+
apiGroup: rbac.authorization.k8s.io

0 commit comments

Comments
 (0)