Skip to content

Commit 6aafa77

Browse files
author
Penguin Tools
committed
Update README (via .funkypenguin)
1 parent 5cb27a5 commit 6aafa77

File tree

1 file changed

+18
-56
lines changed

1 file changed

+18
-56
lines changed

README.md

Lines changed: 18 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,32 @@
1-
# What is this?
2-
3-
A Helm chart for acting upon webhooks.
4-
5-
## How do I use it?
6-
7-
1. Install the repo:
8-
9-
```
10-
helm repo add funkypenguins-geek-cookbook-k-rail https://funkypenguins-geek-cookbook.github.io/helm-webhook-receiver/
11-
helm repo update
12-
```
13-
14-
2. Install the chart:
151

16-
```
17-
helm install funkypenguin-geek-cookbook-k-rail/webhook-receiver
18-
```
2+
[cookbookurl]: https://geek-cookbook.funkypenguin.co.nz
3+
[kitchenurl]: https://discourse.kitchen.funkypenguin.co.nz
4+
[discordurl]: http://chat.funkypenguin.co.nz
5+
[patreonurl]: https://patreon.com/funkypenguin
6+
[blogurl]: https://www.funkypenguin.co.nz
7+
[hub]: https://hub.docker.com/r/funkypenguin/munin-node/
198

20-
### Configuring
9+
[![geek-cookbook](https://raw.githubusercontent.com/funkypenguin/www.funkypenguin.co.nz/master/images/geek-kitchen-banner.png)][cookbookurl]
2110

22-
To configure most things, the `values.yaml` file has documentation in it. For adding your own hooks, see below.
11+
12+
# Contents
2313

24-
#### Adding Custom Hooks
14+
1. [What is this?](#what-is-this)
15+
2. [How to use it?](#how-to-use-it)
16+
3. [Why it exists?](#why-it-exists)
2517

26-
Adding custom hooks can be done through the a custom `values` file.
2718

28-
To do so, create a new item on the `hooks` map.
29-
In here you need to add 3 fields; `enable`, `files` and `hook`.
3019

31-
Enable is self explaintory: Does this webhook run when queried?
32-
33-
Files is where you place all files required for this hook to run. This is a map, with the key being the path to mount it do, and the value being the file contents.
34-
35-
Finally is the `hook` field, this is where you put in your hook configuration as per the spec from the [application docs](https://github.com/adnanh/webhook/wiki/Hook-Definition)
36-
37-
Below is an example of a `values.yaml` file
38-
39-
```yaml
40-
# my-custom-values.yaml
41-
hooks:
42-
myhook:
43-
enable: true
44-
files:
45-
/data/helloworld.sh: |
46-
#!/bin/sh
47-
echo "Hello World!"
48-
hook:
49-
id: helloworld
50-
execute-command: /data/helloworld.sh
51-
```
20+
# What is this?
5221

53-
Now you are ready to install this helm chart onto your kubernetes cluster.
22+
its code. for generating READMEs.
5423

55-
```sh
56-
helm upgrade --install webhooks funkypenguin/webhook-receiver -f my-custom-values.yaml
57-
```
24+
# How to use it?
5825

59-
If you want to use an existing file, you can pass it in as follows
26+
Edit another repo on the funkypenguins-geek-cookbook organization, in the `.penguin` folder
6027

61-
```sh
62-
helm upgrade --install webhooks funkypenguin/webhook-receiver -f my-custom-values.yaml \
63-
--set-file hooks.myhoook.files./data/helloworld%sh=myfile.sh
64-
```
28+
# Why it exists?
6529

66-
This will load `myfile.sh` into the `/data/helloworld.sh` file.
30+
Because geeks like automating things (no, we are not just lazy :slightly_smiling_face:)
6731

68-
Note that `%` is replaced by `.`, as it could be confused with the key selector.
69-
Make sure you aren't overriding a key in your values files, unless it uses the same `%` notation.
7032

0 commit comments

Comments
 (0)