feat(gatus): add sidecar (#43147)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
Add Gatus Sidecar

⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code
- [x] 📜 Documentation Changes

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->
Own Cluster 

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [x] 📄 I have made changes to the documentation
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or
`fix(docs):`

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Boemeltrein
2025-12-25 11:53:17 +01:00
committed by GitHub
parent 3b584ace3d
commit dc79deccd0
5 changed files with 239 additions and 1 deletions
+3 -1
View File
@@ -35,7 +35,9 @@ name: gatus
sources:
- https://ghcr.io/twin/gatus
- https://github.com/TwiN/gatus
- https://ghcr.io/home-operations/gatus-sidecar
- https://github.com/home-operations/gatus-sidecar
- https://github.com/trueforge-org/truecharts/tree/master/charts/stable/gatus
type: application
version: 2.27.7
version: 3.0.0
@@ -0,0 +1,8 @@
sidecar:
enable: false
enableService: false
enableIngress: false
enableHttproute: false
autoService: false
autoIngress: false
autoHttproute: false
@@ -0,0 +1,8 @@
sidecar:
enable: true
enableService: true
enableIngress: true
enableHttproute: false
autoService: true
autoIngress: true
autoHttproute: false
@@ -0,0 +1,115 @@
---
title: Gatus Sidecar and Ingress Inheritance
---
As you can read in the upstream [docs](https://github.com/home-operations/gatus-sidecar) Gatus Sidecar implemented Ingress Inheritance.
## Example Values Ingress NGINX
**nginx-internal**
```yaml
// values.yaml
controller:
ingressClassResource:
name: internal
annotations:
gatus.home-operations.com/endpoint: |
group: internal
client:
dns-resolver: "tcp://blocky-dns.blocky.svc.cluster.local:53"
ui:
hide-url: true
hide-hostname: true
```
**nginx-external**
```yaml
// values.yaml
controller:
ingressClassResource:
name: internal
annotations:
gatus.home-operations.com/endpoint: |
group: external
client:
dns-resolver: "tcp://1.1.1.1:53"
```
### IngressClass result
The IngressClass will be:
```yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: internal
annotations:
gatus.home-operations.com/endpoint: |
group: internal
client:
dns-resolver: "tcp://blocky-dns.blocky.svc.cluster.local:53"
ui:
hide-url: true
hide-hostname: true"
spec:
# ... IngressClass spec
---
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: external
annotations:
gatus.home-operations.com/endpoint: |
group: external
client:
dns-resolver: "tcp://1.1.1.1:53"
spec:
# ... IngressClass spec
```
## Example with Plex NO extra Annotations
Consider in this example Plex defined with an Internal IngressClass.
No extra Annotations are given in the Helm Ingress Values of Plex.
The generated endpoint by Gatus Sidecar will be:
```yaml
- name: plex
group: internal
url: https://plex.truecharts.com
conditions:
- '[STATUS] == 200'
interval: 1m0s
client:
dns-resolver: tcp://blocky-dns.blocky.svc.cluster.local:53
ui:
hide-hostname: true
hide-url: true
```
*note:* as you can see standard conditions are added by Gatus itself.
## Example with Plex with extra Annotations
```yaml
ingress:
main:
enabled: true
ingressClassName: internal
annotations:
gatus.home-operations.com/endpoint: |-
conditions: ["[STATUS] == 401"]
```
The generated endpoint by Gatus Sidecar will be:
```yaml
- name: plex
group: internal
url: https://plex.truecharts.com
conditions:
- '[STATUS] == 401'
interval: 1m0s
client:
dns-resolver: tcp://blocky-dns.blocky.svc.cluster.local:53
ui:
hide-hostname: true
hide-url: true
```
*note:* as you can see **Ingress Class** Annotation is merged with **Ingress** Annotation.
+105
View File
@@ -3,6 +3,23 @@ image:
pullPolicy: IfNotPresent
tag: v5.33.1@sha256:7121b5916c069eac6e266875d4984ec9262d84bd1274963939b358b32476d25b
sidecarImage:
repository: ghcr.io/home-operations/gatus-sidecar
pullPolicy: IfNotPresent
tag: 0.0.12@sha256:83bf82d422e9b0529a8076cb584d557a12158d9d8a4c373b4d27afcb87a17569
sidecar:
enable: false
enableService: false
enableIngress: false
enableHttproute: false
autoService: false
autoIngress: false
autoHttproute: false
namespace: "" # Namespace to watch (empty for all namespaces), only one namespace is supported (string)
ingressClass: "" # Ingress class to filter Ingresses, only one ingress class is supported (string)
gatewayName: "" # Gateway name to filter HTTPRoutes, only one gateway name is supported (string)
service:
main:
ports:
@@ -11,6 +28,11 @@ service:
targetPort: 8080
persistence:
configmain:
enabled: "{{ .Values.sidecar.enable }}"
mountPath: /config
readOnly: false
targetSelectAll: true
config:
enabled: true
mountPath: /config/config.yaml
@@ -38,8 +60,91 @@ configmap:
- "[STATUS] == 200"
- "[BODY] == pat(*<h1>Example Domain</h1>*)"
workload:
main:
podSpec:
containers:
main:
env:
GATUS_CONFIG_PATH: "{{ .Values.persistence.configmain.mountPath }}"
GATUS_DELAY_START_SECONDS: 10
sidecar:
enabled: "{{ .Values.sidecar.enable }}"
imageSelector: sidecarImage
probes:
liveness:
enabled: true
port: "{{ .Values.service.main.ports.main.port }}"
readiness:
enabled: true
port: "{{ .Values.service.main.ports.main.port }}"
startup:
enabled: true
port: "{{ .Values.service.main.ports.main.port }}"
args:
- --output=/config/gatus-sidecar.yaml
- --enable-service={{ .Values.sidecar.enableService }}
- --enable-ingress={{ .Values.sidecar.enableIngress }}
- --enable-httproute={{ .Values.sidecar.enableHttproute }}
- --auto-service={{ .Values.sidecar.autoService }}
- --auto-ingress={{ .Values.sidecar.autoIngress }}
- --auto-httproute={{ .Values.sidecar.autoHttproute }}
- --namespace={{ .Values.sidecar.namespace }}
- --ingress-class={{ .Values.sidecar.ingressClass }}
- --gateway-name={{ .Values.sidecar.gatewayName }}
cnpg:
main:
enabled: true
user: gatus
database: gatus
# Need sysctl to allow ICMP ping from non-root containers
securityContext:
pod:
sysctls:
- name: net.ipv4.ping_group_range
value: "0 2147483647"
# Need RBAC to allow sidecar to watch Services and Ingresses
rbac:
main:
enabled: "{{ .Values.sidecar.enable }}"
primary: true
clusterWide: true
rules:
- apiGroups: [""]
resources:
- "services"
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- "networking.k8s.io"
resources:
- "ingresses"
- "ingressclasses"
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- "gateway.networking.k8s.io"
resources:
- "httproutes"
- "gateways"
verbs:
- "get"
- "list"
- "watch"
# Need ServiceAccount for RBAC
serviceAccount:
main:
enabled: true
primary: true
# Need automountServiceAccountToken to allow sidecar to use the ServiceAccount
podOptions:
automountServiceAccountToken: true