Skip to content

Commit

Permalink
Add additional RBAC for hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sd109 committed Aug 9, 2024
1 parent 6b17092 commit 50000f5
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions danswer-azimuth/templates/hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-danswer-cleanup
name: {{ .Release.Name }}-danswer-fixup
namespace: {{ .Release.Name }}
annotations:
# Need to keep around for post-delete hooks
Expand All @@ -23,19 +23,33 @@ rules:
verbs:
- get
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- watch
- apiGroups:
- apps
resources:
- deployment
verbs:
- get
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .Release.Name }}-danswer-cleanup
name: {{ .Release.Name }}-danswer-fixup
namespace: {{ .Release.Name }}
annotations:
# Need to keep around for post-delete hooks
helm.sh/resource-policy: keep
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ .Release.Name }}-danswer-cleanup
name: {{ .Release.Name }}-danswer-fixup
subjects:
- kind: ServiceAccount
name: default
Expand Down

0 comments on commit 50000f5

Please sign in to comment.