grafana: install kubegraf

This commit is contained in:
Andrey Kartashov 2020-06-20 20:17:05 +07:00
parent 2148bfd8da
commit 86c14bb04b
5 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,30 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: grafana-kubegraf
rules:
- apiGroups: [""]
resources:
- namespaces
- pods
- services
- componentstatuses
- nodes
- events
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources:
- jobs
- cronjobs
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources:
- deployments
- daemonsets
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources:
- statefulsets
- deployments
- daemonsets
verbs: ["get", "list", "watch"]

View file

@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: grafana-kubegraf
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: grafana-kubegraf
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: grafana-kubegraf
- kind: ServiceAccount
name: grafana-kubegraf
namespace: grafana

View file

@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: grafana-kubegraf-secret
annotations:
kubernetes.io/service-account.name: grafana-kubegraf
type: kubernetes.io/service-account-token

View file

@ -0,0 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: grafana-kubegraf
secrets:
- name: grafana-kubegraf-secret

View file

@ -34,6 +34,9 @@ grafana:
requests:
cpu: 50m
memory: 128Mi
plugins:
# see also https://github.com/devopsprodigy/kubegraf#installation
- devopsprodigy-kubegraf-app
grafana.ini:
server:
root_url: https://grafana.gorilych.ru