Skip to content

Commit 6ae258f

Browse files
J12934secureCodeBoxBot
authored andcommitted
Updating Helm Docs
Signed-off-by: GitHub Actions <securecodebox@iteratec.com>
1 parent e8e346b commit 6ae258f

1 file changed

Lines changed: 37 additions & 4 deletions

File tree

‎hooks/generic-webhook/docs/README.ArtifactHub.md‎

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,50 @@ helm upgrade --install generic-webhook secureCodeBox/generic-webhook
5656
Kubernetes: `>=v1.11.0-0`
5757

5858
## Additional Chart Configurations
59+
The webhook URL is set as follows:
5960

60-
> ✍ This documentation is currently work-in-progress.
61+
```bash
62+
helm upgrade --install generic-webhook secureCodeBox/generic-webhook \
63+
--set="webhookUrl=http://http-webhook/hello-world"
64+
```
65+
Two authentication methods exist for the Generic WebHook Hook. You can either use Basic authentication or API authentication.
66+
The authentication method is set by creating the corresponding secret as follows:
67+
68+
##### Basic authentication:
69+
70+
```bash
71+
kubectl create secret generic generic-webhook-credentials \
72+
--from-literal=username='admin' \
73+
--from-literal=password='ThisIsAPassword'
74+
```
75+
##### API authentication:
76+
77+
```bash
78+
kubectl create secret generic generic-webhook-credentials \
79+
--from-literal=headerName='X-Example-Header' \
80+
--from-literal=headerValue='ThisIsAnAPIkeyValue'
81+
```
82+
83+
Only one authentication method can be used at a time.
84+
85+
The keys for your secret mapping can also be renamed if necessary, for example `headerName` and `headerValue` can be renamed to `name` and `value` respectively.
86+
87+
This is usually done to reuse existing secrets.
88+
```bash
89+
helm upgrade --install generic-webhook secureCodeBox/generic-webhook \
90+
--set="hook.authentication.apikey.headerNameKey=name" \
91+
--set="hook.authentication.apikey.headerValueKey=value"
92+
```
6193

6294
## Values
6395

6496
| Key | Type | Default | Description |
6597
|-----|------|---------|-------------|
6698
| hook.affinity | object | `{}` | Optional affinity settings that control how the hook job is scheduled (see: https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/) |
67-
| hook.authentication | object | `{"apikey":{"headerName":"X-Example-Header","headerValue":"example","userSecret":"generic-webhook-credentials"},"basic":{"passwordKey":"password","userSecret":"generic-webhook-credentials","usernameKey":"username"}}` | Optional basic authentication credentials or apikey |
68-
| hook.authentication.apikey.headerName | string | `"X-Example-Header"` | Customize header name as per your needs ex: X-Api-Key |
69-
| hook.authentication.apikey.userSecret | string | `"generic-webhook-credentials"` | Link a pre-existing generic secret with `usernameKey` and `passwordKey` key / value pairs |
99+
| hook.authentication | object | `{"apikey":{"headerNameKey":"headerName","headerValueKey":"headerValue","userSecret":"generic-webhook-credentials"},"basic":{"passwordKey":"password","userSecret":"generic-webhook-credentials","usernameKey":"username"}}` | Optional basic authentication credentials or apikey |
100+
| hook.authentication.apikey.headerNameKey | string | `"headerName"` | Name of the header name key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs |
101+
| hook.authentication.apikey.headerValueKey | string | `"headerValue"` | Name of the header value key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs |
102+
| hook.authentication.apikey.userSecret | string | `"generic-webhook-credentials"` | Link a pre-existing generic secret with `headerNameKey` and `headerValueKey` key / value pairs |
70103
| hook.authentication.basic.passwordKey | string | `"password"` | Name of the password key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs |
71104
| hook.authentication.basic.userSecret | string | `"generic-webhook-credentials"` | Link a pre-existing generic secret with `usernameKey` and `passwordKey` key / value pairs |
72105
| hook.authentication.basic.usernameKey | string | `"username"` | Name of the username key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs |

0 commit comments

Comments
 (0)