From 2f14e4b74bbce9f23279499dac79d74591a23519 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Sat, 17 Oct 2020 14:19:54 +0300 Subject: [PATCH] Add Proxy field to Provider API Signed-off-by: Stefan Prodan --- api/v1beta1/provider_types.go | 4 ++++ ...ification.toolkit.fluxcd.io_providers.yaml | 3 +++ docs/api/notification.md | 24 +++++++++++++++++++ docs/spec/v1beta1/provider.md | 6 +++++ 4 files changed, 37 insertions(+) diff --git a/api/v1beta1/provider_types.go b/api/v1beta1/provider_types.go index ed574dd..f9cc16b 100644 --- a/api/v1beta1/provider_types.go +++ b/api/v1beta1/provider_types.go @@ -42,6 +42,10 @@ type ProviderSpec struct { // +optional Address string `json:"address,omitempty"` + // HTTP(S) address of the proxy + // +optional + Proxy string `json:"proxy,omitempty"` + // Secret reference containing the provider webhook URL // +optional SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"` diff --git a/config/crd/bases/notification.toolkit.fluxcd.io_providers.yaml b/config/crd/bases/notification.toolkit.fluxcd.io_providers.yaml index 554ae06..dd756ab 100644 --- a/config/crd/bases/notification.toolkit.fluxcd.io_providers.yaml +++ b/config/crd/bases/notification.toolkit.fluxcd.io_providers.yaml @@ -52,6 +52,9 @@ spec: channel: description: Alert channel for this provider type: string + proxy: + description: HTTP(S) address of the proxy + type: string secretRef: description: Secret reference containing the provider webhook URL properties: diff --git a/docs/api/notification.md b/docs/api/notification.md index 37a8c6c..c13d3c7 100644 --- a/docs/api/notification.md +++ b/docs/api/notification.md @@ -249,6 +249,18 @@ string +proxy
+ +string + + + +(Optional) +

HTTP(S) address of the proxy

+ + + + secretRef
@@ -663,6 +675,18 @@ string +proxy
+ +string + + + +(Optional) +

HTTP(S) address of the proxy

+ + + + secretRef
diff --git a/docs/spec/v1beta1/provider.md b/docs/spec/v1beta1/provider.md index f0d3979..9d74b24 100644 --- a/docs/spec/v1beta1/provider.md +++ b/docs/spec/v1beta1/provider.md @@ -25,6 +25,10 @@ type ProviderSpec struct { // +optional Address string `json:"address,omitempty"` + // HTTP(S) address of the proxy + // +optional + Proxy string `json:"proxy,omitempty"` + // Secret reference containing the provider webhook URL // +optional SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"` @@ -79,6 +83,8 @@ spec: channel: general # webhook address (ignored if secretRef is specified) address: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK + # HTTP(S) proxy (optional) + proxy: https://proxy.corp:8080 # secret containing the webhook address (optional) secretRef: name: webhook-url