Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding support for k8s webhooks secret store #33

Merged
merged 9 commits into from
Oct 23, 2023
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
zacharyblasczyk marked this conversation as resolved.
Show resolved Hide resolved
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"]
zacharyblasczyk marked this conversation as resolved.
Show resolved Hide resolved
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
Loading