Skip to content

Instantly share code, notes, and snippets.

@mdesanti
Created January 7, 2019 13:55
Show Gist options
  • Save mdesanti/85416bbbbe44a44f5d1c2019729cc349 to your computer and use it in GitHub Desktop.
Save mdesanti/85416bbbbe44a44f5d1c2019729cc349 to your computer and use it in GitHub Desktop.
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}
roleRef:
kind: ClusterRole
name: {{ .Release.Name }}
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment