Skip to content

Commit

Permalink
Merge pull request #271 from kubernilla/add-teams
Browse files Browse the repository at this point in the history
add MS teams as notification type
  • Loading branch information
gianlucam76 authored Feb 21, 2024
2 parents 5a414be + 1511b54 commit 94ea5e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
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

0 comments on commit 94ea5e6

Please sign in to comment.