mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-10 17:39:43 +00:00
grafana: install kubegraf
This commit is contained in:
parent
2148bfd8da
commit
86c14bb04b
5 changed files with 61 additions and 0 deletions
30
apps/system/grafana/templates/kubegraf-clusterrole.yaml
Normal file
30
apps/system/grafana/templates/kubegraf-clusterrole.yaml
Normal 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"]
|
||||
|
|
@ -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
|
||||
7
apps/system/grafana/templates/kubegraf-secret.yaml
Normal file
7
apps/system/grafana/templates/kubegraf-secret.yaml
Normal 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
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: grafana-kubegraf
|
||||
secrets:
|
||||
- name: grafana-kubegraf-secret
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue