feat: Have githubwebhook monitor a single namespace (#828)
* feat: Have githubwebhook monitor a single namespace When using `scope.singleNamespace: true` in Helm, expected behaviour is that the github webhook server behaves the same way as the controller. The current behaviour is that the webhook server monitors all the namespaces. * Changing the chart README.md to reflect the scope The documentation now mentions that both the controller and the github webhook server will make use of the `scope.watchNamespace` field if `scope.singleNamespace` is set to `true`. Co-authored-by: Sebastien Le Digabel <sebastien.ledigabel@skyscanner.net>
This commit is contained in:
parent
fce7d6d2a7
commit
c4e97d600d
|
|
@ -55,7 +55,7 @@ All additional docs are kept in the `docs/` folder, this README is solely for do
|
||||||
| `tolerations` | Set the controller pod tolerations | |
|
| `tolerations` | Set the controller pod tolerations | |
|
||||||
| `env` | Set environment variables for the controller container | |
|
| `env` | Set environment variables for the controller container | |
|
||||||
| `priorityClassName` | Set the controller pod priorityClassName | |
|
| `priorityClassName` | Set the controller pod priorityClassName | |
|
||||||
| `scope.watchNamespace` | Tells the controller which namespace to watch if `scope.singleNamespace` is true | |
|
| `scope.watchNamespace` | Tells the controller and the github webhook server which namespace to watch if `scope.singleNamespace` is true | `Release.Namespace` (the default namespace of the helm chart). |
|
||||||
| `scope.singleNamespace` | Limit the controller to watch a single namespace | false |
|
| `scope.singleNamespace` | Limit the controller to watch a single namespace | false |
|
||||||
| `githubWebhookServer.logLevel` | Set the log level of the githubWebhookServer container | |
|
| `githubWebhookServer.logLevel` | Set the log level of the githubWebhookServer container | |
|
||||||
| `githubWebhookServer.replicaCount` | Set the number of webhook server pods | 1 |
|
| `githubWebhookServer.replicaCount` | Set the number of webhook server pods | 1 |
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,9 @@ spec:
|
||||||
{{- if .Values.githubWebhookServer.logLevel }}
|
{{- if .Values.githubWebhookServer.logLevel }}
|
||||||
- "--log-level={{ .Values.githubWebhookServer.logLevel }}"
|
- "--log-level={{ .Values.githubWebhookServer.logLevel }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.scope.singleNamespace }}
|
||||||
|
- "--watch-namespace={{ default .Release.Namespace .Values.scope.watchNamespace }}"
|
||||||
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- "/github-webhook-server"
|
- "/github-webhook-server"
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue