diff --git a/charts/flagger/values.yaml b/charts/flagger/values.yaml index 826c551a..f12d9e42 100644 --- a/charts/flagger/values.yaml +++ b/charts/flagger/values.yaml @@ -57,6 +57,11 @@ podMonitor: # secretKeyRef: # name: msteams # key: url +#- name: EVENT_WEBHOOK_URL +# valueFrom: +# secretKeyRef: +# name: eventwebhook +# key: url env: [] leaderElection: diff --git a/cmd/flagger/main.go b/cmd/flagger/main.go index 5b8ef376..06e855da 100644 --- a/cmd/flagger/main.go +++ b/cmd/flagger/main.go @@ -202,7 +202,7 @@ func main() { observerFactory, meshProvider, version.VERSION, - eventWebhook, + fromEnv("EVENT_WEBHOOK_URL", eventWebhook), ) // leader election context diff --git a/docs/gitbook/usage/alerting.md b/docs/gitbook/usage/alerting.md index 3c462792..be6f46c8 100644 --- a/docs/gitbook/usage/alerting.md +++ b/docs/gitbook/usage/alerting.md @@ -62,6 +62,9 @@ helm upgrade -i flagger flagger/flagger \ --set eventWebhook=https://example.com/flagger-canary-event-webhook ``` +The environment variable *EVENT_WEBHOOK_URL* can be used for activating the event-webhook, too. +This is handy for using a secret to store a sensible value that could contain api keys for example. + When configured, every action that Flagger takes during a canary deployment will be sent as JSON via an HTTP POST request. The JSON payload has the following schema: