mirror of
https://github.com/rancher/types.git
synced 2025-07-31 20:55:00 +00:00
Add notifiers Dingtalk and Microsoft Teams
This commit is contained in:
parent
b18f4c1944
commit
b85c9948ed
@ -83,7 +83,7 @@ func (p *ProjectAlertSpec) ObjClusterName() string {
|
||||
type Recipient struct {
|
||||
Recipient string `json:"recipient,omitempty"`
|
||||
NotifierName string `json:"notifierName,omitempty" norman:"required,type=reference[notifier]"`
|
||||
NotifierType string `json:"notifierType,omitempty" norman:"required,options=slack|email|pagerduty|webhook|wechat"`
|
||||
NotifierType string `json:"notifierType,omitempty" norman:"required,options=slack|email|pagerduty|webhook|wechat|dingtalk|msteams"`
|
||||
}
|
||||
|
||||
type TargetNode struct {
|
||||
@ -337,6 +337,8 @@ type NotifierSpec struct {
|
||||
PagerdutyConfig *PagerdutyConfig `json:"pagerdutyConfig,omitempty"`
|
||||
WebhookConfig *WebhookConfig `json:"webhookConfig,omitempty"`
|
||||
WechatConfig *WechatConfig `json:"wechatConfig,omitempty"`
|
||||
DingtalkConfig *DingtalkConfig `json:"dingtalkConfig,omitempty"`
|
||||
MSTeamsConfig *MSTeamsConfig `json:"msteamsConfig,omitempty"`
|
||||
}
|
||||
|
||||
func (n *NotifierSpec) ObjClusterName() string {
|
||||
@ -350,6 +352,8 @@ type Notification struct {
|
||||
PagerdutyConfig *PagerdutyConfig `json:"pagerdutyConfig,omitempty"`
|
||||
WebhookConfig *WebhookConfig `json:"webhookConfig,omitempty"`
|
||||
WechatConfig *WechatConfig `json:"wechatConfig,omitempty"`
|
||||
DingtalkConfig *DingtalkConfig `json:"dingtalkConfig,omitempty"`
|
||||
MSTeamsConfig *MSTeamsConfig `json:"msteamsConfig,omitempty"`
|
||||
}
|
||||
|
||||
type SMTPConfig struct {
|
||||
@ -378,6 +382,17 @@ type WebhookConfig struct {
|
||||
*HTTPClientConfig
|
||||
}
|
||||
|
||||
type DingtalkConfig struct {
|
||||
URL string `json:"url,omitempty" norman:"required"`
|
||||
Secret string `json:"secret,omitempty" norman:"type=password"`
|
||||
*HTTPClientConfig
|
||||
}
|
||||
|
||||
type MSTeamsConfig struct {
|
||||
URL string `json:"url,omitempty" norman:"required"`
|
||||
*HTTPClientConfig
|
||||
}
|
||||
|
||||
type WechatConfig struct {
|
||||
DefaultRecipient string `json:"defaultRecipient,omitempty" norman:"required"`
|
||||
Secret string `json:"secret,omitempty" norman:"type=password,required"`
|
||||
|
Loading…
Reference in New Issue
Block a user