From 28ba50d1a3c9c4007680f48024ae59c8da7b58f4 Mon Sep 17 00:00:00 2001 From: Mayne0213 Date: Sun, 4 Jan 2026 20:02:00 +0900 Subject: [PATCH] REFACTOR(repo): observability repo structure - Add application.yaml for ArgoCD app-of-apps - Add kustomization.yaml with observability components - Add renovate.json for automated updates - Update all component argocd.yaml repoURLs to observability repo Components: prometheus, alertmanager, grafana, loki, promtail, node-exporter, kube-state-metrics, goldilocks, uptime-kuma, vpa --- alertmanager/argocd.yaml | 4 ++-- application.yaml | 33 +++++++++++++++++++++++++++++++++ goldilocks/argocd.yaml | 4 ++-- grafana/argocd.yaml | 4 ++-- kube-state-metrics/argocd.yaml | 2 +- kustomization.yaml | 15 +++++++++++++++ loki/argocd.yaml | 4 ++-- node-exporter/argocd.yaml | 2 +- prometheus/argocd.yaml | 4 ++-- promtail/argocd.yaml | 4 ++-- renovate.json | 26 ++++++++++++++++++++++++++ uptime-kuma/argocd.yaml | 4 ++-- vpa/argocd.yaml | 2 +- 13 files changed, 91 insertions(+), 17 deletions(-) create mode 100644 application.yaml create mode 100644 kustomization.yaml create mode 100644 renovate.json diff --git a/alertmanager/argocd.yaml b/alertmanager/argocd.yaml index be384b9..a7a5d8a 100644 --- a/alertmanager/argocd.yaml +++ b/alertmanager/argocd.yaml @@ -14,10 +14,10 @@ spec: helm: valueFiles: - $values/alertmanager/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main ref: values - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main path: alertmanager kustomize: {} diff --git a/application.yaml b/application.yaml new file mode 100644 index 0000000..6cbc087 --- /dev/null +++ b/application.yaml @@ -0,0 +1,33 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: observability + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + + source: + repoURL: https://github.com/K3S-HOME/observability.git + targetRevision: main + path: . + + destination: + server: https://kubernetes.default.svc + namespace: argocd + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + retry: + limit: 5 + backoff: + duration: 5s + factor: 2 + maxDuration: 3m + + revisionHistoryLimit: 10 diff --git a/goldilocks/argocd.yaml b/goldilocks/argocd.yaml index 98984d4..9f160e8 100644 --- a/goldilocks/argocd.yaml +++ b/goldilocks/argocd.yaml @@ -14,10 +14,10 @@ spec: helm: valueFiles: - $values/goldilocks/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main ref: values - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main path: goldilocks destination: diff --git a/grafana/argocd.yaml b/grafana/argocd.yaml index 31a9659..cdc6451 100644 --- a/grafana/argocd.yaml +++ b/grafana/argocd.yaml @@ -14,10 +14,10 @@ spec: helm: valueFiles: - $values/grafana/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main ref: values - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main path: grafana destination: diff --git a/kube-state-metrics/argocd.yaml b/kube-state-metrics/argocd.yaml index f114215..34350be 100644 --- a/kube-state-metrics/argocd.yaml +++ b/kube-state-metrics/argocd.yaml @@ -14,7 +14,7 @@ spec: helm: valueFiles: - $values/kube-state-metrics/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main ref: values destination: diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..4935bd7 --- /dev/null +++ b/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - application.yaml + - prometheus/argocd.yaml + - alertmanager/argocd.yaml + - grafana/argocd.yaml + - loki/argocd.yaml + - promtail/argocd.yaml + - node-exporter/argocd.yaml + - kube-state-metrics/argocd.yaml + - goldilocks/argocd.yaml + - uptime-kuma/argocd.yaml + - vpa/argocd.yaml diff --git a/loki/argocd.yaml b/loki/argocd.yaml index 4c768b5..2fa5e77 100644 --- a/loki/argocd.yaml +++ b/loki/argocd.yaml @@ -12,8 +12,8 @@ spec: helm: valueFiles: - $values/loki/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git - targetRevision: HEAD + - repoURL: https://github.com/K3S-HOME/observability.git + targetRevision: main ref: values destination: server: https://kubernetes.default.svc diff --git a/node-exporter/argocd.yaml b/node-exporter/argocd.yaml index 4a21f41..8a149ed 100644 --- a/node-exporter/argocd.yaml +++ b/node-exporter/argocd.yaml @@ -14,7 +14,7 @@ spec: helm: valueFiles: - $values/node-exporter/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main ref: values destination: diff --git a/prometheus/argocd.yaml b/prometheus/argocd.yaml index 1570436..d98e0f2 100644 --- a/prometheus/argocd.yaml +++ b/prometheus/argocd.yaml @@ -14,10 +14,10 @@ spec: helm: valueFiles: - $values/prometheus/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main ref: values - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main path: prometheus destination: diff --git a/promtail/argocd.yaml b/promtail/argocd.yaml index 2d5f2d6..74c61c7 100644 --- a/promtail/argocd.yaml +++ b/promtail/argocd.yaml @@ -12,8 +12,8 @@ spec: helm: valueFiles: - $values/promtail/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git - targetRevision: HEAD + - repoURL: https://github.com/K3S-HOME/observability.git + targetRevision: main ref: values destination: server: https://kubernetes.default.svc diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..da70c9a --- /dev/null +++ b/renovate.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "customManagers": [ + { + "customType": "regex", + "managerFilePatterns": ["argocd\\.yaml$"], + "matchStrings": [ + "repoURL:\\s*(?ghcr\\.io/[^\\s]+)\\n\\s+chart:\\s*(?[^\\s]+)\\n\\s+targetRevision:\\s*(?[^\\s]+)" + ], + "datasourceTemplate": "helm", + "registryUrlTemplate": "oci://{{registryUrl}}" + } + ], + "kubernetes": { + "fileMatch": ["\\.yaml$"] + }, + "helmv3": { + "fileMatch": ["helm-values\\.yaml$"] + }, + "argocd": { + "fileMatch": ["argocd\\.yaml$"] + } +} diff --git a/uptime-kuma/argocd.yaml b/uptime-kuma/argocd.yaml index 4fafb16..9e1d5c4 100644 --- a/uptime-kuma/argocd.yaml +++ b/uptime-kuma/argocd.yaml @@ -14,10 +14,10 @@ spec: helm: valueFiles: - $values/uptime-kuma/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main ref: values - - repoURL: https://github.com/K3S-HOME/monitoring.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main path: uptime-kuma destination: diff --git a/vpa/argocd.yaml b/vpa/argocd.yaml index 18ea493..a05ab64 100644 --- a/vpa/argocd.yaml +++ b/vpa/argocd.yaml @@ -14,7 +14,7 @@ spec: helm: valueFiles: - $values/vpa/helm-values.yaml - - repoURL: https://github.com/K3S-HOME/cluster-infrastructure.git + - repoURL: https://github.com/K3S-HOME/observability.git targetRevision: main ref: values destination: