From 302eecadfaf5e42cc1cb03340ae269af389871c8 Mon Sep 17 00:00:00 2001 From: Adrian Ng Date: Mon, 29 May 2017 15:07:54 +1000 Subject: [PATCH] Added k8s 1.6 RBAC for prometheus --- prometheus-deployment.yaml | 1 + prometheus-rbac.yaml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 prometheus-rbac.yaml 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