mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-11 09:59:43 +00:00
monitoring: join grafana and prometheus-operator into monitoring app
This commit is contained in:
parent
73eaafbf70
commit
a31057b147
19 changed files with 111 additions and 150 deletions
|
|
@ -1 +0,0 @@
|
||||||
name: grafana
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
dependencies:
|
|
||||||
- name: grafana
|
|
||||||
version: 4.0.3
|
|
||||||
repository: '@stable'
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
grafana:
|
|
||||||
# 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
|
|
||||||
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
|
|
||||||
datasources:
|
|
||||||
datasources.yaml:
|
|
||||||
apiVersion: 1
|
|
||||||
datasources:
|
|
||||||
- name: Prometheus
|
|
||||||
type: prometheus
|
|
||||||
access: proxy
|
|
||||||
url: http://prometheus-operated.monitoring:9090
|
|
||||||
isDefault: true
|
|
||||||
editable: false
|
|
||||||
1
apps/system/monitoring/Chart.yaml
Normal file
1
apps/system/monitoring/Chart.yaml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
name: monitoring
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
apiVersion: monitoring.coreos.com/v1
|
|
||||||
kind: Prometheus
|
|
||||||
metadata:
|
|
||||||
name: prometheus
|
|
||||||
spec:
|
|
||||||
version: v2.14.0
|
|
||||||
replicas: 1
|
|
||||||
securityContext:
|
|
||||||
runAsUser: 1000
|
|
||||||
walCompression: true
|
|
||||||
storage:
|
|
||||||
volumeClaimTemplate:
|
|
||||||
spec:
|
|
||||||
volumeName: prometheus
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: nginx-ingress
|
||||||
|
spec:
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- nginx-ingress
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx-ingress
|
||||||
|
component: controller
|
||||||
|
endpoints:
|
||||||
|
- port: metrics
|
||||||
|
interval: 30s
|
||||||
95
apps/system/monitoring/values.yaml
Normal file
95
apps/system/monitoring/values.yaml
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
prometheus-operator:
|
||||||
|
prometheus:
|
||||||
|
enabled: true
|
||||||
|
prometheusSpec:
|
||||||
|
version: v2.14.0
|
||||||
|
replicas: 1
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
walCompression: true
|
||||||
|
serviceMonitorSelector:
|
||||||
|
any: true
|
||||||
|
serviceMonitorNamespaceSelector:
|
||||||
|
any: true
|
||||||
|
storage:
|
||||||
|
volumeClaimTemplate:
|
||||||
|
spec:
|
||||||
|
volumeName: prometheus
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
grafana:
|
||||||
|
enabled: true
|
||||||
|
# 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
|
||||||
|
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
|
||||||
|
datasources:
|
||||||
|
datasources.yaml:
|
||||||
|
apiVersion: 1
|
||||||
|
datasources:
|
||||||
|
- name: Prometheus
|
||||||
|
type: prometheus
|
||||||
|
access: proxy
|
||||||
|
url: http://prometheus-operated:9090
|
||||||
|
isDefault: true
|
||||||
|
editable: false
|
||||||
|
alertmanager:
|
||||||
|
enabled: false
|
||||||
|
defaultRules:
|
||||||
|
create: false
|
||||||
|
kubeControllerManager:
|
||||||
|
enabled: false
|
||||||
|
kubeScheduler:
|
||||||
|
enabled: false
|
||||||
|
kubeEtcd:
|
||||||
|
enabled: false
|
||||||
|
coreDns:
|
||||||
|
enabled: false
|
||||||
|
kubeDns:
|
||||||
|
enabled: false
|
||||||
|
kubeApiServer:
|
||||||
|
enabled: false
|
||||||
|
kubeProxy:
|
||||||
|
enabled: false
|
||||||
|
kubeStateMetrics:
|
||||||
|
enabled: false
|
||||||
|
nodeExporter:
|
||||||
|
enabled: false
|
||||||
|
# because of https://github.com/helm/helm/issues/4490
|
||||||
|
kubeStateMetrics:
|
||||||
|
enabled: false
|
||||||
|
nodeExporter:
|
||||||
|
enabled: false
|
||||||
|
grafana:
|
||||||
|
enabled: true
|
||||||
2
apps/system/prometheus-operator/.gitignore
vendored
2
apps/system/prometheus-operator/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
requirements.lock
|
|
||||||
charts/
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
name: prometheus-operator
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
prometheus-operator:
|
|
||||||
prometheus:
|
|
||||||
enabled: false
|
|
||||||
alertmanager:
|
|
||||||
enabled: false
|
|
||||||
grafana:
|
|
||||||
enabled: false
|
|
||||||
defaultRules:
|
|
||||||
create: false
|
|
||||||
kubeControllerManager:
|
|
||||||
enabled: false
|
|
||||||
kubeScheduler:
|
|
||||||
enabled: false
|
|
||||||
kubeEtcd:
|
|
||||||
enabled: false
|
|
||||||
coreDns:
|
|
||||||
enabled: false
|
|
||||||
kubeDns:
|
|
||||||
enabled: false
|
|
||||||
kubeApiServer:
|
|
||||||
enabled: false
|
|
||||||
kubeProxy:
|
|
||||||
enabled: false
|
|
||||||
kubeStateMetrics:
|
|
||||||
enabled: false
|
|
||||||
nodeExporter:
|
|
||||||
enabled: false
|
|
||||||
# because of https://github.com/helm/helm/issues/4490
|
|
||||||
kubeStateMetrics:
|
|
||||||
enabled: false
|
|
||||||
nodeExporter:
|
|
||||||
enabled: false
|
|
||||||
grafana:
|
|
||||||
enabled: false
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: grafana
|
|
||||||
namespace: argocd
|
|
||||||
finalizers:
|
|
||||||
- resources-finalizer.argocd.argoproj.io
|
|
||||||
spec:
|
|
||||||
destination:
|
|
||||||
namespace: grafana
|
|
||||||
server: https://kubernetes.default.svc
|
|
||||||
project: default
|
|
||||||
source:
|
|
||||||
path: apps/system/grafana
|
|
||||||
repoURL: git@github.com:gorilych/gf-k8s
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
prune: true
|
|
||||||
selfHeal: true
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: prometheus-operator
|
|
||||||
namespace: argocd
|
|
||||||
finalizers:
|
|
||||||
- resources-finalizer.argocd.argoproj.io
|
|
||||||
spec:
|
|
||||||
destination:
|
|
||||||
namespace: prometheus-operator
|
|
||||||
server: https://kubernetes.default.svc
|
|
||||||
project: default
|
|
||||||
source:
|
|
||||||
path: apps/system/prometheus-operator
|
|
||||||
repoURL: git@github.com:gorilych/gf-k8s
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
prune: true
|
|
||||||
selfHeal: true
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: grafana
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: prometheus-operator
|
|
||||||
Loading…
Reference in a new issue