Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add MS teams as notification type #271

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion api/v1alpha1/clusterhealthcheck_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ const (
DiscordChannelID = "DISCORD_CHANNEL_ID"
)

// Teams constant
// To have Sveltos sends a Microsoft Teams notification, create a Secret of type "addons.projectsveltos.io/cluster-profile"
// In the data section set the Webhook URL
const (
TeamsWebhookURL = "TEAMS_WEBHOOK_URL"
)

// ConditionSeverity expresses the severity of a Condition Type failing.
type ConditionSeverity string

Expand Down Expand Up @@ -148,7 +155,7 @@ type LivenessCheck struct {
}

// NotificationType specifies different type of notifications
// +kubebuilder:validation:Enum:=KubernetesEvent;Slack;Webex;Discord
// +kubebuilder:validation:Enum:=KubernetesEvent;Slack;Webex;Discord;Teams
type NotificationType string

const (
Expand All @@ -163,6 +170,9 @@ const (

// NotificationTypeDiscord refers to generating a Discord message
NotificationTypeDiscord = NotificationType("Discord")

// NotificationTypeDiscord refers to generating a Teams message
NotificationTypeTeams = NotificationType("Teams")
)

type Notification struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ spec:
- Slack
- Webex
- Discord
- Teams
type: string
required:
- name
Expand Down
1 change: 1 addition & 0 deletions lib/crd/clusterhealthchecks.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ spec:
- Slack
- Webex
- Discord
- Teams
type: string
required:
- name
Expand Down
Loading