rancher-partner-charts/charts/hashicorp/consul/templates/cni-clusterrolebinding.yaml

21 lines
636 B
YAML

{{- if .Values.connectInject.cni.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "consul.fullname" . }}-cni
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: cni
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "consul.fullname" . }}-cni
subjects:
- kind: ServiceAccount
name: {{ template "consul.fullname" . }}-cni
namespace: {{ default .Release.Namespace .Values.connectInject.cni.namespace }}
{{- end }}