Skip to content

Commit

Permalink
Use hooks for user roles and fix hook deletion policy
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed May 22, 2018
1 parent bf59c61 commit e1b0d6c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chart/stash/templates/mutating-webhook.yaml
Expand Up @@ -10,7 +10,7 @@ metadata:
release: "{{ .Release.Name }}"
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-delete-policy": before-hook-creation
webhooks:
- name: deployment.admission.stash.appscode.com
clientConfig:
Expand Down
6 changes: 6 additions & 0 deletions chart/stash/templates/user-roles.yaml
Expand Up @@ -6,6 +6,9 @@ metadata:
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
rules:
- apiGroups:
- stash.appscode.com
Expand All @@ -29,6 +32,9 @@ metadata:
name: appscode:stash:view
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
rules:
- apiGroups:
- stash.appscode.com
Expand Down
2 changes: 1 addition & 1 deletion chart/stash/templates/validating-webhook.yaml
Expand Up @@ -10,7 +10,7 @@ metadata:
release: "{{ .Release.Name }}"
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-delete-policy": before-hook-creation
webhooks:
- name: restic.admission.stash.appscode.com
clientConfig:
Expand Down

0 comments on commit e1b0d6c

Please sign in to comment.