feat(gatus): Add uptime monitoring
This commit is contained in:
@@ -0,0 +1,43 @@
|
|||||||
|
bases:
|
||||||
|
- ../envs/environments.yaml.gotmpl
|
||||||
|
|
||||||
|
repositories:
|
||||||
|
- name: gatus
|
||||||
|
url: https://twin.github.io/helm-charts
|
||||||
|
|
||||||
|
commonLabels:
|
||||||
|
tier: system
|
||||||
|
|
||||||
|
releases:
|
||||||
|
- name: gatus
|
||||||
|
namespace: uptime
|
||||||
|
chart: gatus/gatus
|
||||||
|
version: 1.4.4
|
||||||
|
condition: gatus.enabled
|
||||||
|
values:
|
||||||
|
- ../values/gatus/values/values.yaml
|
||||||
|
- ../values/gatus/values/values-{{ .Environment.Name }}.yaml
|
||||||
|
postRenderer: ../bin/kustomizer
|
||||||
|
postRendererArgs:
|
||||||
|
- ../values/gatus/kustomize/{{ .Environment.Name }}
|
||||||
|
missingFileHandler: Info
|
||||||
|
- name: manifests
|
||||||
|
namespace: gatus-system
|
||||||
|
chart: manifests
|
||||||
|
condition: gatus.enabled
|
||||||
|
missingFileHandler: Info
|
||||||
|
values:
|
||||||
|
- ../values/env.yaml
|
||||||
|
- ../values/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml
|
||||||
|
- ../values/gatus/env.yaml.gotmpl
|
||||||
|
- ../values/gatus/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml.gotmpl
|
||||||
|
hooks:
|
||||||
|
- events: [ prepare, cleanup ]
|
||||||
|
showlogs: true
|
||||||
|
command: ../bin/helmify
|
||||||
|
args:
|
||||||
|
- '{{`{{ if eq .Event.Name "prepare" }}build{{ else }}clean{{ end }}`}}'
|
||||||
|
- '{{`{{ .Release.Chart }}`}}'
|
||||||
|
- '{{`{{ .Environment.Name }}`}}'
|
||||||
|
- ../values/gatus/manifests
|
||||||
|
- manifests
|
||||||
@@ -84,6 +84,8 @@ spec:
|
|||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
- namespace: spegel
|
- namespace: spegel
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
|
- namespace: uptime
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
sourceRepos:
|
sourceRepos:
|
||||||
- https://argoproj.github.io/argo-helm
|
- https://argoproj.github.io/argo-helm
|
||||||
- https://kubernetes-sigs.github.io/metrics-server/
|
- https://kubernetes-sigs.github.io/metrics-server/
|
||||||
@@ -122,3 +124,4 @@ spec:
|
|||||||
- https://operator.mariadb.com/mariadb-enterprise-operator
|
- https://operator.mariadb.com/mariadb-enterprise-operator
|
||||||
- https://operator.mariadb.com
|
- https://operator.mariadb.com
|
||||||
- https://ot-container-kit.github.io/helm-charts
|
- https://ot-container-kit.github.io/helm-charts
|
||||||
|
- https://twin.github.io/helm-charts
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
gatus:
|
||||||
|
enabled: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
gatus:
|
||||||
|
enabled: true
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
gatus:
|
||||||
|
enabled: false
|
||||||
|
autosync: false
|
||||||
|
env: default
|
||||||
@@ -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
|
||||||
@@ -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 }}
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
stringData:
|
||||||
|
DB_PASS: "test"
|
||||||
|
metadata:
|
||||||
|
name: gatus
|
||||||
|
namespace: uptime
|
||||||
|
type: Opaque
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
image:
|
||||||
|
repository: twinproduction/gatus
|
||||||
|
tag: v5.26.0
|
||||||
|
|
||||||
|
# Does envFrom secret named gatus
|
||||||
|
secrets: true
|
||||||
|
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
config:
|
||||||
|
web:
|
||||||
|
address: "[::]"
|
||||||
|
metrics: true
|
||||||
|
|
||||||
|
storage:
|
||||||
|
type: postgres
|
||||||
|
path: "postgres://app:${DB_PASS}@prod-gatus-db:5432/app"
|
||||||
|
|
||||||
|
ui:
|
||||||
|
title: Oceanbox
|
||||||
|
header: Oceanbox Monitoring
|
||||||
|
#logo: https://zarak.fr/resources/cyril-avatar.jpg
|
||||||
|
link: https://oceanbox.io
|
||||||
|
|
||||||
|
.defaults: &defaults
|
||||||
|
interval: 30s
|
||||||
|
|
||||||
|
.https-endpoint: &https-endpoint
|
||||||
|
<<: *defaults
|
||||||
|
conditions:
|
||||||
|
- "[STATUS] == 200"
|
||||||
|
- "[RESPONSE_TIME] <= 1000"
|
||||||
|
- "[CERTIFICATE_EXPIRATION] > 168h" # 7 days
|
||||||
|
|
||||||
|
.tls-endpoint: &tls-endpoint
|
||||||
|
<<: *defaults
|
||||||
|
conditions:
|
||||||
|
- "[CONNECTED] == true"
|
||||||
|
- "[RESPONSE_TIME] <= 1000"
|
||||||
|
- "[CERTIFICATE_EXPIRATION] > 168h" # 7 days
|
||||||
|
|
||||||
|
.tcp-endpoint: &tcp-endpoint
|
||||||
|
<<: *defaults
|
||||||
|
conditions:
|
||||||
|
- "[CONNECTED] == true"
|
||||||
|
- "[RESPONSE_TIME] <= 1000"
|
||||||
|
|
||||||
|
endpoints:
|
||||||
|
- name: Atlantis
|
||||||
|
<<: *https-endpoint
|
||||||
|
group: "Primary Services"
|
||||||
|
url: https://maps.oceanbox.io/healthz
|
||||||
|
|
||||||
|
- name: Sorcerer
|
||||||
|
<<: *https-endpoint
|
||||||
|
group: "Primary Services"
|
||||||
|
url: https://sorcerer.data.oceanbox.io/healthz
|
||||||
|
|
||||||
|
- name: Plume
|
||||||
|
<<: *https-endpoint
|
||||||
|
group: "Secondary Services"
|
||||||
|
url: https://plume.data.oceanbox.io/healthz
|
||||||
|
|
||||||
|
- name: Homepage
|
||||||
|
<<: *https-endpoint
|
||||||
|
group: "Secondary Services"
|
||||||
|
url: https://oceanbox.io
|
||||||
|
|
||||||
|
- name: Homepage
|
||||||
|
<<: *https-endpoint
|
||||||
|
group: "Experimental Services"
|
||||||
|
url: https://oceanbox.io
|
||||||
|
|
||||||
|
- name: Atlantis Beta
|
||||||
|
<<: *https-endpoint
|
||||||
|
group: "Experimental Services"
|
||||||
|
url: https://atlantis.beta.oceanbox.io/healthz
|
||||||
|
|
||||||
|
- name: Sorcerer Beta
|
||||||
|
<<: *https-endpoint
|
||||||
|
group: "Experimental Services"
|
||||||
|
url: https://sorcerer.ekman.oceanbox.io/healthz
|
||||||
|
|
||||||
|
- name: Plume Beta
|
||||||
|
<<: *https-endpoint
|
||||||
|
group: "Experimental Services"
|
||||||
|
url: https://plume.ekman.oceanbox.io/healthz
|
||||||
Reference in New Issue
Block a user