From 5490abf355a899485e620fdc34b412e2f01aeec2 Mon Sep 17 00:00:00 2001 From: Jonathan Leech-Pepin Date: Fri, 25 Apr 2025 16:56:33 -0400 Subject: [PATCH] Add Gatus for monitoring and subfolder kustomization bases --- kustomize/{ => bases}/backups/batch.yaml | 0 .../{ => bases}/backups/kustomization.yaml | 0 .../{ => bases}/deployment/deployment.yaml | 0 .../deployment/httproute-http.yaml | 0 .../deployment/httproute-https.yaml | 0 .../{ => bases}/deployment/kustomization.yaml | 0 kustomize/{ => bases}/deployment/pvc.yaml | 0 kustomize/{ => bases}/deployment/secret.yaml | 0 kustomize/{ => bases}/deployment/service.yaml | 0 .../{ => bases}/deployservice/deployment.yaml | 0 .../deployservice/kustomization.yaml | 0 .../{ => bases}/deployservice/service.yaml | 0 .../helmchart-noaddons/helmchart.yaml | 0 .../helmchart-noaddons/kustomization.yaml | 0 .../{ => bases}/helmchart/helmchart.yaml | 0 .../{ => bases}/helmchart/httproute-http.yaml | 0 .../helmchart/httproute-https.yaml | 0 .../{ => bases}/helmchart/kustomization.yaml | 0 kustomize/{ => bases}/helmchart/secret.yaml | 0 .../{ => bases}/noservice/deployment.yaml | 0 .../{ => bases}/noservice/kustomization.yaml | 0 kustomize/{ => bases}/noservice/pvc.yaml | 0 kustomize/{ => bases}/noservice/secret.yaml | 0 .../public-oidc/kustomization.yaml | 0 .../public-oidc/patches/httproute-http.yaml | 0 .../statefulset/httproute-http.yaml | 0 .../statefulset/httproute-https.yaml | 0 .../statefulset/kustomization.yaml | 0 kustomize/{ => bases}/statefulset/secret.yaml | 0 .../{ => bases}/statefulset/service.yaml | 0 .../{ => bases}/statefulset/statefulset.yaml | 0 namespaces/ai/ollama/kustomization.yaml | 2 +- namespaces/ai/openwebui/kustomization.yaml | 2 +- namespaces/ai/tabby/kustomization.yaml | 2 +- namespaces/apps/atuin/kustomization.yaml | 2 +- namespaces/apps/dolibarr/kustomization.yaml | 2 +- namespaces/apps/forgejo/kustomization.yaml | 2 +- namespaces/apps/linkwarden/kustomization.yaml | 2 +- namespaces/apps/mealie/kustomization.yaml | 2 +- namespaces/apps/paperless/kustomization.yaml | 2 +- namespaces/apps/syncthing/kustomization.yaml | 2 +- .../apps/vaultwarden/kustomization.yaml | 2 +- namespaces/auth/authentik/kustomization.yaml | 2 +- .../cert-manager/kustomization.yaml | 2 +- namespaces/core/gotenburg/kustomization.yaml | 2 +- namespaces/core/minio/kustomization.yaml | 2 +- namespaces/core/pgdump/kustomization.yaml | 2 +- namespaces/core/postgres/kustomization.yaml | 2 +- namespaces/core/redis/kustomization.yaml | 2 +- namespaces/core/tika/kustomization.yaml | 2 +- .../infisical/infisical/kustomization.yaml | 2 +- .../longhorn/longhorn/kustomization.yaml | 2 +- namespaces/monitoring/diun/kustomization.yaml | 2 +- namespaces/monitoring/gatus/base-config.yaml | 24 +++ .../gatus/extras/sidecar-clusterRole.yaml | 8 + .../monitoring/gatus/extras/sidecar-crb.yaml | 12 ++ .../gatus/extras/sidecar-serviceAccount.yaml | 4 + .../monitoring/gatus/kustomization.yaml | 149 ++++++++++++++++++ .../monitoring/gatus/patches/deployment.yaml | 75 +++++++++ namespaces/monitoring/gatus/patches/pvc.yaml | 5 + .../healthchecks/kustomization.yaml | 2 +- namespaces/monitoring/ntfy/kustomization.yaml | 2 +- .../monitoring/umami/kustomization.yaml | 2 +- .../monitoring/uptime-kuma/kustomization.yaml | 2 +- namespaces/traefik/traefik/kustomization.yaml | 2 +- 65 files changed, 304 insertions(+), 27 deletions(-) rename kustomize/{ => bases}/backups/batch.yaml (100%) rename kustomize/{ => bases}/backups/kustomization.yaml (100%) rename kustomize/{ => bases}/deployment/deployment.yaml (100%) rename kustomize/{ => bases}/deployment/httproute-http.yaml (100%) rename kustomize/{ => bases}/deployment/httproute-https.yaml (100%) rename kustomize/{ => bases}/deployment/kustomization.yaml (100%) rename kustomize/{ => bases}/deployment/pvc.yaml (100%) rename kustomize/{ => bases}/deployment/secret.yaml (100%) rename kustomize/{ => bases}/deployment/service.yaml (100%) rename kustomize/{ => bases}/deployservice/deployment.yaml (100%) rename kustomize/{ => bases}/deployservice/kustomization.yaml (100%) rename kustomize/{ => bases}/deployservice/service.yaml (100%) rename kustomize/{ => bases}/helmchart-noaddons/helmchart.yaml (100%) rename kustomize/{ => bases}/helmchart-noaddons/kustomization.yaml (100%) rename kustomize/{ => bases}/helmchart/helmchart.yaml (100%) rename kustomize/{ => bases}/helmchart/httproute-http.yaml (100%) rename kustomize/{ => bases}/helmchart/httproute-https.yaml (100%) rename kustomize/{ => bases}/helmchart/kustomization.yaml (100%) rename kustomize/{ => bases}/helmchart/secret.yaml (100%) rename kustomize/{ => bases}/noservice/deployment.yaml (100%) rename kustomize/{ => bases}/noservice/kustomization.yaml (100%) rename kustomize/{ => bases}/noservice/pvc.yaml (100%) rename kustomize/{ => bases}/noservice/secret.yaml (100%) rename kustomize/{ => bases}/public-oidc/kustomization.yaml (100%) rename kustomize/{ => bases}/public-oidc/patches/httproute-http.yaml (100%) rename kustomize/{ => bases}/statefulset/httproute-http.yaml (100%) rename kustomize/{ => bases}/statefulset/httproute-https.yaml (100%) rename kustomize/{ => bases}/statefulset/kustomization.yaml (100%) rename kustomize/{ => bases}/statefulset/secret.yaml (100%) rename kustomize/{ => bases}/statefulset/service.yaml (100%) rename kustomize/{ => bases}/statefulset/statefulset.yaml (100%) create mode 100644 namespaces/monitoring/gatus/base-config.yaml create mode 100644 namespaces/monitoring/gatus/extras/sidecar-clusterRole.yaml create mode 100644 namespaces/monitoring/gatus/extras/sidecar-crb.yaml create mode 100644 namespaces/monitoring/gatus/extras/sidecar-serviceAccount.yaml create mode 100644 namespaces/monitoring/gatus/kustomization.yaml create mode 100644 namespaces/monitoring/gatus/patches/deployment.yaml create mode 100644 namespaces/monitoring/gatus/patches/pvc.yaml diff --git a/kustomize/backups/batch.yaml b/kustomize/bases/backups/batch.yaml similarity index 100% rename from kustomize/backups/batch.yaml rename to kustomize/bases/backups/batch.yaml diff --git a/kustomize/backups/kustomization.yaml b/kustomize/bases/backups/kustomization.yaml similarity index 100% rename from kustomize/backups/kustomization.yaml rename to kustomize/bases/backups/kustomization.yaml diff --git a/kustomize/deployment/deployment.yaml b/kustomize/bases/deployment/deployment.yaml similarity index 100% rename from kustomize/deployment/deployment.yaml rename to kustomize/bases/deployment/deployment.yaml diff --git a/kustomize/deployment/httproute-http.yaml b/kustomize/bases/deployment/httproute-http.yaml similarity index 100% rename from kustomize/deployment/httproute-http.yaml rename to kustomize/bases/deployment/httproute-http.yaml diff --git a/kustomize/deployment/httproute-https.yaml b/kustomize/bases/deployment/httproute-https.yaml similarity index 100% rename from kustomize/deployment/httproute-https.yaml rename to kustomize/bases/deployment/httproute-https.yaml diff --git a/kustomize/deployment/kustomization.yaml b/kustomize/bases/deployment/kustomization.yaml similarity index 100% rename from kustomize/deployment/kustomization.yaml rename to kustomize/bases/deployment/kustomization.yaml diff --git a/kustomize/deployment/pvc.yaml b/kustomize/bases/deployment/pvc.yaml similarity index 100% rename from kustomize/deployment/pvc.yaml rename to kustomize/bases/deployment/pvc.yaml diff --git a/kustomize/deployment/secret.yaml b/kustomize/bases/deployment/secret.yaml similarity index 100% rename from kustomize/deployment/secret.yaml rename to kustomize/bases/deployment/secret.yaml diff --git a/kustomize/deployment/service.yaml b/kustomize/bases/deployment/service.yaml similarity index 100% rename from kustomize/deployment/service.yaml rename to kustomize/bases/deployment/service.yaml diff --git a/kustomize/deployservice/deployment.yaml b/kustomize/bases/deployservice/deployment.yaml similarity index 100% rename from kustomize/deployservice/deployment.yaml rename to kustomize/bases/deployservice/deployment.yaml diff --git a/kustomize/deployservice/kustomization.yaml b/kustomize/bases/deployservice/kustomization.yaml similarity index 100% rename from kustomize/deployservice/kustomization.yaml rename to kustomize/bases/deployservice/kustomization.yaml diff --git a/kustomize/deployservice/service.yaml b/kustomize/bases/deployservice/service.yaml similarity index 100% rename from kustomize/deployservice/service.yaml rename to kustomize/bases/deployservice/service.yaml diff --git a/kustomize/helmchart-noaddons/helmchart.yaml b/kustomize/bases/helmchart-noaddons/helmchart.yaml similarity index 100% rename from kustomize/helmchart-noaddons/helmchart.yaml rename to kustomize/bases/helmchart-noaddons/helmchart.yaml diff --git a/kustomize/helmchart-noaddons/kustomization.yaml b/kustomize/bases/helmchart-noaddons/kustomization.yaml similarity index 100% rename from kustomize/helmchart-noaddons/kustomization.yaml rename to kustomize/bases/helmchart-noaddons/kustomization.yaml diff --git a/kustomize/helmchart/helmchart.yaml b/kustomize/bases/helmchart/helmchart.yaml similarity index 100% rename from kustomize/helmchart/helmchart.yaml rename to kustomize/bases/helmchart/helmchart.yaml diff --git a/kustomize/helmchart/httproute-http.yaml b/kustomize/bases/helmchart/httproute-http.yaml similarity index 100% rename from kustomize/helmchart/httproute-http.yaml rename to kustomize/bases/helmchart/httproute-http.yaml diff --git a/kustomize/helmchart/httproute-https.yaml b/kustomize/bases/helmchart/httproute-https.yaml similarity index 100% rename from kustomize/helmchart/httproute-https.yaml rename to kustomize/bases/helmchart/httproute-https.yaml diff --git a/kustomize/helmchart/kustomization.yaml b/kustomize/bases/helmchart/kustomization.yaml similarity index 100% rename from kustomize/helmchart/kustomization.yaml rename to kustomize/bases/helmchart/kustomization.yaml diff --git a/kustomize/helmchart/secret.yaml b/kustomize/bases/helmchart/secret.yaml similarity index 100% rename from kustomize/helmchart/secret.yaml rename to kustomize/bases/helmchart/secret.yaml diff --git a/kustomize/noservice/deployment.yaml b/kustomize/bases/noservice/deployment.yaml similarity index 100% rename from kustomize/noservice/deployment.yaml rename to kustomize/bases/noservice/deployment.yaml diff --git a/kustomize/noservice/kustomization.yaml b/kustomize/bases/noservice/kustomization.yaml similarity index 100% rename from kustomize/noservice/kustomization.yaml rename to kustomize/bases/noservice/kustomization.yaml diff --git a/kustomize/noservice/pvc.yaml b/kustomize/bases/noservice/pvc.yaml similarity index 100% rename from kustomize/noservice/pvc.yaml rename to kustomize/bases/noservice/pvc.yaml diff --git a/kustomize/noservice/secret.yaml b/kustomize/bases/noservice/secret.yaml similarity index 100% rename from kustomize/noservice/secret.yaml rename to kustomize/bases/noservice/secret.yaml diff --git a/kustomize/public-oidc/kustomization.yaml b/kustomize/bases/public-oidc/kustomization.yaml similarity index 100% rename from kustomize/public-oidc/kustomization.yaml rename to kustomize/bases/public-oidc/kustomization.yaml diff --git a/kustomize/public-oidc/patches/httproute-http.yaml b/kustomize/bases/public-oidc/patches/httproute-http.yaml similarity index 100% rename from kustomize/public-oidc/patches/httproute-http.yaml rename to kustomize/bases/public-oidc/patches/httproute-http.yaml diff --git a/kustomize/statefulset/httproute-http.yaml b/kustomize/bases/statefulset/httproute-http.yaml similarity index 100% rename from kustomize/statefulset/httproute-http.yaml rename to kustomize/bases/statefulset/httproute-http.yaml diff --git a/kustomize/statefulset/httproute-https.yaml b/kustomize/bases/statefulset/httproute-https.yaml similarity index 100% rename from kustomize/statefulset/httproute-https.yaml rename to kustomize/bases/statefulset/httproute-https.yaml diff --git a/kustomize/statefulset/kustomization.yaml b/kustomize/bases/statefulset/kustomization.yaml similarity index 100% rename from kustomize/statefulset/kustomization.yaml rename to kustomize/bases/statefulset/kustomization.yaml diff --git a/kustomize/statefulset/secret.yaml b/kustomize/bases/statefulset/secret.yaml similarity index 100% rename from kustomize/statefulset/secret.yaml rename to kustomize/bases/statefulset/secret.yaml diff --git a/kustomize/statefulset/service.yaml b/kustomize/bases/statefulset/service.yaml similarity index 100% rename from kustomize/statefulset/service.yaml rename to kustomize/bases/statefulset/service.yaml diff --git a/kustomize/statefulset/statefulset.yaml b/kustomize/bases/statefulset/statefulset.yaml similarity index 100% rename from kustomize/statefulset/statefulset.yaml rename to kustomize/bases/statefulset/statefulset.yaml diff --git a/namespaces/ai/ollama/kustomization.yaml b/namespaces/ai/ollama/kustomization.yaml index 2abf44f..eea1d82 100644 --- a/namespaces/ai/ollama/kustomization.yaml +++ b/namespaces/ai/ollama/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: ollama- resources: - - ../../../kustomize/deployment/ + - ../../../kustomize/bases/deployment/ replacements: - source: diff --git a/namespaces/ai/openwebui/kustomization.yaml b/namespaces/ai/openwebui/kustomization.yaml index 25b5a94..3b770a1 100644 --- a/namespaces/ai/openwebui/kustomization.yaml +++ b/namespaces/ai/openwebui/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: open-webui- resources: - - ../../../kustomize/helmchart/ + - ../../../kustomize/bases/helmchart/ patches: - path: patches/chart.yaml diff --git a/namespaces/ai/tabby/kustomization.yaml b/namespaces/ai/tabby/kustomization.yaml index 4ba18c3..e13595b 100644 --- a/namespaces/ai/tabby/kustomization.yaml +++ b/namespaces/ai/tabby/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: tabby- resources: - - ../../../kustomize/deployment/ + - ../../../kustomize/bases/deployment/ replacements: - source: diff --git a/namespaces/apps/atuin/kustomization.yaml b/namespaces/apps/atuin/kustomization.yaml index fc354f9..23c6e3c 100644 --- a/namespaces/apps/atuin/kustomization.yaml +++ b/namespaces/apps/atuin/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: atuin- resources: - - ../../../kustomize/deployment/ + - ../../../kustomize/bases/deployment/ replacements: - source: diff --git a/namespaces/apps/dolibarr/kustomization.yaml b/namespaces/apps/dolibarr/kustomization.yaml index 47fbe7b..26bef45 100644 --- a/namespaces/apps/dolibarr/kustomization.yaml +++ b/namespaces/apps/dolibarr/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: dolibarr- resources: - - ../../../kustomize/public-oidc/ + - ../../../kustomize/bases/public-oidc/ replacements: - source: diff --git a/namespaces/apps/forgejo/kustomization.yaml b/namespaces/apps/forgejo/kustomization.yaml index 76c0e36..7bdd5f2 100644 --- a/namespaces/apps/forgejo/kustomization.yaml +++ b/namespaces/apps/forgejo/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: forgejo- resources: - - ../../../kustomize/deployment/ + - ../../../kustomize/bases/deployment/ - extra/ssh-service.yaml - extra/ssh-tcproute.yaml diff --git a/namespaces/apps/linkwarden/kustomization.yaml b/namespaces/apps/linkwarden/kustomization.yaml index 8b7713c..6bb096a 100644 --- a/namespaces/apps/linkwarden/kustomization.yaml +++ b/namespaces/apps/linkwarden/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: linkwarden- resources: - - ../../../kustomize/public-oidc/ + - ../../../kustomize/bases/public-oidc/ replacements: - source: diff --git a/namespaces/apps/mealie/kustomization.yaml b/namespaces/apps/mealie/kustomization.yaml index 3ec3638..abf1931 100644 --- a/namespaces/apps/mealie/kustomization.yaml +++ b/namespaces/apps/mealie/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: mealie- resources: - - ../../../kustomize/public-oidc/ + - ../../../kustomize/bases/public-oidc/ replacements: - source: diff --git a/namespaces/apps/paperless/kustomization.yaml b/namespaces/apps/paperless/kustomization.yaml index c9cf7df..0b444ff 100644 --- a/namespaces/apps/paperless/kustomization.yaml +++ b/namespaces/apps/paperless/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: paperless- resources: - - ../../../kustomize/public-oidc/ + - ../../../kustomize/bases/public-oidc/ - extra/deploy-sync.yaml - extra/pvc-consume.yaml - extra/pvc-sftp.yaml diff --git a/namespaces/apps/syncthing/kustomization.yaml b/namespaces/apps/syncthing/kustomization.yaml index e09fa01..5c5225f 100644 --- a/namespaces/apps/syncthing/kustomization.yaml +++ b/namespaces/apps/syncthing/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: syncthing- resources: - - ../../../kustomize/statefulset/ + - ../../../kustomize/bases/statefulset/ labels: - includeSelectors: true diff --git a/namespaces/apps/vaultwarden/kustomization.yaml b/namespaces/apps/vaultwarden/kustomization.yaml index 674e6db..50f3b02 100644 --- a/namespaces/apps/vaultwarden/kustomization.yaml +++ b/namespaces/apps/vaultwarden/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: vaultwarden- resources: - - ../../../kustomize/deployment/ + - ../../../kustomize/bases/deployment/ replacements: - source: diff --git a/namespaces/auth/authentik/kustomization.yaml b/namespaces/auth/authentik/kustomization.yaml index 475a3f0..a27790d 100644 --- a/namespaces/auth/authentik/kustomization.yaml +++ b/namespaces/auth/authentik/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: authentik- resources: - - ../../../kustomize/helmchart + - ../../../kustomize/bases/helmchart patches: - path: patches/chart.yaml diff --git a/namespaces/cert-manager/cert-manager/kustomization.yaml b/namespaces/cert-manager/cert-manager/kustomization.yaml index 722f7b8..2847aee 100644 --- a/namespaces/cert-manager/cert-manager/kustomization.yaml +++ b/namespaces/cert-manager/cert-manager/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: cert-manager- resources: - - ../../../kustomize/helmchart-noaddons + - ../../../kustomize/bases/helmchart-noaddons - extras/cloudflare-token.yaml patches: diff --git a/namespaces/core/gotenburg/kustomization.yaml b/namespaces/core/gotenburg/kustomization.yaml index c4f4b31..ebf412a 100644 --- a/namespaces/core/gotenburg/kustomization.yaml +++ b/namespaces/core/gotenburg/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: gotenburg- resources: - - ../../../kustomize/deployservice/ + - ../../../kustomize/bases/deployservice/ replacements: - source: diff --git a/namespaces/core/minio/kustomization.yaml b/namespaces/core/minio/kustomization.yaml index 94c12f4..3d48847 100644 --- a/namespaces/core/minio/kustomization.yaml +++ b/namespaces/core/minio/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: minio- resources: - - ../../../kustomize/deployment/ + - ../../../kustomize/bases/deployment/ - extras/server-svc.yaml - extras/server-route.yaml diff --git a/namespaces/core/pgdump/kustomization.yaml b/namespaces/core/pgdump/kustomization.yaml index 902e4df..7807566 100644 --- a/namespaces/core/pgdump/kustomization.yaml +++ b/namespaces/core/pgdump/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: pgdump- resources: - - ../../../kustomize/backups/ + - ../../../kustomize/bases/backups/ labels: - includeSelectors: true diff --git a/namespaces/core/postgres/kustomization.yaml b/namespaces/core/postgres/kustomization.yaml index 12fa835..e74806f 100644 --- a/namespaces/core/postgres/kustomization.yaml +++ b/namespaces/core/postgres/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: postgres- resources: - - ../../../kustomize/statefulset/ + - ../../../kustomize/bases/statefulset/ - extras/tcproute.yaml labels: diff --git a/namespaces/core/redis/kustomization.yaml b/namespaces/core/redis/kustomization.yaml index e84f22d..ac37284 100644 --- a/namespaces/core/redis/kustomization.yaml +++ b/namespaces/core/redis/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: redis- resources: - - ../../../kustomize/statefulset/ + - ../../../kustomize/bases/statefulset/ labels: - includeSelectors: true diff --git a/namespaces/core/tika/kustomization.yaml b/namespaces/core/tika/kustomization.yaml index d62b654..4ab5afd 100644 --- a/namespaces/core/tika/kustomization.yaml +++ b/namespaces/core/tika/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: tika- resources: - - ../../../kustomize/deployservice/ + - ../../../kustomize/bases/deployservice/ replacements: - source: diff --git a/namespaces/infisical/infisical/kustomization.yaml b/namespaces/infisical/infisical/kustomization.yaml index 0f450e3..57092aa 100644 --- a/namespaces/infisical/infisical/kustomization.yaml +++ b/namespaces/infisical/infisical/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: infisical- resources: - - ../../../kustomize/helmchart-noaddons + - ../../../kustomize/bases/helmchart-noaddons patches: - path: patches/chart.yaml diff --git a/namespaces/longhorn/longhorn/kustomization.yaml b/namespaces/longhorn/longhorn/kustomization.yaml index cdcf42e..5fffaa2 100644 --- a/namespaces/longhorn/longhorn/kustomization.yaml +++ b/namespaces/longhorn/longhorn/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: longhorn- resources: - - ../../../kustomize/helmchart + - ../../../kustomize/bases/helmchart - extras/longhorn-public-storageclass.yaml - extras/longhorn-private-storageclass.yaml - extras/longhorn-secret.yaml diff --git a/namespaces/monitoring/diun/kustomization.yaml b/namespaces/monitoring/diun/kustomization.yaml index 14beab6..0e976ac 100644 --- a/namespaces/monitoring/diun/kustomization.yaml +++ b/namespaces/monitoring/diun/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: diun- resources: - - ../../../kustomize/noservice/ + - ../../../kustomize/bases/noservice/ - extra/serviceaccount.yaml - extra/clusterrole.yaml - extra/clusterrolebinding.yaml diff --git a/namespaces/monitoring/gatus/base-config.yaml b/namespaces/monitoring/gatus/base-config.yaml new file mode 100644 index 0000000..1024881 --- /dev/null +++ b/namespaces/monitoring/gatus/base-config.yaml @@ -0,0 +1,24 @@ +metrics: true +ui: + title: "JLP Homelab Health | Gatus" +skip-invalid-config-update: true + +endpoints: + - name: website + url: https://twin.sh/health + interval: 5m + conditions: + - "[STATUS] == 200" + - "[BODY].status == UP" + + - name: github + url: https://api.github.com/healthz + interval: 5m + conditions: + - "[STATUS] == 200" + + - name: self + url: http://localhost:8080/health + interval: 5m + conditions: + - "[STATUS] == 200" diff --git a/namespaces/monitoring/gatus/extras/sidecar-clusterRole.yaml b/namespaces/monitoring/gatus/extras/sidecar-clusterRole.yaml new file mode 100644 index 0000000..9971fce --- /dev/null +++ b/namespaces/monitoring/gatus/extras/sidecar-clusterRole.yaml @@ -0,0 +1,8 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: gatus-k8s-sidecar +rules: + - apiGroups: [""] + resources: ["configmaps", "secrets"] + verbs: ["get", "watch", "list"] diff --git a/namespaces/monitoring/gatus/extras/sidecar-crb.yaml b/namespaces/monitoring/gatus/extras/sidecar-crb.yaml new file mode 100644 index 0000000..bc24397 --- /dev/null +++ b/namespaces/monitoring/gatus/extras/sidecar-crb.yaml @@ -0,0 +1,12 @@ +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: gatus-k8s-sidecar +roleRef: + kind: ClusterRole + name: gatus-k8s-sidecar + apiGroup: rbac.authorization.k8s.io +subjects: + - kind: ServiceAccount + name: gatus-k8s-sidecar + namespace: monitoring diff --git a/namespaces/monitoring/gatus/extras/sidecar-serviceAccount.yaml b/namespaces/monitoring/gatus/extras/sidecar-serviceAccount.yaml new file mode 100644 index 0000000..9d7e602 --- /dev/null +++ b/namespaces/monitoring/gatus/extras/sidecar-serviceAccount.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: gatus-k8s-sidecar diff --git a/namespaces/monitoring/gatus/kustomization.yaml b/namespaces/monitoring/gatus/kustomization.yaml new file mode 100644 index 0000000..992b7fb --- /dev/null +++ b/namespaces/monitoring/gatus/kustomization.yaml @@ -0,0 +1,149 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: notImportantHere + namespace: monitoring + unsetOnly: true + +namePrefix: gatus- +resources: + - ../../../kustomize/bases/deployment/ + - extras/sidecar-crb.yaml + - extras/sidecar-serviceAccount.yaml + - extras/sidecar-clusterRole.yaml + +patches: + - path: patches/deployment.yaml + target: + kind: Deployment + name: app + - path: patches/pvc.yaml + target: + kind: PersistentVolumeClaim + name: pvc + +labels: + - includeSelectors: true + pairs: + app.kubernetes.io/appName: gatus + - pairs: + app.kubernetes.io/appNamespace: monitoring + - pairs: + app.kubernetes.io/routePrefix: status + +configMapGenerator: + - name: gatus-config + files: + - base-config.yaml + - name: gatus-settings + literals: + - GATUS_CONFIG_PATH=/config + - name: k8s-sidecar-settings + literals: + - LABEL="homelab.kubernetes.io/k8s-sidecar" + - LABEL_VALUE="gatus" + - FOLDER="/config" + - METHOD="SLEEP" + - SLEEP_TIME=60 + +replacements: + # Service + - source: + kind: Deployment + name: app + fieldPath: metadata.labels.[app.kubernetes.io/appName] + targets: + - select: + kind: Service + fieldPaths: + - spec.ports.0.name + - spec.ports.0.targetPort + - source: + kind: Deployment + name: app + fieldPath: spec.template.spec.containers.0.ports.0.containerPort + targets: + - select: + kind: Service + fieldPaths: + - spec.ports.0.port + # Secrets + - source: + kind: Deployment + name: app + fieldPath: metadata.labels.[app.kubernetes.io/appNamespace] + targets: + - select: + kind: InfisicalSecret + fieldPaths: + - spec.managedSecretReference.secretNamespace + - source: + kind: Deployment + name: app + fieldPath: metadata.labels.[app.kubernetes.io/appName] + targets: + - select: + kind: InfisicalSecret + options: + delimiter: "-" + index: 0 + fieldPaths: + - spec.managedSecretReference.secretName + - select: + kind: InfisicalSecret + options: + delimiter: "/" + index: 2 + fieldPaths: + - spec.authentication.universalAuth.secretsScope.secretsPath + # HTTP Route + - source: + kind: Service + name: svc + targets: + - select: + kind: HTTPRoute + options: + create: true + fieldPaths: + - spec.rules.0.backendRefs.0.name + - source: + kind: Deployment + name: app + fieldPath: metadata.labels.[app.kubernetes.io/appName] + targets: + - select: + kind: HTTPRoute + options: + create: true + delimiter: "." + index: 0 + fieldPaths: + - spec.hostnames.0 + - source: + kind: Deployment + name: app + fieldPath: spec.template.spec.containers.0.ports.0.containerPort + targets: + - select: + kind: HTTPRoute + fieldPaths: + - spec.rules.0.backendRefs.0.port + - source: + kind: Deployment + name: app + fieldPath: metadata.labels.[app.kubernetes.io/routePrefix] + targets: + - select: + kind: HTTPRoute + options: + create: true + delimiter: "." + index: 0 + fieldPaths: + - spec.hostnames.0 diff --git a/namespaces/monitoring/gatus/patches/deployment.yaml b/namespaces/monitoring/gatus/patches/deployment.yaml new file mode 100644 index 0000000..13cc025 --- /dev/null +++ b/namespaces/monitoring/gatus/patches/deployment.yaml @@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: app +spec: + template: + spec: + serviceAccountName: gatus-k8s-sidecar + tolerations: + - key: "public" + operator: "Equal" + value: "true" + effect: "NoSchedule" + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: public + operator: In + values: + - "true" + containers: + - name: gatus + image: twinproduction/gatus:v5.17.0 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: gatus + protocol: TCP + resources: + limits: + cpu: 250m + memory: 100M + requests: + cpu: 50m + memory: 30M + readinessProbe: + httpGet: + path: /health + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + livenessProbe: + httpGet: + path: /health + port: 8080 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + envFrom: + - configMapRef: + name: gatus-settings + volumeMounts: + - mountPath: /config/config.yaml + name: gatus-config + subPath: base-config.yaml + - name: config-collector + image: kiwigrid/k8s-sidecar:1.30.3 + volumeMounts: + - name: collected + mountPath: /config/ + envFrom: + - configMapRef: + name: k8s-sidecar-settings + volumes: + - configMap: + name: gatus-config + name: gatus-config + - name: collected + emptyDir: {} diff --git a/namespaces/monitoring/gatus/patches/pvc.yaml b/namespaces/monitoring/gatus/patches/pvc.yaml new file mode 100644 index 0000000..54ecf59 --- /dev/null +++ b/namespaces/monitoring/gatus/patches/pvc.yaml @@ -0,0 +1,5 @@ +$patch: delete +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: pvc diff --git a/namespaces/monitoring/healthchecks/kustomization.yaml b/namespaces/monitoring/healthchecks/kustomization.yaml index ee7f6e7..0fe4e50 100644 --- a/namespaces/monitoring/healthchecks/kustomization.yaml +++ b/namespaces/monitoring/healthchecks/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: healthchecks- resources: - - ../../../kustomize/public-oidc/ + - ../../../kustomize/bases/public-oidc/ replacements: - source: diff --git a/namespaces/monitoring/ntfy/kustomization.yaml b/namespaces/monitoring/ntfy/kustomization.yaml index 1157208..246fce6 100644 --- a/namespaces/monitoring/ntfy/kustomization.yaml +++ b/namespaces/monitoring/ntfy/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: ntfy- resources: - - ../../../kustomize/public-oidc/ + - ../../../kustomize/bases/public-oidc/ replacements: - source: diff --git a/namespaces/monitoring/umami/kustomization.yaml b/namespaces/monitoring/umami/kustomization.yaml index d1588f8..d898c38 100644 --- a/namespaces/monitoring/umami/kustomization.yaml +++ b/namespaces/monitoring/umami/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: umami- resources: - - ../../../kustomize/public-oidc/ + - ../../../kustomize/bases/public-oidc/ replacements: - source: diff --git a/namespaces/monitoring/uptime-kuma/kustomization.yaml b/namespaces/monitoring/uptime-kuma/kustomization.yaml index 56416dc..701c938 100644 --- a/namespaces/monitoring/uptime-kuma/kustomization.yaml +++ b/namespaces/monitoring/uptime-kuma/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: uptime-kuma- resources: - - ../../../kustomize/deployment/ + - ../../../kustomize/bases/deployment/ # - extra/middleware-auth.yaml replacements: diff --git a/namespaces/traefik/traefik/kustomization.yaml b/namespaces/traefik/traefik/kustomization.yaml index 84bea1c..9c06960 100644 --- a/namespaces/traefik/traefik/kustomization.yaml +++ b/namespaces/traefik/traefik/kustomization.yaml @@ -12,7 +12,7 @@ transformers: namePrefix: traefik-lb resources: - - ../../../kustomize/helmchart-noaddons/ + - ../../../kustomize/bases/helmchart-noaddons/ patches: - path: patches/chart.yaml