From cabdc654485295e3aae8129bb727a78abf2a6eda Mon Sep 17 00:00:00 2001 From: Vegard Hagen Date: Sun, 7 Apr 2024 14:43:42 +0200 Subject: [PATCH] feat(lgtm): Adding LGTM Helm chart --- infra/lgtm/ingress-route.yaml | 18 +++++++++++++ infra/lgtm/kustomization.yaml | 17 ++++++++++++ infra/lgtm/ns.yaml | 4 +++ infra/lgtm/pv.yaml | 24 +++++++++++++++++ infra/lgtm/values.yaml | 51 +++++++++++++++++++++++++++++++++++ infra/project.yaml | 2 ++ 6 files changed, 116 insertions(+) create mode 100644 infra/lgtm/ingress-route.yaml create mode 100644 infra/lgtm/kustomization.yaml create mode 100644 infra/lgtm/ns.yaml create mode 100644 infra/lgtm/pv.yaml create mode 100644 infra/lgtm/values.yaml diff --git a/infra/lgtm/ingress-route.yaml b/infra/lgtm/ingress-route.yaml new file mode 100644 index 0000000..23ea7c2 --- /dev/null +++ b/infra/lgtm/ingress-route.yaml @@ -0,0 +1,18 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: grafana + namespace: lgtm + labels: + app: traefik +spec: + entryPoints: + - websecure + routes: + - match: Host(`lgtm.stonegarden.dev`) + kind: Rule + services: + - name: lgtm-grafana + port: 80 +# middlewares: +# - name: traefik-forward-auth \ No newline at end of file diff --git a/infra/lgtm/kustomization.yaml b/infra/lgtm/kustomization.yaml new file mode 100644 index 0000000..17575ec --- /dev/null +++ b/infra/lgtm/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: lgtm + +resources: + - ns.yaml + - pv.yaml + - ingress-route.yaml + +helmCharts: + - name: lgtm-distributed + repo: https://grafana.github.io/helm-charts + version: 1.0.1 + releaseName: lgtm + includeCRDs: true + namespace: lgtm + valuesFile: values.yaml \ No newline at end of file diff --git a/infra/lgtm/ns.yaml b/infra/lgtm/ns.yaml new file mode 100644 index 0000000..3e48744 --- /dev/null +++ b/infra/lgtm/ns.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: lgtm \ No newline at end of file diff --git a/infra/lgtm/pv.yaml b/infra/lgtm/pv.yaml new file mode 100644 index 0000000..2c2e71a --- /dev/null +++ b/infra/lgtm/pv.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: minio + labels: + app: minio +spec: + capacity: + storage: 10Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: minio + local: + path: /disk/etc/minio + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - gauss \ No newline at end of file diff --git a/infra/lgtm/values.yaml b/infra/lgtm/values.yaml new file mode 100644 index 0000000..ace625a --- /dev/null +++ b/infra/lgtm/values.yaml @@ -0,0 +1,51 @@ +grafana: + dashboardProviders: + dashboardproviders.yaml: + apiVersion: 1 + providers: + - name: 'default' + orgId: 1 + folder: '' + type: file + disableDeletion: false + editable: true + options: + path: /var/lib/grafana/dashboards/default + dashboards: + default: + node-exporter-full: + gnetId: 1860 + revision: 33 + datasource: Mimir + allowUpdates: true + postgresql: + gnetId: 9628 + revision: 7 + datasource: Mimir + allowUpdates: true + blackbox: + gnetId: 14928 + revision: 6 + datasource: Mimir + allowUpdates: true + +mimir: + alertmanager: + persistentVolume: + enabled: false + ingester: + persistentVolume: + enabled: false + store_gateway: + persistentVolume: + enabled: false + compactor: + persistentVolume: + enabled: false + chunks-cache: + persistentVolume: + enabled: false + minio: + persistence: + storageClass: minio + size: 10Gi diff --git a/infra/project.yaml b/infra/project.yaml index d88c165..b124284 100644 --- a/infra/project.yaml +++ b/infra/project.yaml @@ -26,6 +26,8 @@ spec: server: '*' - namespace: 'kubernetes-dashboard' server: '*' + - namespace: 'lgtm' + server: '*' - namespace: 'monitoring' server: '*' - namespace: 'nvidia-device-plugin'