charts/kube-plex/templates/rbac.yaml
Jeff Billimek 05594cc703
copying submodule charts instead of symlink (#65)
* copying submodule charts instead of symlink

* fix linting for provisioner chart

* fix linting

* removing trailing space

* linting fixes
2019-08-08 23:48:25 -04:00

55 lines
1.1 KiB
YAML

{{- if .Values.rbac.create -}}
{{- if .Values.kubePlex.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
rules:
- apiGroups:
- ""
resources:
- pods
- pods/attach
- pods/exec
- pods/portforward
- pods/proxy
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "fullname" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "fullname" . }}
{{- end }}