-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathrolebinding.yaml
More file actions
30 lines (30 loc) · 1.04 KB
/
rolebinding.yaml
File metadata and controls
30 lines (30 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{{- if .Values.mosquitto.rbac.create -}}
apiVersion: {{ include "mosquitto.capabilities.rbac.apiVersion" . }}
kind: RoleBinding
metadata:
name: {{ include "mosquitto.fullname" . }}
labels: {{- include "mosquitto.labels.standard" . | nindent 4 }}
{{- with .Values.mosquitto.common.labels }}
{{- toYaml . | trim | nindent 4 }}
{{- end }}
{{- with .Values.mosquitto.roleBinding.labels }}
{{- toYaml . | trim | nindent 4 }}
{{- end }}
{{- if or .Values.mosquitto.common.annotations .Values.mosquitto.roleBinding.annotations }}
annotations:
{{- with .Values.mosquitto.common.annotations }}
{{- toYaml . | trim | nindent 4 }}
{{- end }}
{{- with .Values.mosquitto.roleBinding.annotations }}
{{- toYaml . | trim | nindent 4 }}
{{- end }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "mosquitto.fullname" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
name: {{ include "mosquitto.fullname" . }}
apiGroup: rbac.authorization.k8s.io
{{- end -}}