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