|
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: |
15 | 1 |
|
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/ |
19 | 8 |
|
20 | | -### Configuring |
| 9 | +[][cookbookurl] |
21 | 10 |
|
22 | | -To configure most things, the `values.yaml` file has documentation in it. For adding your own hooks, see below. |
| 11 | + |
| 12 | +# Contents |
23 | 13 |
|
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) |
25 | 17 |
|
26 | | -Adding custom hooks can be done through the a custom `values` file. |
27 | 18 |
|
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`. |
30 | 19 |
|
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? |
52 | 21 |
|
53 | | -Now you are ready to install this helm chart onto your kubernetes cluster. |
| 22 | +its code. for generating READMEs. |
54 | 23 |
|
55 | | -```sh |
56 | | -helm upgrade --install webhooks funkypenguin/webhook-receiver -f my-custom-values.yaml |
57 | | -``` |
| 24 | +# How to use it? |
58 | 25 |
|
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 |
60 | 27 |
|
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? |
65 | 29 |
|
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:) |
67 | 31 |
|
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. |
70 | 32 |
|
0 commit comments