From 73ce4e340f81fecd58aeeb7804ee2746cf69128b Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Sun, 31 Dec 2023 17:44:42 +0100 Subject: [PATCH] try again --- apps/monitoring/prometheus.yaml | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/apps/monitoring/prometheus.yaml b/apps/monitoring/prometheus.yaml index 6238c43..0588f95 100644 --- a/apps/monitoring/prometheus.yaml +++ b/apps/monitoring/prometheus.yaml @@ -1,3 +1,46 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: prometheus +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus +rules: +- apiGroups: [""] + resources: + - nodes + - nodes/metrics + - services + - endpoints + - pods + verbs: ["get", "list", "watch"] +- apiGroups: [""] + resources: + - configmaps + verbs: ["get"] +- apiGroups: + - networking.k8s.io + resources: + - ingresses + verbs: ["get", "list", "watch"] +- nonResourceURLs: ["/metrics"] + verbs: ["get"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: prometheus +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus +subjects: +- kind: ServiceAccount + name: prometheus + namespace: monitoring # needs to be the same as in the kustomization.yaml +--- apiVersion: monitoring.coreos.com/v1 kind: Prometheus metadata: