{{- if .Values.checksAgent.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: {{ .Release.Name }}-checks-agent labels: {{ include "stackstate-k8s-agent.labels" . | indent 4 }} app.kubernetes.io/component: checks-agent roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: {{ .Release.Name }}-node-agent subjects: - apiGroup: "" kind: ServiceAccount name: {{ .Release.Name }}-checks-agent namespace: {{ .Release.Namespace }} {{- end -}}