You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
919 B
36 lines
919 B
3 years ago
|
{{ if .Values.rbac.create }}
|
||
|
# This role is used to allow pv-resizer to get namespaces and patch PVCs
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: ClusterRole
|
||
|
metadata:
|
||
|
name: {{ .Release.Name }}
|
||
|
labels:
|
||
|
{{- include "pv-resizer.labels" . | nindent 4 }}
|
||
|
rules:
|
||
|
- apiGroups: [""]
|
||
|
resources: ["namespaces"]
|
||
|
verbs: ["get"]
|
||
|
- apiGroups: [""]
|
||
|
resources:
|
||
|
- deployments
|
||
|
- statefulsets
|
||
|
- persistentvolumeclaims
|
||
|
verbs: ["get", "list", "patch", "update"]
|
||
|
|
||
|
|
||
|
# We bind the role to the pv-resizer ServiceAccount
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: ClusterRoleBinding
|
||
|
metadata:
|
||
|
name: {{ .Release.Name }}
|
||
|
labels:
|
||
|
{{- include "pv-resizer.labels" . | nindent 4 }}
|
||
|
roleRef:
|
||
|
apiGroup: rbac.authorization.k8s.io
|
||
|
kind: Role
|
||
|
name: {{ .Release.Name }}
|
||
|
subjects:
|
||
|
- kind: ServiceAccount
|
||
|
name: {{ include "pv-resizer.serviceAccountName" . }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
{{ end }}
|