about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cd/monitoring.yaml19
-rw-r--r--cd/tools.yaml28
-rw-r--r--tools/grafana/Chart.yaml10
-rw-r--r--tools/grafana/elasticsearch/Chart.yaml0
-rw-r--r--tools/grafana/elasticsearch/values.yaml0
-rw-r--r--tools/grafana/values.yaml20
-rw-r--r--tools/monitoring/Chart.yaml23
-rw-r--r--tools/monitoring/templates/pvc.yaml32
-rw-r--r--tools/monitoring/values.yaml111
-rw-r--r--tools/prometheus/Chart.yaml0
-rw-r--r--tools/prometheus/values.yaml0
11 files changed, 58 insertions, 185 deletions
diff --git a/cd/monitoring.yaml b/cd/monitoring.yaml
deleted file mode 100644
index bac0f5a..0000000
--- a/cd/monitoring.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-apiVersion: argoproj.io/v1alpha1
-kind: Application
-metadata:
-  name: monitoring
-  namespace: default
-spec:
-  project: default
-  source:
-    repoURL: 'https://github.com/makefunstuff/k3s-lab'
-    targetRevision: HEAD
-    path: tools/monitoring
-  destination:
-    server: 'https://kubernetes.default.svc'
-    namespace: default
-  syncPolicy:
-    automated:
-      prune: true
-      selfHeal: true
-
diff --git a/cd/tools.yaml b/cd/tools.yaml
new file mode 100644
index 0000000..a2cfc89
--- /dev/null
+++ b/cd/tools.yaml
@@ -0,0 +1,28 @@
+apiVersion: argoproj.io/v1alpha1
+kind: ApplicationSet
+metadata:
+  name: monitoring-applicationset
+  namespace: argocd
+spec:
+  generators:
+  - list:
+      elements:
+      - chart: grafana
+        path: tools/grafana
+  template:
+    metadata:
+      name: '{{chart}}'
+    spec:
+      project: default
+      source:
+        repoURL: 'https://github.com/makefunstuff/k3s-lab'
+        targetRevision: HEAD
+        path: '{{path}}'
+      destination:
+        server: 'https://kubernetes.default.svc'
+        namespace: monitoring
+      syncPolicy:
+        automated:
+          prune: true
+          selfHeal: true
+
diff --git a/tools/grafana/Chart.yaml b/tools/grafana/Chart.yaml
new file mode 100644
index 0000000..e74e5b4
--- /dev/null
+++ b/tools/grafana/Chart.yaml
@@ -0,0 +1,10 @@
+apiVersion: v2
+name: grafana
+description: A Helm chart for setting up Grafana, Prometheus, Elasticsearch, and OpenTelemetry Collector
+version: 0.1.0
+appVersion: "1.0"
+
+dependencies:
+  - name: grafana
+    version: 8.2.0
+    repository: "https://grafana.github.io/helm-charts"
diff --git a/tools/grafana/elasticsearch/Chart.yaml b/tools/grafana/elasticsearch/Chart.yaml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/grafana/elasticsearch/Chart.yaml
diff --git a/tools/grafana/elasticsearch/values.yaml b/tools/grafana/elasticsearch/values.yaml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/grafana/elasticsearch/values.yaml
diff --git a/tools/grafana/values.yaml b/tools/grafana/values.yaml
new file mode 100644
index 0000000..0bacc9e
--- /dev/null
+++ b/tools/grafana/values.yaml
@@ -0,0 +1,20 @@
+global:
+  namespace: default
+
+grafana:
+  ingress:
+    enabled: true
+    annotations:
+      traefik.ingress.kubernetes.io/router.entrypoints: websecure
+      traefik.ingress.kubernetes.io/router.tls: "true"
+      traefik.ingress.kubernetes.io/router.tls.certresolver: "default"
+      traefik.ingress.kubernetes.io/redirect-entry-point: https
+      cert-manager.io/cluster-issuer: letsencrypt-prod
+    hosts:
+      - grafana.topkek.cloud
+    path: /
+    tls:
+      - hosts:
+          - grafana.topkek.cloud
+        secretName: grafana-tls
+
diff --git a/tools/monitoring/Chart.yaml b/tools/monitoring/Chart.yaml
deleted file mode 100644
index b64fceb..0000000
--- a/tools/monitoring/Chart.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-apiVersion: v2
-name: monitoring
-description: A Helm chart for setting up Grafana, Prometheus, Elasticsearch, and OpenTelemetry Collector
-version: 0.1.0
-appVersion: "1.0"
-
-dependencies:
-  - name: grafana
-    version: 8.2.0
-    repository: "https://grafana.github.io/helm-charts"
-  - name: prometheus
-    version: 25.22.0
-    repository: "https://prometheus-community.github.io/helm-charts"
-  - name: elasticsearch
-    version: 8.5.1
-    repository: "https://helm.elastic.co"
-  - name: opentelemetry-collector
-    version: 0.96.0
-    repository: "https://open-telemetry.github.io/opentelemetry-helm-charts"
-  - name: logstash
-    version: 8.5.1
-    repository: https://helm.elastic.co
-
diff --git a/tools/monitoring/templates/pvc.yaml b/tools/monitoring/templates/pvc.yaml
deleted file mode 100644
index ddf7aa7..0000000
--- a/tools/monitoring/templates/pvc.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: elasticsearch-master
-  labels:
-    app: elasticsearch
-    role: master
-spec:
-  accessModes:
-    - ReadWriteOnce
-  resources:
-    requests:
-      storage: 30Gi
-  storageClassName: standard 
-
----
-
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: elasticsearch-data
-  labels:
-    app: elasticsearch
-    role: data
-spec:
-  accessModes:
-    - ReadWriteOnce
-  resources:
-    requests:
-      storage: 30Gi
-  storageClassName: standard
-
diff --git a/tools/monitoring/values.yaml b/tools/monitoring/values.yaml
deleted file mode 100644
index 0ad09e3..0000000
--- a/tools/monitoring/values.yaml
+++ /dev/null
@@ -1,111 +0,0 @@
-global:
-  namespace: default
-
-grafana:
-  ingress:
-    enabled: true
-    annotations:
-      traefik.ingress.kubernetes.io/router.entrypoints: websecure
-      traefik.ingress.kubernetes.io/router.tls: "true"
-      traefik.ingress.kubernetes.io/router.tls.certresolver: "default"
-      traefik.ingress.kubernetes.io/redirect-entry-point: https
-      cert-manager.io/cluster-issuer: letsencrypt-prod
-    hosts:
-      - grafana.topkek.cloud
-    path: /
-    tls:
-      - hosts:
-          - grafana.topkek.cloud
-        secretName: grafana-tls
-
-  datasources:
-    datasources.yaml:
-      apiVersion: 1
-      datasources:
-        - name: Prometheus
-          type: prometheus
-          access: proxy
-          url: http://prometheus-server.default.svc.cluster.local
-          isDefault: true
-        - name: Elasticsearch
-          type: elasticsearch
-          access: proxy
-          url: http://elasticsearch-master.default.svc.cluster.local:9200
-          jsonData:
-            esVersion: 7
-            timeField: "@timestamp"
-
-prometheus:
-  alertmanager:
-    enabled: true
-  pushgateway:
-    enabled: true
-  server:
-    enabled: true
-
-elasticsearch:
-  volumeClaimTemplate:
-    accessModes: [ "ReadWriteOnce" ]
-    resources:
-      requests:
-        storage: 30Gi
-
-logstash:
-  enabled: true
-  volumeClaimTemplate:
-    accessModes: [ "ReadWriteOnce" ]
-    resources:
-      requests:
-        storage: 10Gi
-  logstashConfig:
-    logstash.yml: |
-      http.host: "0.0.0.0"
-      xpack.monitoring.elasticsearch.hosts: [ "http://elasticsearch-master:9200" ]
-  logstashPipeline:
-    logstash.conf: |
-      input {
-        tcp {
-          port => 5044
-          codec => json
-        }
-      }
-      output {
-        elasticsearch {
-          hosts => ["http://elasticsearch-master:9200"]
-          index => "logstash-%{+YYYY.MM.dd}"
-        }
-      }
-
-opentelemetry-collector:
-  mode: deployment
-  image:
-    repository: otel/opentelemetry-collector
-    tag: "latest"
-  config:
-    receivers:
-      otlp:
-        protocols:
-          grpc: {}
-          http: {}
-    processors:
-      batch: {}
-    exporters:
-      prometheusremotewrite:
-        endpoint: "http://prometheus-server.default.svc.cluster.local/api/v1/write"
-      logging:
-        loglevel: debug
-      otlp:
-        endpoint: "http://logstash.default.svc.cluster.local:5044"
-        tls:
-          insecure: true
-    service:
-      pipelines:
-        metrics:
-          receivers: [otlp]
-          processors: [batch]
-          exporters: [prometheusremotewrite]
-        logs:
-          receivers: [otlp]
-          processors: [batch]
-          exporters: [otlp]
-
diff --git a/tools/prometheus/Chart.yaml b/tools/prometheus/Chart.yaml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/prometheus/Chart.yaml
diff --git a/tools/prometheus/values.yaml b/tools/prometheus/values.yaml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/prometheus/values.yaml