apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: info-dashboard-resources
rules:
- apiGroups:
  - ""
  resources:
  - secrets
  resourceNames:
  - kubeconfig-{{ .Release.Namespace }}
  verbs: ["get", "list", "watch"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: {{ .Release.Name }}-dashboard-resources
subjects:
{{ include "cozy-lib.rbac.subjectsForTenantAndAccessLevel" (list "view" .Release.Namespace) }}
roleRef:
  kind: Role
  name: {{ .Release.Name }}-dashboard-resources
  apiGroup: rbac.authorization.k8s.io
