v2beta2

package
v0.0.0-...-c9a0395 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 25

Documentation

Overview

Package v2beta2 contains API Schema definitions for the notification v2beta2 API group +groupName=notification.kubesphere.io +genclient +genclient:nonNamespaced

Package v2beta2 contains API Schema definitions for the notification v1alpha1 API group +kubebuilder:object:generate=true +groupName=notification.kubesphere.io

Index

Constants

View Source
const (
	ResourceKindNotificationManager      = "NotificationManagers"
	ResourcesSingularNotificationManager = "notificationmanager"
	ResourcesPluralNotificationManager   = "notificationmanagers"

	ResourceKindConfig      = "Configs"
	ResourcesSingularConfig = "config"
	ResourcesPluralConfig   = "configs"

	ResourceKindReceiver      = "Receiver"
	ResourcesSingularReceiver = "receiver"
	ResourcesPluralReceiver   = "receivers"

	ResourceKindRouter      = "Router"
	ResourcesSingularRouter = "router"
	ResourcesPluralRouter   = "routers"

	ResourceKindSilence      = "Silence"
	ResourcesSingularSilence = "silence"
	ResourcesPluralSilence   = "silences"
)
View Source
const (
	Tenant = "tenant"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "notification.kubesphere.io", Version: "v2beta2"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Types

type AWSSMS

type AWSSMS struct {
	Region          string      `json:"region,omitempty"`
	AccessKeyId     *Credential `json:"accessKeyId"`
	SecretAccessKey *Credential `json:"secretAccessKey"`
}

Sms AWS provider parameters

func (*AWSSMS) DeepCopy

func (in *AWSSMS) DeepCopy() *AWSSMS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSSMS.

func (*AWSSMS) DeepCopyInto

func (in *AWSSMS) DeepCopyInto(out *AWSSMS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AliyunSMS

type AliyunSMS struct {
	SignName        string      `json:"signName"`
	TemplateCode    string      `json:"templateCode,omitempty"`
	AccessKeyId     *Credential `json:"accessKeyId"`
	AccessKeySecret *Credential `json:"accessKeySecret"`
}

Sms Aliyun provider parameters

func (*AliyunSMS) DeepCopy

func (in *AliyunSMS) DeepCopy() *AliyunSMS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliyunSMS.

func (*AliyunSMS) DeepCopyInto

func (in *AliyunSMS) DeepCopyInto(out *AliyunSMS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BasicAuth

type BasicAuth struct {
	Username string      `json:"username"`
	Password *Credential `json:"password,omitempty"`
}

BasicAuth contains basic HTTP authentication credentials.

func (*BasicAuth) DeepCopy

func (in *BasicAuth) DeepCopy() *BasicAuth

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth.

func (*BasicAuth) DeepCopyInto

func (in *BasicAuth) DeepCopyInto(out *BasicAuth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Channel

type Channel struct {
	Tenant string `json:"tenant"`
	// Receiver type, known values are dingtalk, email, feishu, slack, sms, pushover, webhook, wechat.
	Type []string `json:"type,omitempty"`
}

type ClientCertificate

type ClientCertificate struct {
	// The client cert file for the targets.
	Cert *Credential `json:"cert"`
	// The client key file for the targets.
	Key *Credential `json:"key"`
}

func (*ClientCertificate) DeepCopy

func (in *ClientCertificate) DeepCopy() *ClientCertificate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientCertificate.

func (*ClientCertificate) DeepCopyInto

func (in *ClientCertificate) DeepCopyInto(out *ClientCertificate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Config

type Config struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ConfigSpec   `json:"spec,omitempty"`
	Status ConfigStatus `json:"status,omitempty"`
}

Config is the Schema for the configs API

func (*Config) ConvertFrom

func (dst *Config) ConvertFrom(srcRaw conversion.Hub) error

ConvertFrom converts from the Hub version (v2beta1) to this version.

func (*Config) ConvertTo

func (src *Config) ConvertTo(dstRaw conversion.Hub) error

ConvertTo converts this Config to the Hub version (v2beta1).

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Config) DeepCopyObject

func (in *Config) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConfigList

type ConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Config `json:"items"`
}

ConfigList contains a list of Config

func (*ConfigList) DeepCopy

func (in *ConfigList) DeepCopy() *ConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList.

func (*ConfigList) DeepCopyInto

func (in *ConfigList) DeepCopyInto(out *ConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConfigList) DeepCopyObject

func (in *ConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConfigSpec

type ConfigSpec struct {
	DingTalk *DingTalkConfig `json:"dingtalk,omitempty"`
	Email    *EmailConfig    `json:"email,omitempty"`
	Slack    *SlackConfig    `json:"slack,omitempty"`
	Webhook  *WebhookConfig  `json:"webhook,omitempty"`
	Wechat   *WechatConfig   `json:"wechat,omitempty"`
	Sms      *SmsConfig      `json:"sms,omitempty"`
	Pushover *PushoverConfig `json:"pushover,omitempty"`
	Feishu   *FeishuConfig   `json:"feishu,omitempty"`
}

ConfigSpec defines the desired state of Config

func (*ConfigSpec) DeepCopy

func (in *ConfigSpec) DeepCopy() *ConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec.

func (*ConfigSpec) DeepCopyInto

func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigStatus

type ConfigStatus struct {
}

ConfigStatus defines the observed state of Config

func (*ConfigStatus) DeepCopy

func (in *ConfigStatus) DeepCopy() *ConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus.

func (*ConfigStatus) DeepCopyInto

func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigmapKeySelector

type ConfigmapKeySelector struct {
	// The namespace of the configmap, default to the `defaultSecretNamespace` of `NotificationManager` crd.
	// If the `defaultSecretNamespace` does not set, default to the pod's namespace.
	// +optional
	Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
	// Name of the configmap.
	Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
	// The key of the configmap to select from.  Must be a valid configmap key.
	Key string `json:"key,omitempty" protobuf:"bytes,2,opt,name=key"`
}

ConfigmapKeySelector selects a key of a Configmap.

func (*ConfigmapKeySelector) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigmapKeySelector.

func (*ConfigmapKeySelector) DeepCopyInto

func (in *ConfigmapKeySelector) DeepCopyInto(out *ConfigmapKeySelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Credential

type Credential struct {
	// +optional
	Value     string       `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
	ValueFrom *ValueSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"`
}

func (*Credential) DeepCopy

func (in *Credential) DeepCopy() *Credential

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Credential.

func (*Credential) DeepCopyInto

func (in *Credential) DeepCopyInto(out *Credential)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DingTalkApplicationConfig

type DingTalkApplicationConfig struct {
	// The key of the application with which to send messages.
	AppKey *Credential `json:"appkey"`
	// The key in the secret to be used. Must be a valid secret key.
	AppSecret *Credential `json:"appsecret"`
}

DingTalkApplicationConfig it th configuration of conversation

func (*DingTalkApplicationConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DingTalkApplicationConfig.

func (*DingTalkApplicationConfig) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DingTalkChatBot

type DingTalkChatBot struct {
	// The webhook of ChatBot which the message will send to.
	Webhook *Credential `json:"webhook"`

	// Custom keywords of ChatBot
	Keywords []string `json:"keywords,omitempty"`

	// Secret of ChatBot, you can get it after enabled Additional Signature of ChatBot.
	Secret *Credential `json:"secret,omitempty"`
	// The phone numbers of the users which will be @.
	AtMobiles []string `json:"atMobiles,omitempty"`
	// The users who will be @.
	AtUsers []string `json:"atUsers,omitempty"`
	// Whether @everyone.
	AtAll bool `json:"atAll,omitempty"`
}

DingTalkChatBot is the configuration of ChatBot

func (*DingTalkChatBot) DeepCopy

func (in *DingTalkChatBot) DeepCopy() *DingTalkChatBot

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DingTalkChatBot.

func (*DingTalkChatBot) DeepCopyInto

func (in *DingTalkChatBot) DeepCopyInto(out *DingTalkChatBot)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DingTalkConfig

type DingTalkConfig struct {
	Labels map[string]string `json:"labels,omitempty"`
	// Only needed when send alerts to the conversation.
	Conversation *DingTalkApplicationConfig `json:"conversation,omitempty"`
}

func (*DingTalkConfig) DeepCopy

func (in *DingTalkConfig) DeepCopy() *DingTalkConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DingTalkConfig.

func (*DingTalkConfig) DeepCopyInto

func (in *DingTalkConfig) DeepCopyInto(out *DingTalkConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DingTalkConversation

type DingTalkConversation struct {
	ChatIDs []string `json:"chatids"`
}

DingTalkConversation of conversation

func (*DingTalkConversation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DingTalkConversation.

func (*DingTalkConversation) DeepCopyInto

func (in *DingTalkConversation) DeepCopyInto(out *DingTalkConversation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DingTalkOptions

type DingTalkOptions struct {
	// Notification Sending Timeout
	NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
	// The name of the template to generate DingTalk message.
	// If the global template is not set, it will use default.
	Template string `json:"template,omitempty"`
	// The name of the template to generate markdown title
	TitleTemplate string `json:"titleTemplate,omitempty"`
	// template type: text or markdown, default type is text
	TmplType string `json:"tmplType,omitempty"`
	// The time of token expired.
	TokenExpires time.Duration `json:"tokenExpires,omitempty"`
	// The maximum message size that can be sent to conversation in a request.
	ConversationMessageMaxSize int `json:"conversationMessageMaxSize,omitempty"`
	// The maximum message size that can be sent to chatbot in a request.
	ChatbotMessageMaxSize int `json:"chatbotMessageMaxSize,omitempty"`
	// The flow control for chatbot.
	ChatBotThrottle *Throttle `json:"chatBotThrottle,omitempty"`
	// The flow control for conversation.
	ConversationThrottle *Throttle `json:"conversationThrottle,omitempty"`
}

func (*DingTalkOptions) DeepCopy

func (in *DingTalkOptions) DeepCopy() *DingTalkOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DingTalkOptions.

func (*DingTalkOptions) DeepCopyInto

func (in *DingTalkOptions) DeepCopyInto(out *DingTalkOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DingTalkReceiver

type DingTalkReceiver struct {
	// whether the receiver is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// DingTalkConfig to be selected for this receiver
	DingTalkConfigSelector *metav1.LabelSelector `json:"dingtalkConfigSelector,omitempty"`
	// Selector to filter alerts.
	AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
	// Be careful, a ChatBot only can send 20 message per minute.
	ChatBot *DingTalkChatBot `json:"chatbot,omitempty"`
	// The conversation which message will send to.
	Conversation *DingTalkConversation `json:"conversation,omitempty"`
	// The name of the template to generate notification.
	// If the global template is not set, it will use default.
	Template *string `json:"template,omitempty"`
	// The name of the template to generate markdown title
	TitleTemplate *string `json:"titleTemplate,omitempty"`
	// template type: text or markdown
	TmplType *string `json:"tmplType,omitempty"`
	// Template file.
	TmplText *ConfigmapKeySelector `json:"tmplText,omitempty"`
}

func (*DingTalkReceiver) DeepCopy

func (in *DingTalkReceiver) DeepCopy() *DingTalkReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DingTalkReceiver.

func (*DingTalkReceiver) DeepCopyInto

func (in *DingTalkReceiver) DeepCopyInto(out *DingTalkReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EmailConfig

type EmailConfig struct {
	Labels map[string]string `json:"labels,omitempty"`
	// The sender address.
	From string `json:"from"`
	// The address of the SMTP server.
	SmartHost HostPort `json:"smartHost"`
	// The hostname to use when identifying to the SMTP server.
	Hello *string `json:"hello,omitempty"`
	// The username for CRAM-MD5, LOGIN and PLAIN authentications.
	AuthUsername *string `json:"authUsername,omitempty"`
	// The identity for PLAIN authentication.
	AuthIdentify *string `json:"authIdentify,omitempty"`
	// The secret contains the SMTP password for LOGIN and PLAIN authentications.
	AuthPassword *Credential `json:"authPassword,omitempty"`
	// The secret contains the SMTP secret for CRAM-MD5 authentication.
	AuthSecret *Credential `json:"authSecret,omitempty"`
	// The default SMTP TLS requirement.
	RequireTLS *bool      `json:"requireTLS,omitempty"`
	TLS        *TLSConfig `json:"tls,omitempty"`
}

func (*EmailConfig) DeepCopy

func (in *EmailConfig) DeepCopy() *EmailConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmailConfig.

func (*EmailConfig) DeepCopyInto

func (in *EmailConfig) DeepCopyInto(out *EmailConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EmailOptions

type EmailOptions struct {
	// Notification Sending Timeout
	NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
	// Deprecated
	DeliveryType string `json:"deliveryType,omitempty"`
	// The maximum size of receivers in one email.
	MaxEmailReceivers int `json:"maxEmailReceivers,omitempty"`
	// The name of the template to generate email message.
	// If the global template is not set, it will use default.
	Template string `json:"template,omitempty"`
	// The name of the template to generate email subject
	SubjectTemplate string `json:"subjectTemplate,omitempty"`
	// template type: text or html, default type is html
	TmplType string `json:"tmplType,omitempty"`
}

func (*EmailOptions) DeepCopy

func (in *EmailOptions) DeepCopy() *EmailOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmailOptions.

func (*EmailOptions) DeepCopyInto

func (in *EmailOptions) DeepCopyInto(out *EmailOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EmailReceiver

type EmailReceiver struct {
	// whether the receiver is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// Receivers' email addresses
	To []string `json:"to"`
	// EmailConfig to be selected for this receiver
	EmailConfigSelector *metav1.LabelSelector `json:"emailConfigSelector,omitempty"`
	// Selector to filter alerts.
	AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
	// The name of the template to generate notification.
	// If the global template is not set, it will use default.
	Template *string `json:"template,omitempty"`
	// The name of the template to generate email subject
	SubjectTemplate *string `json:"subjectTemplate,omitempty"`
	// template type: text or html, default type is html
	TmplType *string `json:"tmplType,omitempty"`
	// Template file.
	TmplText *ConfigmapKeySelector `json:"tmplText,omitempty"`
}

func (*EmailReceiver) DeepCopy

func (in *EmailReceiver) DeepCopy() *EmailReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmailReceiver.

func (*EmailReceiver) DeepCopyInto

func (in *EmailReceiver) DeepCopyInto(out *EmailReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeishuChatBot

type FeishuChatBot struct {
	// The webhook of the ChatBot to which the message will be sent.
	Webhook *Credential `json:"webhook"`

	// Custom keywords of ChatBot
	Keywords []string `json:"keywords,omitempty"`

	// Secret of ChatBot, you can get it after enabling signature verification of ChatBot.
	Secret *Credential `json:"secret,omitempty"`
}

FeishuChatBot is the configuration of ChatBot

func (*FeishuChatBot) DeepCopy

func (in *FeishuChatBot) DeepCopy() *FeishuChatBot

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeishuChatBot.

func (*FeishuChatBot) DeepCopyInto

func (in *FeishuChatBot) DeepCopyInto(out *FeishuChatBot)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeishuConfig

type FeishuConfig struct {
	// The id of the application with which to send messages.
	AppID *Credential `json:"appID"`
	// The key in the secret to be used. Must be a valid secret key.
	AppSecret *Credential `json:"appSecret"`
}

FeishuConfig is the configuration of feishu application

func (*FeishuConfig) DeepCopy

func (in *FeishuConfig) DeepCopy() *FeishuConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeishuConfig.

func (*FeishuConfig) DeepCopyInto

func (in *FeishuConfig) DeepCopyInto(out *FeishuConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeishuOptions

type FeishuOptions struct {
	// Notification Sending Timeout
	NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
	// The name of the template to generate DingTalk message.
	// If the global template is not set, it will use default.
	Template string `json:"template,omitempty"`
	// template type: text or post, default type is post
	TmplType string `json:"tmplType,omitempty"`
	// The time of token expired.
	TokenExpires time.Duration `json:"tokenExpires,omitempty"`
}

func (*FeishuOptions) DeepCopy

func (in *FeishuOptions) DeepCopy() *FeishuOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeishuOptions.

func (*FeishuOptions) DeepCopyInto

func (in *FeishuOptions) DeepCopyInto(out *FeishuOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeishuReceiver

type FeishuReceiver struct {
	// whether the receiver is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// FeishuConfig to be selected for this receiver
	FeishuConfigSelector *metav1.LabelSelector `json:"feishuConfigSelector,omitempty"`
	// Selector to filter alerts.
	AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
	// +optional
	// +kubebuilder:validation:MaxItems=200
	User []string `json:"user,omitempty"`
	// +optional
	// +kubebuilder:validation:MaxItems=200
	Department []string       `json:"department,omitempty"`
	ChatBot    *FeishuChatBot `json:"chatbot,omitempty"`
	// The name of the template to generate notification.
	// If the global template is not set, it will use default.
	Template *string `json:"template,omitempty"`
	// template type: text or post, default type is post
	TmplType *string `json:"tmplType,omitempty"`
	// Template file.
	TmplText *ConfigmapKeySelector `json:"tmplText,omitempty"`
}

func (*FeishuReceiver) DeepCopy

func (in *FeishuReceiver) DeepCopy() *FeishuReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeishuReceiver.

func (*FeishuReceiver) DeepCopyInto

func (in *FeishuReceiver) DeepCopyInto(out *FeishuReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GlobalOptions

type GlobalOptions struct {
	// Template file path, must be an absolute path.
	//
	// Deprecated
	TemplateFiles []string `json:"templateFile,omitempty"`
	// The name of the template to generate message.
	// If the receiver dose not setup template, it will use this.
	Template string `json:"template,omitempty"`
	// The name of the cluster in which the notification manager is deployed.
	Cluster string `json:"cluster,omitempty"`
}

func (*GlobalOptions) DeepCopy

func (in *GlobalOptions) DeepCopy() *GlobalOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalOptions.

func (*GlobalOptions) DeepCopyInto

func (in *GlobalOptions) DeepCopyInto(out *GlobalOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPClientConfig

type HTTPClientConfig struct {
	// The HTTP basic authentication credentials for the targets.
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// The bearer token for the targets.
	BearerToken *Credential `json:"bearerToken,omitempty"`
	// HTTP proxy server to use to connect to the targets.
	ProxyURL string `json:"proxyUrl,omitempty"`
	// TLSConfig to use to connect to the targets.
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
}

HTTPClientConfig configures an HTTP client.

func (*HTTPClientConfig) DeepCopy

func (in *HTTPClientConfig) DeepCopy() *HTTPClientConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPClientConfig.

func (*HTTPClientConfig) DeepCopyInto

func (in *HTTPClientConfig) DeepCopyInto(out *HTTPClientConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HistoryReceiver

type HistoryReceiver struct {
	// Use a webhook to collect notification history, it will create a virtual receiver.
	Webhook *WebhookReceiver `json:"webhook"`
}

HistoryReceiver used to collect notification history.

func (*HistoryReceiver) DeepCopy

func (in *HistoryReceiver) DeepCopy() *HistoryReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HistoryReceiver.

func (*HistoryReceiver) DeepCopyInto

func (in *HistoryReceiver) DeepCopyInto(out *HistoryReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HostPort

type HostPort struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

func (*HostPort) DeepCopy

func (in *HostPort) DeepCopy() *HostPort

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPort.

func (*HostPort) DeepCopyInto

func (in *HostPort) DeepCopyInto(out *HostPort)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HuaweiSMS

type HuaweiSMS struct {
	Url        string      `json:"url,omitempty"`
	Signature  string      `json:"signature"`
	TemplateId string      `json:"templateId"`
	Sender     string      `json:"sender"`
	AppSecret  *Credential `json:"appSecret"`
	AppKey     *Credential `json:"appKey"`
}

Sms huawei provider parameters

func (*HuaweiSMS) DeepCopy

func (in *HuaweiSMS) DeepCopy() *HuaweiSMS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HuaweiSMS.

func (*HuaweiSMS) DeepCopyInto

func (in *HuaweiSMS) DeepCopyInto(out *HuaweiSMS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NotificationManager

type NotificationManager struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NotificationManagerSpec   `json:"spec,omitempty"`
	Status NotificationManagerStatus `json:"status,omitempty"`
}

NotificationManager is the Schema for the notificationmanagers API

func (*NotificationManager) DeepCopy

func (in *NotificationManager) DeepCopy() *NotificationManager

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationManager.

func (*NotificationManager) DeepCopyInto

func (in *NotificationManager) DeepCopyInto(out *NotificationManager)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NotificationManager) DeepCopyObject

func (in *NotificationManager) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NotificationManagerList

type NotificationManagerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NotificationManager `json:"items"`
}

NotificationManagerList contains a list of NotificationManager

func (*NotificationManagerList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationManagerList.

func (*NotificationManagerList) DeepCopyInto

func (in *NotificationManagerList) DeepCopyInto(out *NotificationManagerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NotificationManagerList) DeepCopyObject

func (in *NotificationManagerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NotificationManagerSpec

type NotificationManagerSpec struct {
	// Compute Resources required by container.
	Resources v1.ResourceRequirements `json:"resources,omitempty"`
	// Docker Image used to start Notification Manager container,
	// for example kubesphere/notification-manager:v0.1.0
	Image *string `json:"image,omitempty"`
	// Image pull policy. One of Always, Never, IfNotPresent.
	// Defaults to IfNotPresent if not specified
	ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// Number of instances to deploy for Notification Manager deployment.
	Replicas *int32 `json:"replicas,omitempty"`
	// Define which Nodes the Pods will be scheduled to.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Pod's scheduling constraints.
	Affinity *v1.Affinity `json:"affinity,omitempty"`
	// Pod's toleration.
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`
	// ServiceAccountName is the name of the ServiceAccount to use to run Notification Manager Pods.
	// ServiceAccount 'default' in notification manager's namespace will be used if not specified.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// Port name used for the pods and service, defaults to webhook
	PortName string `json:"portName,omitempty"`
	// Default Email/WeChat/Slack/Webhook Config to be selected
	DefaultConfigSelector *metav1.LabelSelector `json:"defaultConfigSelector,omitempty"`
	// Receivers to send notifications to
	Receivers *ReceiversSpec `json:"receivers"`
	// The default namespace to which notification manager secrets belong.
	DefaultSecretNamespace string `json:"defaultSecretNamespace,omitempty"`
	// List of volumes that can be mounted by containers belonging to the pod.
	Volumes []v1.Volume `json:"volumes,omitempty"`
	// Pod volumes to mount into the container's filesystem.
	// Cannot be updated.
	VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
	// Arguments to the entrypoint.
	// The docker image's CMD is used if this is not provided.
	// +optional
	Args []string `json:"args,omitempty"`
	// Sidecar containers. The key is the type of sidecar, known value include: tenant.
	// Tenant sidecar used to manage the tenants which will receive notifications.
	// It needs to provide the API `/api/v2/tenant` at port `19094`, this api receives
	// a parameter `namespace` and return all tenants which need to receive notifications in this namespace.
	Sidecars map[string]*Sidecar `json:"sidecars,omitempty"`
	// History used to collect notification history.
	History *HistoryReceiver `json:"history,omitempty"`
	// Labels for grouping notifiations.
	GroupLabels []string `json:"groupLabels,omitempty"`
	// The maximum size of a batch. A batch used to buffer alerts and asynchronously process them.
	//
	// +kubebuilder:default=100
	BatchMaxSize int `json:"batchMaxSize,omitempty"`
	// The amount of time to wait before force processing the batch that hadn't reached the max size.
	//
	// +kubebuilder:default="1m"
	BatchMaxWait metav1.Duration `json:"batchMaxWait,omitempty"`
	// The RoutePolicy determines how to find receivers to which notifications will be sent.
	// Valid RoutePolicy include All, RouterFirst, and RouterOnly.
	// All: The alerts will be sent to the receivers that match any router,
	// and also will be sent to the receivers of those tenants with the right to access the namespace to which the alert belongs.
	// RouterFirst: The alerts will be sent to the receivers that match any router first.
	// If no receivers match any router, alerts will send to the receivers of those tenants with the right to access the namespace to which the alert belongs.
	// RouterOnly: The alerts will only be sent to the receivers that match any router.
	//
	// +kubebuilder:default=All
	RoutePolicy string `json:"routePolicy,omitempty"`
	// Template used to define information about templates
	Template *Template `json:"template,omitempty"`
}

NotificationManagerSpec defines the desired state of NotificationManager

func (*NotificationManagerSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationManagerSpec.

func (*NotificationManagerSpec) DeepCopyInto

func (in *NotificationManagerSpec) DeepCopyInto(out *NotificationManagerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NotificationManagerStatus

type NotificationManagerStatus struct {
}

NotificationManagerStatus defines the observed state of NotificationManager

func (*NotificationManagerStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationManagerStatus.

func (*NotificationManagerStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Options

type Options struct {
	Global   *GlobalOptions   `json:"global,omitempty"`
	Email    *EmailOptions    `json:"email,omitempty"`
	Wechat   *WechatOptions   `json:"wechat,omitempty"`
	Slack    *SlackOptions    `json:"slack,omitempty"`
	Webhook  *WebhookOptions  `json:"webhook,omitempty"`
	DingTalk *DingTalkOptions `json:"dingtalk,omitempty"`
	Sms      *SmsOptions      `json:"sms,omitempty"`
	Pushover *PushoverOptions `json:"pushover,omitempty"`
	Feishu   *FeishuOptions   `json:"feishu,omitempty"`
}

func (*Options) DeepCopy

func (in *Options) DeepCopy() *Options

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Options.

func (*Options) DeepCopyInto

func (in *Options) DeepCopyInto(out *Options)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Providers

type Providers struct {
	Aliyun  *AliyunSMS  `json:"aliyun,omitempty"`
	Tencent *TencentSMS `json:"tencent,omitempty"`
	Huawei  *HuaweiSMS  `json:"huawei,omitempty"`
	AWS     *AWSSMS     `json:"aws,omitempty"`
}

func (*Providers) DeepCopy

func (in *Providers) DeepCopy() *Providers

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Providers.

func (*Providers) DeepCopyInto

func (in *Providers) DeepCopyInto(out *Providers)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PushoverConfig

type PushoverConfig struct {
	Labels map[string]string `json:"labels,omitempty"`
	// The token of a pushover application.
	PushoverTokenSecret *Credential `json:"pushoverTokenSecret"`
}

func (*PushoverConfig) DeepCopy

func (in *PushoverConfig) DeepCopy() *PushoverConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushoverConfig.

func (*PushoverConfig) DeepCopyInto

func (in *PushoverConfig) DeepCopyInto(out *PushoverConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PushoverOptions

type PushoverOptions struct {
	// Notification Sending Timeout
	NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
	// The name of the template to generate pushover message.
	// If the global template is not set, it will use default.
	Template string `json:"template,omitempty"`
	// The name of the template to generate message title
	TitleTemplate string `json:"titleTemplate,omitempty"`
}

func (*PushoverOptions) DeepCopy

func (in *PushoverOptions) DeepCopy() *PushoverOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushoverOptions.

func (*PushoverOptions) DeepCopyInto

func (in *PushoverOptions) DeepCopyInto(out *PushoverOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PushoverReceiver

type PushoverReceiver struct {
	// whether the receiver is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// PushoverConfig to be selected for this receiver
	PushoverConfigSelector *metav1.LabelSelector `json:"pushoverConfigSelector,omitempty"`
	// Selector to filter alerts.
	AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
	// The name of the template to generate notification.
	// If the global template is not set, it will use default.
	Template *string `json:"template,omitempty"`
	// The name of the template to generate message title
	TitleTemplate *string `json:"titleTemplate,omitempty"`
	// The users profile.
	Profiles []*PushoverUserProfile `json:"profiles"`
	// Template file.
	TmplText *ConfigmapKeySelector `json:"tmplText,omitempty"`
}

func (*PushoverReceiver) DeepCopy

func (in *PushoverReceiver) DeepCopy() *PushoverReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushoverReceiver.

func (*PushoverReceiver) DeepCopyInto

func (in *PushoverReceiver) DeepCopyInto(out *PushoverReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PushoverUserProfile

type PushoverUserProfile struct {
	// UserKey is the user (Pushover User Key) to send notifications to.
	// +kubebuilder:validation:Pattern=`^[A-Za-z0-9]{30}$`
	UserKey *string `json:"userKey"`
	// Devices refers to device name to send the message directly to that device, rather than all of the user's devices
	Devices []string `json:"devices,omitempty"`
	// Title refers to message's title, otherwise your app's name is used.
	// it is deprecated, now the title will be generated by the title template.
	//
	// Deprecated
	Title *string `json:"title,omitempty"`
	// Sound refers to the name of one of the sounds (https://pushover.net/api#sounds) supported by device clients
	Sound *string `json:"sound,omitempty"`
}

PushoverUserProfile includes userKey and other preferences

func (*PushoverUserProfile) DeepCopy

func (in *PushoverUserProfile) DeepCopy() *PushoverUserProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushoverUserProfile.

func (*PushoverUserProfile) DeepCopyInto

func (in *PushoverUserProfile) DeepCopyInto(out *PushoverUserProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Receiver

type Receiver struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ReceiverSpec   `json:"spec,omitempty"`
	Status ReceiverStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,shortName=nr,categories=notification-manager +kubebuilder:subresource:status +kubebuilder:storageversion +genclient +genclient:nonNamespaced Receiver is the Schema for the receivers API

func (*Receiver) ConvertFrom

func (dst *Receiver) ConvertFrom(srcRaw conversion.Hub) error

ConvertFrom converts from the Hub version (v2beta1) to this version.

func (*Receiver) ConvertTo

func (src *Receiver) ConvertTo(dstRaw conversion.Hub) error

ConvertTo converts this Config to the Hub version (v2beta1).

func (*Receiver) DeepCopy

func (in *Receiver) DeepCopy() *Receiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Receiver.

func (*Receiver) DeepCopyInto

func (in *Receiver) DeepCopyInto(out *Receiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Receiver) DeepCopyObject

func (in *Receiver) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ReceiverList

type ReceiverList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Receiver `json:"items"`
}

ReceiverList contains a list of Receiver

func (*ReceiverList) DeepCopy

func (in *ReceiverList) DeepCopy() *ReceiverList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReceiverList.

func (*ReceiverList) DeepCopyInto

func (in *ReceiverList) DeepCopyInto(out *ReceiverList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ReceiverList) DeepCopyObject

func (in *ReceiverList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ReceiverSelector

type ReceiverSelector struct {
	Name      []string              `json:"name,omitempty"`
	RegexName string                `json:"regexName,omitempty"`
	Selector  *metav1.LabelSelector `json:"selector,omitempty"`
	Channels  []Channel             `json:"channels,omitempty"`
	// Receiver type, known values are dingtalk, email, feishu, slack, sms, pushover, webhook, wechat.
	Type string `json:"type,omitempty"`
}

func (*ReceiverSelector) DeepCopy

func (in *ReceiverSelector) DeepCopy() *ReceiverSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReceiverSelector.

func (*ReceiverSelector) DeepCopyInto

func (in *ReceiverSelector) DeepCopyInto(out *ReceiverSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReceiverSpec

type ReceiverSpec struct {
	DingTalk *DingTalkReceiver `json:"dingtalk,omitempty"`
	Email    *EmailReceiver    `json:"email,omitempty"`
	Slack    *SlackReceiver    `json:"slack,omitempty"`
	Webhook  *WebhookReceiver  `json:"webhook,omitempty"`
	Wechat   *WechatReceiver   `json:"wechat,omitempty"`
	Sms      *SmsReceiver      `json:"sms,omitempty"`
	Pushover *PushoverReceiver `json:"pushover,omitempty"`
	Feishu   *FeishuReceiver   `json:"feishu,omitempty"`
}

ReceiverSpec defines the desired state of Receiver

func (*ReceiverSpec) DeepCopy

func (in *ReceiverSpec) DeepCopy() *ReceiverSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReceiverSpec.

func (*ReceiverSpec) DeepCopyInto

func (in *ReceiverSpec) DeepCopyInto(out *ReceiverSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReceiverStatus

type ReceiverStatus struct {
}

ReceiverStatus defines the observed state of Receiver

func (*ReceiverStatus) DeepCopy

func (in *ReceiverStatus) DeepCopy() *ReceiverStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReceiverStatus.

func (*ReceiverStatus) DeepCopyInto

func (in *ReceiverStatus) DeepCopyInto(out *ReceiverStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReceiversSpec

type ReceiversSpec struct {
	// Key used to identify tenant, default to be "namespace" if not specified
	TenantKey string `json:"tenantKey"`
	// Selector to find global notification receivers
	// which will be used when tenant receivers cannot be found.
	// Only matchLabels expression is allowed.
	GlobalReceiverSelector *metav1.LabelSelector `json:"globalReceiverSelector"`
	// Selector to find tenant notification receivers.
	// Only matchLabels expression is allowed.
	TenantReceiverSelector *metav1.LabelSelector `json:"tenantReceiverSelector"`
	// Various receiver options
	Options *Options `json:"options,omitempty"`
}

func (*ReceiversSpec) DeepCopy

func (in *ReceiversSpec) DeepCopy() *ReceiversSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReceiversSpec.

func (*ReceiversSpec) DeepCopyInto

func (in *ReceiversSpec) DeepCopyInto(out *ReceiversSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Router

type Router struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RouterSpec   `json:"spec,omitempty"`
	Status RouterStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,categories=notification-manager +kubebuilder:subresource:status +kubebuilder:storageversion +genclient +genclient:nonNamespaced Router is the Schema for the router API

func (*Router) DeepCopy

func (in *Router) DeepCopy() *Router

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Router.

func (*Router) DeepCopyInto

func (in *Router) DeepCopyInto(out *Router)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Router) DeepCopyObject

func (in *Router) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RouterList

type RouterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Router `json:"items"`
}

RouterList contains a list of Router

func (*RouterList) DeepCopy

func (in *RouterList) DeepCopy() *RouterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterList.

func (*RouterList) DeepCopyInto

func (in *RouterList) DeepCopyInto(out *RouterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RouterList) DeepCopyObject

func (in *RouterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RouterSpec

type RouterSpec struct {
	// whether the router is enabled
	Enabled       *bool                 `json:"enabled,omitempty"`
	AlertSelector *metav1.LabelSelector `json:"alertSelector"`
	// Receivers which need to receive the matched alert.
	Receivers ReceiverSelector `json:"receivers"`
}

RouterSpec defines the desired state of Router

func (*RouterSpec) DeepCopy

func (in *RouterSpec) DeepCopy() *RouterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterSpec.

func (*RouterSpec) DeepCopyInto

func (in *RouterSpec) DeepCopyInto(out *RouterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouterStatus

type RouterStatus struct {
}

RouterStatus defines the observed state of Router

func (*RouterStatus) DeepCopy

func (in *RouterStatus) DeepCopy() *RouterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterStatus.

func (*RouterStatus) DeepCopyInto

func (in *RouterStatus) DeepCopyInto(out *RouterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecretKeySelector

type SecretKeySelector struct {
	// The namespace of the secret, default to the `defaultSecretNamespace` of `NotificationManager` crd.
	// If the `defaultSecretNamespace` does not set, default to the pod's namespace.
	// +optional
	Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
	// Name of the secret.
	Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
	// The key of the secret to select from.  Must be a valid secret key.
	Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
}

SecretKeySelector selects a key of a Secret.

func (*SecretKeySelector) DeepCopy

func (in *SecretKeySelector) DeepCopy() *SecretKeySelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.

func (*SecretKeySelector) DeepCopyInto

func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceReference

type ServiceReference struct {
	// `namespace` is the namespace of the service.
	// Required
	Namespace string `json:"namespace"`

	// `name` is the name of the service.
	// Required
	Name string `json:"name"`

	// `path` is an optional URL path which will be sent in any request to
	// this service.
	// +optional
	Path *string `json:"path,omitempty"`

	// If specified, the port on the service that hosting webhook.
	// Default to 443 for backward compatibility.
	// `port` should be a valid port number (1-65535, inclusive).
	// +optional
	Port *int32 `json:"port,omitempty"`

	// Http scheme, default is http.
	// +optional
	Scheme *string `json:"scheme,omitempty"`
}

ServiceReference holds a reference to Service.legacy.k8s.io

func (*ServiceReference) DeepCopy

func (in *ServiceReference) DeepCopy() *ServiceReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.

func (*ServiceReference) DeepCopyInto

func (in *ServiceReference) DeepCopyInto(out *ServiceReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Sidecar

type Sidecar struct {
	// The type of sidecar, it can be specified to any value.
	// Notification manager built-in sidecar for KubeSphere,
	// It can be used with set `type` to `kubesphere`.
	Type string `json:"type" protobuf:"bytes,2,opt,name=type"`
	// Container of sidecar.
	*v1.Container `json:",inline"`
}

Sidecar defines a sidecar container which will be added to the notification manager deployment pod.

func (*Sidecar) DeepCopy

func (in *Sidecar) DeepCopy() *Sidecar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.

func (*Sidecar) DeepCopyInto

func (in *Sidecar) DeepCopyInto(out *Sidecar)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Silence

type Silence struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   SilenceSpec   `json:"spec,omitempty"`
	Status SilenceStatus `json:"status,omitempty"`
}

Silence is the Schema for the Silence API

func (*Silence) DeepCopy

func (in *Silence) DeepCopy() *Silence

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Silence.

func (*Silence) DeepCopyInto

func (in *Silence) DeepCopyInto(out *Silence)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Silence) DeepCopyObject

func (in *Silence) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Silence) IsActive

func (s *Silence) IsActive() bool

type SilenceList

type SilenceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Silence `json:"items"`
}

SilenceList contains a list of Silence

func (*SilenceList) DeepCopy

func (in *SilenceList) DeepCopy() *SilenceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SilenceList.

func (*SilenceList) DeepCopyInto

func (in *SilenceList) DeepCopyInto(out *SilenceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SilenceList) DeepCopyObject

func (in *SilenceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SilenceSpec

type SilenceSpec struct {
	// whether the silence is enabled
	Enabled *bool                 `json:"enabled,omitempty"`
	Matcher *metav1.LabelSelector `json:"matcher"`
	// The start time during which the silence is active.
	//
	// +kubebuilder:validation:Format: date-time
	StartsAt *metav1.Time `json:"startsAt,omitempty"`
	// The schedule in Cron format.
	// If set the silence will be active periodicity, and the startsAt will be invalid.
	Schedule string `json:"schedule,omitempty"`
	// The time range during which the silence is active.
	// If not set, the silence will be active ever.
	Duration *metav1.Duration `json:"duration,omitempty"`
}

SilenceSpec defines the desired state of Silence

func (*SilenceSpec) DeepCopy

func (in *SilenceSpec) DeepCopy() *SilenceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SilenceSpec.

func (*SilenceSpec) DeepCopyInto

func (in *SilenceSpec) DeepCopyInto(out *SilenceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SilenceStatus

type SilenceStatus struct {
}

SilenceStatus defines the observed state of Silence

func (*SilenceStatus) DeepCopy

func (in *SilenceStatus) DeepCopy() *SilenceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SilenceStatus.

func (*SilenceStatus) DeepCopyInto

func (in *SilenceStatus) DeepCopyInto(out *SilenceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SlackConfig

type SlackConfig struct {
	Labels map[string]string `json:"labels,omitempty"`
	// The token of user or bot.
	SlackTokenSecret *Credential `json:"slackTokenSecret"`
}

func (*SlackConfig) DeepCopy

func (in *SlackConfig) DeepCopy() *SlackConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackConfig.

func (*SlackConfig) DeepCopyInto

func (in *SlackConfig) DeepCopyInto(out *SlackConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SlackOptions

type SlackOptions struct {
	// Notification Sending Timeout
	NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
	// The name of the template to generate Slack message.
	// If the global template is not set, it will use default.
	Template string `json:"template,omitempty"`
}

func (*SlackOptions) DeepCopy

func (in *SlackOptions) DeepCopy() *SlackOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackOptions.

func (*SlackOptions) DeepCopyInto

func (in *SlackOptions) DeepCopyInto(out *SlackOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SlackReceiver

type SlackReceiver struct {
	// whether the receiver is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// SlackConfig to be selected for this receiver
	SlackConfigSelector *metav1.LabelSelector `json:"slackConfigSelector,omitempty"`
	// Selector to filter alerts.
	AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
	// The channel or user to send notifications to.
	Channels []string `json:"channels"`
	// The name of the template to generate notification.
	// If the global template is not set, it will use default.
	Template *string `json:"template,omitempty"`
	// Template file.
	TmplText *ConfigmapKeySelector `json:"tmplText,omitempty"`
}

func (*SlackReceiver) DeepCopy

func (in *SlackReceiver) DeepCopy() *SlackReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackReceiver.

func (*SlackReceiver) DeepCopyInto

func (in *SlackReceiver) DeepCopyInto(out *SlackReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SmsConfig

type SmsConfig struct {
	// The default sms provider, optional, use the first provider if not set
	DefaultProvider string `json:"defaultProvider,omitempty"`
	// All sms providers
	Providers *Providers `json:"providers"`
}

func (*SmsConfig) DeepCopy

func (in *SmsConfig) DeepCopy() *SmsConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmsConfig.

func (*SmsConfig) DeepCopyInto

func (in *SmsConfig) DeepCopyInto(out *SmsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SmsOptions

type SmsOptions struct {
	// Notification Sending Timeout
	NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
	// The name of the template to generate sms message.
	// If the global template is not set, it will use default.
	Template string `json:"template,omitempty"`
}

func (*SmsOptions) DeepCopy

func (in *SmsOptions) DeepCopy() *SmsOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmsOptions.

func (*SmsOptions) DeepCopyInto

func (in *SmsOptions) DeepCopyInto(out *SmsOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SmsReceiver

type SmsReceiver struct {
	// whether the receiver is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// SmsConfig to be selected for this receiver
	SmsConfigSelector *metav1.LabelSelector `json:"smsConfigSelector,omitempty"`
	// Selector to filter alerts.
	AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
	// Receivers' phone numbers
	PhoneNumbers []string `json:"phoneNumbers"`
	// The name of the template to generate notification.
	// If the global template is not set, it will use default.
	Template *string `json:"template,omitempty"`
	// Template file.
	TmplText *ConfigmapKeySelector `json:"tmplText,omitempty"`
}

func (*SmsReceiver) DeepCopy

func (in *SmsReceiver) DeepCopy() *SmsReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmsReceiver.

func (*SmsReceiver) DeepCopyInto

func (in *SmsReceiver) DeepCopyInto(out *SmsReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSConfig

type TLSConfig struct {
	// RootCA defines the root certificate authorities
	// that clients use when verifying server certificates.
	RootCA *Credential `json:"rootCA,omitempty"`
	// The certificate of the client.
	*ClientCertificate `json:"clientCertificate,omitempty"`
	// Used to verify the hostname for the targets.
	ServerName string `json:"serverName,omitempty"`
	// Disable target certificate validation.
	InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
}

TLSConfig configures the options for TLS connections.

func (*TLSConfig) DeepCopy

func (in *TLSConfig) DeepCopy() *TLSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.

func (*TLSConfig) DeepCopyInto

func (in *TLSConfig) DeepCopyInto(out *TLSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Template

type Template struct {
	// Template file.
	Text *ConfigmapKeySelector `json:"text,omitempty"`
	// Time to reload template file.
	//
	// +kubebuilder:default="1m"
	ReloadCycle metav1.Duration `json:"reloadCycle,omitempty"`
	// Configmap which the i18n file be in.
	LanguagePack []*ConfigmapKeySelector `json:"languagePack,omitempty"`
	// The language used to send notification.
	//
	// +kubebuilder:default="English"
	Language string `json:"language,omitempty"`
}

func (*Template) DeepCopy

func (in *Template) DeepCopy() *Template

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.

func (*Template) DeepCopyInto

func (in *Template) DeepCopyInto(out *Template)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TencentSMS

type TencentSMS struct {
	Sign        string      `json:"sign"`
	TemplateID  string      `json:"templateID"`
	SmsSdkAppid string      `json:"smsSdkAppid"`
	SecretId    *Credential `json:"secretId"`
	SecretKey   *Credential `json:"secretKey"`
}

Sms tencent provider parameters

func (*TencentSMS) DeepCopy

func (in *TencentSMS) DeepCopy() *TencentSMS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TencentSMS.

func (*TencentSMS) DeepCopyInto

func (in *TencentSMS) DeepCopyInto(out *TencentSMS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Throttle

type Throttle struct {
	// The maximum calls in `Unit`.
	Threshold int           `json:"threshold,omitempty"`
	Unit      time.Duration `json:"unit,omitempty"`
	// The maximum tolerable waiting time when the calls trigger flow control, if the actual waiting time is more than this time, it will
	// return an error, else it will wait for the flow restriction lifted, and send the message.
	// Nil means do not wait, the maximum value is `Unit`.
	MaxWaitTime time.Duration `json:"maxWaitTime,omitempty"`
}

Throttle is the config of flow control.

func (*Throttle) DeepCopy

func (in *Throttle) DeepCopy() *Throttle

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Throttle.

func (*Throttle) DeepCopyInto

func (in *Throttle) DeepCopyInto(out *Throttle)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ValueSource

type ValueSource struct {
	// Selects a key of a secret in the pod's namespace
	// +optional
	SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"`
}

func (*ValueSource) DeepCopy

func (in *ValueSource) DeepCopy() *ValueSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueSource.

func (*ValueSource) DeepCopyInto

func (in *ValueSource) DeepCopyInto(out *ValueSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebhookConfig

type WebhookConfig struct {
	Labels map[string]string `json:"labels,omitempty"`
}

func (*WebhookConfig) DeepCopy

func (in *WebhookConfig) DeepCopy() *WebhookConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookConfig.

func (*WebhookConfig) DeepCopyInto

func (in *WebhookConfig) DeepCopyInto(out *WebhookConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebhookOptions

type WebhookOptions struct {
	// Notification Sending Timeout
	NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
	// The name of the template to generate webhook message.
	// If the global template is not set, it will use default.
	Template string `json:"template,omitempty"`
}

func (*WebhookOptions) DeepCopy

func (in *WebhookOptions) DeepCopy() *WebhookOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookOptions.

func (*WebhookOptions) DeepCopyInto

func (in *WebhookOptions) DeepCopyInto(out *WebhookOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebhookReceiver

type WebhookReceiver struct {
	// whether the receiver is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// WebhookConfig to be selected for this receiver
	WebhookConfigSelector *metav1.LabelSelector `json:"webhookConfigSelector,omitempty"`
	// Selector to filter alerts.
	AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
	// `url` gives the location of the webhook, in standard URL form
	// (`scheme://host:port/path`). Exactly one of `url` or `service`
	// must be specified.
	//
	// The `host` should not refer to a service running in the cluster; use
	// the `service` field instead. The host might be resolved via external
	// DNS in some api servers (e.g., `kube-apiserver` cannot resolve
	// in-cluster DNS as that would be a layering violation). `host` may
	// also be an IP address.
	//
	// Please note that using `localhost` or `127.0.0.1` as a `host` is
	// risky unless you take great care to run this webhook on all hosts
	// which run an apiserver which might need to make calls to this
	// webhook. Such installs are likely to be non-portable, i.e., not easy
	// to turn up in a new cluster.
	//
	// A path is optional, and if present may be any string permissible in
	// a URL. You may use the path to pass an arbitrary string to the
	// webhook, for example, a cluster identifier.
	//
	// Attempting to use a user or basic auth e.g. "user:password@" is not
	// allowed. Fragments ("#...") and query parameters ("?...") are not
	// allowed, either.
	//
	// +optional
	URL *string `json:"url,omitempty"`

	// `service` is a reference to the service for this webhook. Either
	// `service` or `url` must be specified.
	//
	// If the webhook is running within the cluster, then you should use `service`.
	//
	// +optional
	Service *ServiceReference `json:"service,omitempty"`

	HTTPConfig *HTTPClientConfig `json:"httpConfig,omitempty"`
	// The name of the template to generate notification.
	// If the global template is not set, it will use default.
	Template *string `json:"template,omitempty"`
	// Template file.
	TmplText *ConfigmapKeySelector `json:"tmplText,omitempty"`
}

func (*WebhookReceiver) DeepCopy

func (in *WebhookReceiver) DeepCopy() *WebhookReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookReceiver.

func (*WebhookReceiver) DeepCopyInto

func (in *WebhookReceiver) DeepCopyInto(out *WebhookReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WechatConfig

type WechatConfig struct {
	Labels map[string]string `json:"labels,omitempty"`
	// The WeChat API URL.
	WechatApiUrl string `json:"wechatApiUrl,omitempty"`
	// The corp id for authentication.
	WechatApiCorpId string `json:"wechatApiCorpId"`
	// The id of the application which sending message.
	WechatApiAgentId string `json:"wechatApiAgentId"`
	// The API key to use when talking to the WeChat API.
	WechatApiSecret *Credential `json:"wechatApiSecret"`
}

func (*WechatConfig) DeepCopy

func (in *WechatConfig) DeepCopy() *WechatConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WechatConfig.

func (*WechatConfig) DeepCopyInto

func (in *WechatConfig) DeepCopyInto(out *WechatConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WechatOptions

type WechatOptions struct {
	// Notification Sending Timeout
	NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
	// The name of the template to generate WeChat message.
	Template string `json:"template,omitempty"`
	// template type: text or markdown, default type is text
	TmplType string `json:"tmplType,omitempty"`
	// The maximum message size that can be sent in a request.
	MessageMaxSize int `json:"messageMaxSize,omitempty"`
	// The time of token expired.
	TokenExpires time.Duration `json:"tokenExpires,omitempty"`
}

func (*WechatOptions) DeepCopy

func (in *WechatOptions) DeepCopy() *WechatOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WechatOptions.

func (*WechatOptions) DeepCopyInto

func (in *WechatOptions) DeepCopyInto(out *WechatOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WechatReceiver

type WechatReceiver struct {
	// whether the receiver is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// WechatConfig to be selected for this receiver
	WechatConfigSelector *metav1.LabelSelector `json:"wechatConfigSelector,omitempty"`
	// Selector to filter alerts.
	AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
	// +optional
	ToUser  []string `json:"toUser,omitempty"`
	ToParty []string `json:"toParty,omitempty"`
	ToTag   []string `json:"toTag,omitempty"`
	// The name of the template to generate notification.
	// If the global template is not set, it will use default.
	Template *string `json:"template,omitempty"`
	// template type: text or markdown, default type is text
	TmplType *string `json:"tmplType,omitempty"`
	// Template file.
	TmplText *ConfigmapKeySelector `json:"tmplText,omitempty"`
}

func (*WechatReceiver) DeepCopy

func (in *WechatReceiver) DeepCopy() *WechatReceiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WechatReceiver.

func (*WechatReceiver) DeepCopyInto

func (in *WechatReceiver) DeepCopyInto(out *WechatReceiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL