Skip to content
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
4 changes: 2 additions & 2 deletions api/v1beta3/provider_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ const (
ZulipProvider string = "zulip"
OTELProvider string = "otel"
ZoomProvider string = "zoom"
IncidentioProvider string = "incidentio"
IncidentioProvider string = "incident.io"
)

// ProviderSpec defines the desired state of the Provider.
// +kubebuilder:validation:XValidation:rule="self.type == 'github' || self.type == 'gitlab' || self.type == 'gitea' || self.type == 'bitbucketserver' || self.type == 'bitbucket' || self.type == 'azuredevops' || !has(self.commitStatusExpr)", message="spec.commitStatusExpr is only supported for the 'github', 'gitlab', 'gitea', 'bitbucketserver', 'bitbucket', 'azuredevops' provider types"
type ProviderSpec struct {
// Type specifies which Provider implementation to use.
// +kubebuilder:validation:Enum=slack;discord;msteams;rocket;generic;generic-hmac;github;gitlab;gitea;giteapullrequestcomment;bitbucketserver;bitbucket;azuredevops;googlechat;googlepubsub;webex;sentry;azureeventhub;telegram;lark;matrix;opsgenie;alertmanager;grafana;githubdispatch;githubpullrequestcomment;gitlabmergerequestcomment;pagerduty;datadog;nats;zulip;otel;zoom;incidentio
// +kubebuilder:validation:Enum=slack;discord;msteams;rocket;generic;generic-hmac;github;gitlab;gitea;giteapullrequestcomment;bitbucketserver;bitbucket;azuredevops;googlechat;googlepubsub;webex;sentry;azureeventhub;telegram;lark;matrix;opsgenie;alertmanager;grafana;githubdispatch;githubpullrequestcomment;gitlabmergerequestcomment;pagerduty;datadog;nats;zulip;otel;zoom;incident.io
// +required
Type string `json:"type"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ spec:
- zulip
- otel
- zoom
- incidentio
- incident.io
type: string
username:
description: Username specifies the name under which events are posted.
Expand Down
8 changes: 4 additions & 4 deletions docs/spec/v1beta3/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The supported alerting providers are:
| [Google Chat](#google-chat) | `googlechat` |
| [Google Pub/Sub](#google-pubsub) | `googlepubsub` |
| [Grafana](#grafana) | `grafana` |
| [incident.io](#incidentio) | `incidentio` |
| [incident.io](#incidentio) | `incident.io` |
| [Lark](#lark) | `lark` |
| [Matrix](#matrix) | `matrix` |
| [Microsoft Teams](#microsoft-teams) | `msteams` |
Expand Down Expand Up @@ -1362,7 +1362,7 @@ stringData:

##### incident.io

When `.spec.type` is set to `incidentio`, the controller will send a payload for
When `.spec.type` is set to `incident.io`, the controller will send a payload for
an [Event](events.md#event-structure) to the provided incident.io
[HTTP alert source](https://docs.incident.io/alerts/custom-http-sources) [Address](#address).

Expand Down Expand Up @@ -1394,7 +1394,7 @@ To configure a Provider for incident.io, create an
[HTTP alert source](https://docs.incident.io/alerts/custom-http-sources) in the
incident.io dashboard to obtain the endpoint URL and the API token, then create
a Secret with [the `address`](#address-example) set to the endpoint URL,
[the `token`](#token-example) set to the API token, and an `incidentio`
[the `token`](#token-example) set to the API token, and an `incident.io`
Provider with a [Secret reference](#secret-reference).

```yaml
Expand All @@ -1405,7 +1405,7 @@ metadata:
name: incidentio
namespace: default
spec:
type: incidentio
type: incident.io
secretRef:
name: incidentio-alert-source
---
Expand Down
4 changes: 4 additions & 0 deletions internal/controller/provider_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func TestProviderReconciler_APIServerValidation(t *testing.T) {
providerType: "github",
commitStatusExpr: "",
},
{
name: "incident.io provider type can create providers",
providerType: apiv1beta3.IncidentioProvider,
},
}

for _, tt := range tests {
Expand Down
Loading