forked from leg100/otf-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md.gotmpl
86 lines (56 loc) · 2.03 KB
/
README.md.gotmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# otf-charts
{{ template "chart.deprecationWarning" . }}
{{ template "chart.badgesSection" . }}
[OTF](https://github.com/leg100/otf) Helm charts.
## Instructions
Add the helm repository:
```bash
helm repo add otf https://leg100.github.io/otf-charts
```
To install the chart you need at the very minimum:
* A PostgreSQL database up and running.
* A hex-coded 16 byte [secret](https://docs.otf.ninja/latest/config/flags#-secret).
* Either setup an [identity provider](https://docs.otf.ninja/latest/auth#identity-providers) or set a [site admin token](https://docs.otf.ninja/latest/auth#site-admin).
For example, if a PostgreSQL server is accessible via the hostname `postgres`, has a database named `otf` accessible to a user with username `postgres` and password `postgres`:
```
helm install otf otf/otf --set secret=2876cb147697052eec5b3cdb56211681 --set site-token=my-token --set database=postgres://postgres:postgres@postgres/otf
```
Alternatively, you can use the [test-values.yaml](./charts/otf/test-values.yaml) from this repo:
```
helm install otf otf/otf -f ./charts/otf/test-values.yaml
```
This will:
* Install PostgreSQL on the cluster
* Set secret
* Set a site token
Note: you should only use this for testing purposes.
{{ template "chart.valuesSection" . }}
{{ template "helm-docs.versionFooter" . }}
## Development
If you make any changes to the chart you need to bump its version. You can either do that by hand in `Chart.yaml`, or using `make`:
```bash
# requires `yq`
make bump
```
To generate the `README.md` from its template, `README.md.gotmpl`:
```bash
# requires `helm-docs`
make readme
```
Any changes to the version or to the `values.yaml` file are automatically reflected in the generated `README.md`.
To lint the chart:
```bash
make lint
```
To deploy the chart to a cluster to the namespace `otf-test` with pre-configured defaults along with PostgreSQL:
```bash
make deploy
```
To test the chart (assumes release is named `otf`):
```bash
make test
```
And to lint, deploy, and then test the chart:
```bash
make all
```