diff --git a/ansible/rbac.yaml b/ansible/rbac.yaml index 4b9de79..7cc3e46 100644 --- a/ansible/rbac.yaml +++ b/ansible/rbac.yaml @@ -132,3 +132,38 @@ roleRef: subjects: - kind: ServiceAccount name: host-provisioner + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: host-provisioner + namespace: victoria-metrics + annotations: + kubernetes.io/description: >- + Allows the host-provisioner to update the scrape-collectd + ConfigMap when adding new hosts. +rules: +- apiGroups: + - '' + resources: + - configmaps + verbs: + - patch + - get + resourceNames: + - scrape-collectd + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: host-provisioner + namespace: victoria-metrics +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: host-provisioner +subjects: +- kind: ServiceAccount + name: host-provisioner