grafana: move out of logging ns

This commit is contained in:
Andrey Kartashov 2020-06-20 19:35:32 +07:00
parent 4b39c6efd9
commit 2148bfd8da
10 changed files with 99 additions and 63 deletions

2
apps/system/grafana/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
requirements.lock
charts/

View file

@ -0,0 +1,2 @@
name: grafana
version: 0.1

View file

@ -0,0 +1,4 @@
dependencies:
- name: grafana
version: '5.2.1'
repository: '@stable'

View file

@ -0,0 +1,69 @@
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
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

View file

@ -29,68 +29,6 @@ prometheus-operator:
resources:
requests:
storage: 10Gi
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
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
alertmanager:
enabled: false
defaultRules:
@ -121,4 +59,4 @@ kubeStateMetrics:
nodeExporter:
enabled: false
grafana:
enabled: true
enabled: false

17
main/apps/grafana.yaml Normal file
View file

@ -0,0 +1,17 @@
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:gorilych/gf-k8s
syncPolicy:
automated:
prune: true
selfHeal: true

View file

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: grafana