gatus/.examples/kubernetes/gatus.yaml

115 lines
2.5 KiB
YAML
Raw Normal View History

2019-12-28 19:51:58 +01:00
apiVersion: v1
kind: ConfigMap
metadata:
name: gatus
namespace: kube-system
2019-12-28 19:51:58 +01:00
data:
config.yaml: |
metrics: true
endpoints:
2021-09-18 19:04:50 +02:00
- name: website
2021-09-18 18:42:11 +02:00
url: https://twin.sh/health
interval: 5m
2019-12-28 19:51:58 +01:00
conditions:
- "[STATUS] == 200"
- "[BODY].status == UP"
2021-09-18 19:04:50 +02:00
- name: github
2019-12-28 19:51:58 +01:00
url: https://api.github.com/healthz
2020-08-15 02:05:10 +02:00
interval: 5m
2019-12-28 19:51:58 +01:00
conditions:
- "[STATUS] == 200"
2020-10-15 02:07:52 +02:00
- name: cat-fact
url: "https://cat-fact.herokuapp.com/facts/random"
interval: 5m
conditions:
- "[STATUS] == 200"
- "[BODY].deleted == false"
- "len([BODY].text) > 0"
- "[BODY].text == pat(*cat*)"
- "[STATUS] == pat(2*)"
- "[CONNECTED] == true"
2021-09-18 19:04:50 +02:00
- name: example
2019-12-28 19:51:58 +01:00
url: https://example.com/
conditions:
- "[STATUS] == 200"
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: gatus
namespace: kube-system
---
2019-12-28 19:51:58 +01:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: gatus
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: gatus
2019-12-28 19:51:58 +01:00
template:
metadata:
name: gatus
namespace: kube-system
labels:
app: gatus
2019-12-28 19:51:58 +01:00
spec:
serviceAccountName: gatus
terminationGracePeriodSeconds: 5
2019-12-28 19:51:58 +01:00
containers:
- image: twinproduction/gatus
imagePullPolicy: IfNotPresent
name: gatus
ports:
- containerPort: 8080
name: http
protocol: TCP
resources:
limits:
2021-03-04 04:31:55 +01:00
cpu: 250m
memory: 100M
2019-12-28 19:51:58 +01:00
requests:
2020-09-21 16:41:23 +02:00
cpu: 50m
2021-03-04 04:31:55 +01:00
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
2019-12-28 19:51:58 +01:00
volumeMounts:
- mountPath: /config
name: gatus-config
volumes:
- configMap:
name: gatus
name: gatus-config
---
apiVersion: v1
kind: Service
metadata:
name: gatus
namespace: kube-system
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: gatus