Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit c2a64f3

Browse files
authored
Update README.md
1 parent 57700f2 commit c2a64f3

File tree

1 file changed

+40
-3
lines changed

1 file changed

+40
-3
lines changed

README.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
1-
# API Generation
1+
# Gatus Operator
2+
<sup><sup>Not affiliated with gatus.io</sup></sup>
3+
4+
**State**: Alpha (in development, use at your own risk)
5+
6+
## Install
7+
1. Install the crds
8+
```bash
9+
kubectl apply -f crds/bases/gatus.io_gatuses.yaml
10+
```
11+
2. Install RBAC
12+
```bash
13+
kubectl apply -f rbac.yaml
14+
```
15+
3. Run container as per usual
16+
17+
## Usage
18+
Example: resources/test.yaml
19+
```yaml
20+
---
21+
apiVersion: gatus.io/v1alpha1
22+
kind: Gatus
23+
metadata:
24+
name: gatus-test
25+
namespace: observability
26+
spec:
27+
endpoint:
28+
enabled: true
29+
name: gatus-test
30+
url: https://example.com
31+
interval: 1m
32+
conditions: ["[STATUS] == 200"]
33+
```
34+
35+
The api is generated from the gatus package as well with some minor tweaks (to make it working).
36+
Most options you use in your normal gatus configs, you should be able to use like this.
37+
38+
## API Generation
239
The operator builds the api and crd based on the Endpoint type struc from Gatus itself, using a very alpha generator which definitely could use a rewrite as it contains many exceptions and other smaller hacks to at least continue my development time on the operator itself.
340
The API is generated using the following commands:
441
@@ -8,8 +45,8 @@ The API is generated using the following commands:
845
- controller-gen crd:crdVersions=v1 paths=./api/v1alpha1 output:crd:dir=./crd/bases
946
```
1047
11-
## Change in fields
48+
### Change in fields
1249
- HttpClient in ClientConfig is ommited (can't deep copy it)
1350
- ProviderOverride is casted to map[string]json.RawMessage
1451
- Any time.Duration is casted to string for the CRD (otherwise it will be an int64)
15-
- Everything is forced to be omitempty so the configmap will only contain the fields that are actually set
52+
- Everything is forced to be omitempty so the configmap will only contain the fields that are actually set

0 commit comments

Comments
 (0)