diff --git a/apps/system/grafana/.gitignore b/apps/system/grafana/.gitignore new file mode 100644 index 0000000..719aed9 --- /dev/null +++ b/apps/system/grafana/.gitignore @@ -0,0 +1,2 @@ +requirements.lock +charts/ diff --git a/apps/system/grafana/Chart.yaml b/apps/system/grafana/Chart.yaml new file mode 100644 index 0000000..c9084ec --- /dev/null +++ b/apps/system/grafana/Chart.yaml @@ -0,0 +1 @@ +name: grafana diff --git a/apps/system/grafana/requirements.yaml b/apps/system/grafana/requirements.yaml new file mode 100644 index 0000000..60f6d02 --- /dev/null +++ b/apps/system/grafana/requirements.yaml @@ -0,0 +1,4 @@ +dependencies: +- name: grafana + version: 4.0.3 + repository: '@stable' diff --git a/apps/system/grafana/values.yaml b/apps/system/grafana/values.yaml new file mode 100644 index 0000000..7edec2b --- /dev/null +++ b/apps/system/grafana/values.yaml @@ -0,0 +1,31 @@ +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: + certmanager.k8s.io/cluster-issuer: letsencrypt + hosts: + - grafana.gorilych.ru + tls: + - hosts: + - grafana.gorilych.ru + secretName: grafana-tls + 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 diff --git a/main/templates/grafana.yaml b/main/templates/grafana.yaml new file mode 100644 index 0000000..02434e6 --- /dev/null +++ b/main/templates/grafana.yaml @@ -0,0 +1,19 @@ +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 diff --git a/main/templates/namespace-grafana.yaml b/main/templates/namespace-grafana.yaml new file mode 100644 index 0000000..201d7d3 --- /dev/null +++ b/main/templates/namespace-grafana.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: grafana