diff --git a/prometheus-deployment.yaml b/prometheus-deployment.yaml index a1a269f..c16d114 100644 --- a/prometheus-deployment.yaml +++ b/prometheus-deployment.yaml @@ -56,6 +56,7 @@ spec: readOnly: true - name: prometheus-data mountPath: /prometheus + serviceAccountName: prometheus volumes: - name: config-volume configMap: diff --git a/prometheus-rbac.yaml b/prometheus-rbac.yaml new file mode 100644 index 0000000..0a1aa47 --- /dev/null +++ b/prometheus-rbac.yaml @@ -0,0 +1,23 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app: prometheus + name: prometheus + namespace: monitoring +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: prometheus + labels: + app: prometheus +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: prometheus + namespace: monitoring