-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for OpsGenie as a notification channel
- Loading branch information
Filip Petkovski
committed
May 29, 2020
1 parent
6e8dab0
commit 1890837
Showing
23 changed files
with
1,282 additions
and
645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ metadata: | |
data: | ||
adminKey: "" | ||
defaultSlackWebhookUrl: "" # optional | ||
defaultOpsgenieApiKey: "" # optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
deploy/crds/alerts.newrelic.io_opsgenienotificationchannels_crd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: opsgenienotificationchannels.alerts.newrelic.io | ||
spec: | ||
additionalPrinterColumns: | ||
- JSONPath: .spec.name | ||
description: The New Relic name this channel | ||
name: NR Name | ||
type: string | ||
- JSONPath: .status.status | ||
description: The status of this channel | ||
name: Status | ||
type: string | ||
- JSONPath: .status.newrelicId | ||
description: The New Relic ID of this channel | ||
name: Newrelic ID | ||
type: string | ||
- JSONPath: .metadata.creationTimestamp | ||
description: The age of this channel | ||
name: Age | ||
type: date | ||
group: alerts.newrelic.io | ||
names: | ||
kind: OpsgenieNotificationChannel | ||
listKind: OpsgenieNotificationChannelList | ||
plural: opsgenienotificationchannels | ||
singular: opsgenienotificationchannel | ||
scope: Namespaced | ||
subresources: | ||
status: {} | ||
validation: | ||
openAPIV3Schema: | ||
description: NotificationChannel is the Schema for the OpsgenieNotificationChannels | ||
API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: OpsgenieNotificationChannelSpec defines the desired state of | ||
NotificationChannel | ||
properties: | ||
api_key: | ||
description: The Opsgenie API Key. If left empty, the default API key | ||
specified when deploying the operator will be used | ||
type: string | ||
name: | ||
description: The name of the notification channel created in New Relic | ||
type: string | ||
policySelector: | ||
additionalProperties: | ||
type: string | ||
description: A label selector defining the alert policies covered by | ||
the notification channel | ||
type: object | ||
recipients: | ||
description: A comma-separated value of emails | ||
items: | ||
type: string | ||
type: array | ||
tags: | ||
description: A list of tags | ||
items: | ||
type: string | ||
type: array | ||
teams: | ||
description: A list of teams | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- name | ||
type: object | ||
status: | ||
description: NotificationChannelStatus defines the observed state of NotificationChannel | ||
properties: | ||
newrelicConfigVersion: | ||
type: string | ||
newrelicId: | ||
description: The resource id in New Relic | ||
format: int64 | ||
type: integer | ||
reason: | ||
description: When a policy fails to be created, the value will be set | ||
to the error message received from New Relic | ||
type: string | ||
status: | ||
description: The value will be set to `Ready` once the policy has been | ||
created in New Relic | ||
type: string | ||
required: | ||
- status | ||
type: object | ||
type: object | ||
version: v1alpha1 | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true |
Oops, something went wrong.