Skip to content

Commit

Permalink
Merge pull request #185 from Gentleelephant/feat-discord
Browse files Browse the repository at this point in the history
support discord
  • Loading branch information
benjaminhuo authored Jan 6, 2023
2 parents 6b781ae + e5dbd23 commit 14d44f0
Show file tree
Hide file tree
Showing 13 changed files with 813 additions and 0 deletions.
123 changes: 123 additions & 0 deletions config/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5432,6 +5432,15 @@ spec:
format: int64
type: integer
type: object
discord:
properties:
notificationTimeout:
description: Notification Sending Timeout
format: int32
type: integer
template:
type: string
type: object
email:
properties:
deliveryType:
Expand Down Expand Up @@ -9434,6 +9443,120 @@ spec:
description: 'template type: text or markdown'
type: string
type: object
discord:
properties:
alertSelector:
description: Selector to filter alerts.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If
the operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced
during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A
single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is "key",
the operator is "In", and the values array contains only
"value". The requirements are ANDed.
type: object
type: object
enabled:
description: whether the receiver is enabled
type: boolean
mentionedRoles:
description: Mentioned roles
items:
type: string
type: array
mentionedUsers:
description: Mentioned users
items:
type: string
type: array
template:
type: string
tmplText:
description: Template file.
properties:
key:
description: The key of the configmap to select from. Must
be a valid configmap key.
type: string
name:
description: Name of the configmap.
type: string
namespace:
description: The namespace of the configmap, default to the
`defaultSecretNamespace` of `NotificationManager` crd. If
the `defaultSecretNamespace` does not set, default to the
pod's namespace.
type: string
required:
- name
type: object
type:
description: content or embed
type: string
webhook:
properties:
value:
type: string
valueFrom:
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's namespace
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
description: Name of the secret.
type: string
namespace:
description: The namespace of the secret, default
to the `defaultSecretNamespace` of `NotificationManager`
crd. If the `defaultSecretNamespace` does not set,
default to the pod's namespace.
type: string
required:
- key
- name
type: object
type: object
type: object
required:
- webhook
type: object
email:
properties:
alertSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4292,6 +4292,15 @@ spec:
format: int64
type: integer
type: object
discord:
properties:
notificationTimeout:
description: Notification Sending Timeout
format: int32
type: integer
template:
type: string
type: object
email:
properties:
deliveryType:
Expand Down
114 changes: 114 additions & 0 deletions config/crd/bases/notification.kubesphere.io_receivers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,120 @@ spec:
description: 'template type: text or markdown'
type: string
type: object
discord:
properties:
alertSelector:
description: Selector to filter alerts.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If
the operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced
during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A
single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is "key",
the operator is "In", and the values array contains only
"value". The requirements are ANDed.
type: object
type: object
enabled:
description: whether the receiver is enabled
type: boolean
mentionedRoles:
description: Mentioned roles
items:
type: string
type: array
mentionedUsers:
description: Mentioned users
items:
type: string
type: array
template:
type: string
tmplText:
description: Template file.
properties:
key:
description: The key of the configmap to select from. Must
be a valid configmap key.
type: string
name:
description: Name of the configmap.
type: string
namespace:
description: The namespace of the configmap, default to the
`defaultSecretNamespace` of `NotificationManager` crd. If
the `defaultSecretNamespace` does not set, default to the
pod's namespace.
type: string
required:
- name
type: object
type:
description: content or embed
type: string
webhook:
properties:
value:
type: string
valueFrom:
properties:
secretKeyRef:
description: Selects a key of a secret in the pod's namespace
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
description: Name of the secret.
type: string
namespace:
description: The namespace of the secret, default
to the `defaultSecretNamespace` of `NotificationManager`
crd. If the `defaultSecretNamespace` does not set,
default to the pod's namespace.
type: string
required:
- key
- name
type: object
type: object
type: object
required:
- webhook
type: object
email:
properties:
alertSelector:
Expand Down
Loading

0 comments on commit 14d44f0

Please sign in to comment.