feat(gatus): Add uptime monitoring

This commit is contained in:
2025-11-18 11:12:00 +01:00
parent d8c1bac4c3
commit f67fcaf7c8
10 changed files with 233 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: prod-gatus-db
namespace: uptime
spec:
instances: 1
imageName: ghcr.io/cloudnative-pg/postgresql:17
storage:
resizeInUseVolumes: true
size: 15Gi
backup:
retentionPolicy: 30d
target: prefer-standby
+38
View File
@@ -0,0 +1,38 @@
{{- if .Values.clusterConfig.argo.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: gatus
namespace: argocd
spec:
destination:
namespace: uptime
server: 'https://kubernetes.default.svc'
sources:
- repoURL: {{ .Values.clusterConfig.manifests }}
targetRevision: HEAD
path: helmfile.d
plugin:
name: helmfile-cmp
env:
- name: CLUSTER_NAME
value: {{ .Values.clusterConfig.cluster }}
- name: HELMFILE_ENVIRONMENT
value: default
- name: HELMFILE_FILE_PATH
value: gatus.yaml.gotmpl
project: sys
syncPolicy:
managedNamespaceMetadata:
labels:
component: sys
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
- ServerSideApply=true
{{- if .Values.gatus.autosync }}
automated:
prune: true
# selfHeal: false
{{- end }}
{{- end }}
+31
View File
@@ -0,0 +1,31 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
nginx.ingress.kubernetes.io/backend-protocol: HTTP
nginx.ingress.kubernetes.io/cors-allow-headers: Content-Type, x-gatus-cache
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: 128k
nginx.ingress.kubernetes.io/ssl-redirect: "true"
labels:
app.kubernetes.io/name: gatus
name: gatus
namespace: uptime
spec:
ingressClassName: nginx
rules:
- host: uptime.srv.oceanbox.io
http:
paths:
- backend:
service:
name: gatus
port:
number: 80
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- uptime.srv.oceanbox.io
secretName: gatus-tls
+8
View File
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
stringData:
DB_PASS: "test"
metadata:
name: gatus
namespace: uptime
type: Opaque