rancher-charts/charts/rancher-external-ip-webhook/0.1.601/templates/clusterrolebinding.yaml

31 lines
1.1 KiB
YAML

apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRoleBinding
metadata:
labels: {{ include "externalip-webhook.labels" . | indent 4 }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "externalip-webhook.fullname" . }}-cluster-view
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: ServiceAccount
name: {{ template "externalip-webhook.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- if and (.Values.metrics.enabled) (.Values.metrics.authProxy.enabled) }}
---
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRoleBinding
metadata:
labels: {{ include "externalip-webhook.labels" . | indent 4 }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "externalip-webhook.fullname" . }}-proxy-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "externalip-webhook.fullname" . }}-proxy-role
subjects:
- kind: ServiceAccount
name: {{ template "externalip-webhook.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end }}