mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-11 01:49:44 +00:00
monitoring: use victoriametrics stack
This commit is contained in:
parent
0d38ea3698
commit
46470b5e2e
17 changed files with 59 additions and 302 deletions
|
|
@ -48,3 +48,9 @@ data:
|
||||||
- name: itzg
|
- name: itzg
|
||||||
type: helm
|
type: helm
|
||||||
url: https://itzg.github.io/minecraft-server-charts/
|
url: https://itzg.github.io/minecraft-server-charts/
|
||||||
|
- name: prometheus-community
|
||||||
|
type: helm
|
||||||
|
url: https://prometheus-community.github.io/helm-charts
|
||||||
|
- name: vm
|
||||||
|
type: helm
|
||||||
|
url: https://victoriametrics.github.io/helm-charts/
|
||||||
|
|
|
||||||
2
apps/system/grafana/.gitignore
vendored
2
apps/system/grafana/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
requirements.lock
|
|
||||||
charts/
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
name: grafana
|
|
||||||
version: 0.1
|
|
||||||
apiVersion: v2
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
dependencies:
|
|
||||||
- name: grafana
|
|
||||||
version: '6.1.15'
|
|
||||||
repository: https://grafana.github.io/helm-charts
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: datasources
|
|
||||||
labels:
|
|
||||||
grafana_datasource: "1"
|
|
||||||
data:
|
|
||||||
loki-datasource.yaml: |-
|
|
||||||
apiVersion: 1
|
|
||||||
datasources:
|
|
||||||
- name: Loki
|
|
||||||
type: loki
|
|
||||||
access: proxy
|
|
||||||
url: http://loki.logging:3100
|
|
||||||
version: 1
|
|
||||||
prometheus-datasource.yaml: |-
|
|
||||||
apiVersion: 1
|
|
||||||
datasources:
|
|
||||||
- name: Prometheus
|
|
||||||
type: prometheus
|
|
||||||
access: proxy
|
|
||||||
url: http://prometheus-operator-prometheus.monitoring:9090/
|
|
||||||
version: 1
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: grafana
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 1Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
hostPath:
|
|
||||||
path: /data/grafana
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: grafana
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
volumeMode: Filesystem
|
|
||||||
volumeName: grafana
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
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"]
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: grafana-kubegraf-secret
|
|
||||||
annotations:
|
|
||||||
kubernetes.io/service-account.name: grafana-kubegraf
|
|
||||||
type: kubernetes.io/service-account-token
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: grafana-kubegraf
|
|
||||||
secrets:
|
|
||||||
- name: grafana-kubegraf-secret
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
grafana:
|
|
||||||
nameOverride: grafana
|
|
||||||
fullnameOverride: grafana
|
|
||||||
defaultDashboardsEnabled: false
|
|
||||||
enabled: true
|
|
||||||
serviceMonitor:
|
|
||||||
selfMonitor: false
|
|
||||||
# secret grafana should be created manually
|
|
||||||
# it should contain:
|
|
||||||
# admin-user
|
|
||||||
# admin-password
|
|
||||||
# GF_AUTH_GITHUB_CLIENT_SECRET
|
|
||||||
admin:
|
|
||||||
existingSecret: grafana
|
|
||||||
envFromSecret: grafana
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: letsencrypt
|
|
||||||
hosts:
|
|
||||||
- grafana.gorilych.ru
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- grafana.gorilych.ru
|
|
||||||
secretName: grafana-tls
|
|
||||||
persistence:
|
|
||||||
enabled: true
|
|
||||||
type: pvc
|
|
||||||
existingClaim: grafana
|
|
||||||
resources:
|
|
||||||
#limits:
|
|
||||||
# cpu: 100m
|
|
||||||
# memory: 128Mi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
plugins:
|
|
||||||
# see also https://github.com/devopsprodigy/kubegraf#installation
|
|
||||||
- devopsprodigy-kubegraf-app
|
|
||||||
- grafana-piechart-panel
|
|
||||||
grafana.ini:
|
|
||||||
server:
|
|
||||||
root_url: https://grafana.gorilych.ru
|
|
||||||
auth.github:
|
|
||||||
enabled: true
|
|
||||||
allow_sign_up: false
|
|
||||||
client_id: 6494b9ed39a915d9ac20
|
|
||||||
# client_secret: in grafana secret
|
|
||||||
scopes: user:email,read:org
|
|
||||||
auth_url: https://github.com/login/oauth/authorize
|
|
||||||
token_url: https://github.com/login/oauth/access_token
|
|
||||||
api_url: https://api.github.com/user
|
|
||||||
dashboardProviders:
|
|
||||||
dashboardproviders.yaml:
|
|
||||||
apiVersion: 1
|
|
||||||
providers:
|
|
||||||
- name: default
|
|
||||||
folder: ''
|
|
||||||
type: file
|
|
||||||
disableDeletion: false
|
|
||||||
editable: true
|
|
||||||
allowUiUpdates: false
|
|
||||||
options:
|
|
||||||
path: /var/lib/grafana/dashboards/default
|
|
||||||
dashboards:
|
|
||||||
default:
|
|
||||||
nginx-ingress:
|
|
||||||
gnetId: 9614
|
|
||||||
revision: 1
|
|
||||||
datasource: Prometheus
|
|
||||||
sidecar:
|
|
||||||
datasources:
|
|
||||||
enabled: true
|
|
||||||
|
|
@ -1,2 +1,6 @@
|
||||||
name: monitoring
|
name: monitoring
|
||||||
version: 0.1
|
version: 0.1
|
||||||
|
dependencies:
|
||||||
|
- name: victoria-metrics-k8s-stack
|
||||||
|
version: 0.7.3
|
||||||
|
repository: https://victoriametrics.github.io/helm-charts/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
dependencies:
|
|
||||||
- name: prometheus-operator
|
|
||||||
version: '8.15.5'
|
|
||||||
repository: '@stable'
|
|
||||||
|
|
@ -1,61 +1,51 @@
|
||||||
prometheus-operator:
|
victoria-metrics-k8s-stack:
|
||||||
nameOverride: prometheus-operator
|
nameOverride: monitoring
|
||||||
fullnameOverride: prometheus-operator
|
fullnameOverride: monitoring
|
||||||
prometheusOperator:
|
argocdReleaseOverride: monitoring
|
||||||
admissionWebhooks:
|
|
||||||
enabled: false
|
vmsingle:
|
||||||
tlsProxy:
|
spec:
|
||||||
enabled: false
|
|
||||||
serviceMonitor:
|
|
||||||
selfMonitor: false
|
|
||||||
prometheus:
|
|
||||||
enabled: true
|
|
||||||
serviceMonitor:
|
|
||||||
selfMonitor: false
|
|
||||||
prometheusSpec:
|
|
||||||
replicas: 1
|
|
||||||
securityContext:
|
|
||||||
runAsUser: 1000
|
|
||||||
walCompression: true
|
|
||||||
serviceMonitorSelector: {}
|
|
||||||
serviceMonitorNamespaceSelector: {}
|
|
||||||
storage:
|
storage:
|
||||||
volumeClaimTemplate:
|
storageClassName: local-path
|
||||||
spec:
|
|
||||||
volumeName: prometheus
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
alertmanager:
|
|
||||||
enabled: false
|
|
||||||
defaultRules:
|
|
||||||
create: false
|
|
||||||
kubelet:
|
|
||||||
enabled: true
|
|
||||||
kubeControllerManager:
|
|
||||||
enabled: false
|
|
||||||
kubeScheduler:
|
|
||||||
enabled: false
|
|
||||||
kubeEtcd:
|
|
||||||
enabled: false
|
|
||||||
coreDns:
|
|
||||||
enabled: false
|
|
||||||
kubeDns:
|
|
||||||
enabled: false
|
|
||||||
kubeApiServer:
|
|
||||||
enabled: false
|
|
||||||
kubeProxy:
|
|
||||||
enabled: false
|
|
||||||
kubeStateMetrics:
|
|
||||||
enabled: true
|
|
||||||
nodeExporter:
|
|
||||||
enabled: true
|
|
||||||
grafana:
|
grafana:
|
||||||
enabled: false
|
# secret grafana should be created manually
|
||||||
# because of https://github.com/helm/helm/issues/4490
|
# it should contain:
|
||||||
kubeStateMetrics:
|
# admin-user
|
||||||
enabled: true
|
# admin-password
|
||||||
nodeExporter:
|
# GF_AUTH_GITHUB_CLIENT_SECRET
|
||||||
enabled: true
|
admin:
|
||||||
grafana:
|
existingSecret: grafana
|
||||||
enabled: false
|
envFromSecret: grafana
|
||||||
|
additionalDataSources:
|
||||||
|
- name: loki
|
||||||
|
type: loki
|
||||||
|
access: proxy
|
||||||
|
url: http://loki.logging:3100
|
||||||
|
version: 1
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: nginx
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
hosts:
|
||||||
|
- grafana.gorilych.ru
|
||||||
|
tls:
|
||||||
|
- secretName: grafana-ingress-tls
|
||||||
|
hosts:
|
||||||
|
- grafana.gorilych.ru
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
storageClassName: local-path
|
||||||
|
grafana.ini:
|
||||||
|
server:
|
||||||
|
root_url: https://grafana.gorilych.ru
|
||||||
|
auth.github:
|
||||||
|
enabled: true
|
||||||
|
allow_sign_up: false
|
||||||
|
client_id: 6494b9ed39a915d9ac20
|
||||||
|
# client_secret: in grafana secret
|
||||||
|
scopes: user:email,read:org
|
||||||
|
auth_url: https://github.com/login/oauth/authorize
|
||||||
|
token_url: https://github.com/login/oauth/access_token
|
||||||
|
api_url: https://api.github.com/user
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,19 +0,0 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: grafana
|
|
||||||
namespace: argocd
|
|
||||||
spec:
|
|
||||||
destination:
|
|
||||||
namespace: grafana
|
|
||||||
server: https://kubernetes.default.svc
|
|
||||||
project: default
|
|
||||||
source:
|
|
||||||
path: apps/system/grafana
|
|
||||||
repoURL: git@github.com:amkartashov/gf-k8s
|
|
||||||
syncPolicy:
|
|
||||||
syncOptions:
|
|
||||||
- CreateNamespace=true
|
|
||||||
automated:
|
|
||||||
prune: true
|
|
||||||
selfHeal: true
|
|
||||||
Loading…
Reference in a new issue