From be1c347b329870ed86141f3a60c9f22933375ffb Mon Sep 17 00:00:00 2001 From: Aiwantaozi Date: Mon, 10 Jun 2019 11:09:46 +0800 Subject: [PATCH] Support set http_proxy config on Rancher notifier Problem: Not support http_proxy setting now Solution: Add http_proxy configure for slack, pagerduty, wechat, webhook Issue: https://github.com/rancher/rancher/issues/17885 --- apis/management.cattle.io/v3/alerting_types.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apis/management.cattle.io/v3/alerting_types.go b/apis/management.cattle.io/v3/alerting_types.go index 2bd0172d..8f75c7bf 100644 --- a/apis/management.cattle.io/v3/alerting_types.go +++ b/apis/management.cattle.io/v3/alerting_types.go @@ -291,14 +291,17 @@ type SMTPConfig struct { type SlackConfig struct { DefaultRecipient string `json:"defaultRecipient,omitempty" norman:"required"` URL string `json:"url,omitempty" norman:"required"` + *HTTPClientConfig } type PagerdutyConfig struct { ServiceKey string `json:"serviceKey,omitempty" norman:"required"` + *HTTPClientConfig } type WebhookConfig struct { URL string `json:"url,omitempty" norman:"required"` + *HTTPClientConfig } type WechatConfig struct { @@ -307,6 +310,7 @@ type WechatConfig struct { Agent string `json:"agent,omitempty" norman:"required"` Corp string `json:"corp,omitempty" norman:"required"` RecipientType string `json:"recipientType,omitempty" norman:"required,options=tag|party|user,default=party"` + *HTTPClientConfig } type NotifierStatus struct { @@ -316,3 +320,9 @@ type AlertSystemImages struct { AlertManager string `json:"alertManager,omitempty"` AlertManagerHelper string `json:"alertManagerHelper,omitempty"` } + +// HTTPClientConfig configures an HTTP client. +type HTTPClientConfig struct { + // HTTP proxy server to use to connect to the targets. + ProxyURL string `json:"proxyUrl,omitempty"` +}