{{- if or .Values.rbac.create (or .Values.openshift (.Capabilities.APIVersions.Has "apps.openshift.io/v1")) }} --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: {{ template "instana-agent.fullname" . }} labels: {{- include "instana-agent.commonLabels" . | nindent 4 }} subjects: - kind: ServiceAccount name: {{ template "instana-agent.serviceAccountName" . }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole name: {{ template "instana-agent.fullname" . }} apiGroup: rbac.authorization.k8s.io {{- end }}