mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-21 04:23:25 +02:00
Add SMTP notification provider
This commit is contained in:
@@ -73,6 +73,7 @@ type Notification struct {
|
||||
Slack *Slack `json:"slack,omitempty"`
|
||||
Teams *MicrosoftTeams `json:"teams,omitempty"`
|
||||
Mailgun *Mailgun `json:"mailgun,omitempty"`
|
||||
SMTP *SMTP `json:"smtp,omitempty"`
|
||||
}
|
||||
|
||||
// Slack is handler for Slack notification channel
|
||||
@@ -81,6 +82,16 @@ type Slack struct {
|
||||
WebHookURLSecretKeySelector SecretKeySelector `json:"webHookURLSecretKeySelector"`
|
||||
}
|
||||
|
||||
type SMTP struct {
|
||||
UsernameSecretKeySelector SecretKeySelector `json:"usernameSecretKeySelector"`
|
||||
PasswordSecretKeySelector SecretKeySelector `json:"passwordSecretKeySelector"`
|
||||
Port int `json:"port"`
|
||||
Server string `json:"server"`
|
||||
TLSInsecureSkipVerify bool `json:"tlsInsecureSkipVerify,omitempty"`
|
||||
From string `json:"from"`
|
||||
To string `json:"to"`
|
||||
}
|
||||
|
||||
// MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel
|
||||
type MicrosoftTeams struct {
|
||||
// The web hook URL to MicrosoftTeams App
|
||||
|
||||
@@ -458,6 +458,11 @@ func (in *Notification) DeepCopyInto(out *Notification) {
|
||||
*out = new(Mailgun)
|
||||
**out = **in
|
||||
}
|
||||
if in.SMTP != nil {
|
||||
in, out := &in.SMTP, &out.SMTP
|
||||
*out = new(SMTP)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -504,6 +509,24 @@ func (in *Restore) DeepCopy() *Restore {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SMTP) DeepCopyInto(out *SMTP) {
|
||||
*out = *in
|
||||
out.UsernameSecretKeySelector = in.UsernameSecretKeySelector
|
||||
out.PasswordSecretKeySelector = in.PasswordSecretKeySelector
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SMTP.
|
||||
func (in *SMTP) DeepCopy() *SMTP {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(SMTP)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector) {
|
||||
*out = *in
|
||||
|
||||
Reference in New Issue
Block a user