Documentation ¶
Index ¶
- Constants
- func NewConfigMapInformer(clientset kubernetes.Interface, namespace string) cache.SharedIndexInformer
- func NewSecretInformer(clientset kubernetes.Interface, namespace string) cache.SharedIndexInformer
- func ParseSecret(secret *v1.Secret) (notifiersConfig notifiers.Config, err error)
- type Config
- type DefaultSubscriptions
- type Subscription
Constants ¶
View Source
const ( ConfigMapName = "argocd-notifications-cm" SecretName = "argocd-notifications-secret" )
Variables ¶
This section is empty.
Functions ¶
func NewConfigMapInformer ¶
func NewConfigMapInformer(clientset kubernetes.Interface, namespace string) cache.SharedIndexInformer
func NewSecretInformer ¶
func NewSecretInformer(clientset kubernetes.Interface, namespace string) cache.SharedIndexInformer
Types ¶
type Config ¶
type Config struct { Triggers []triggers.NotificationTrigger `json:"triggers"` Templates []triggers.NotificationTemplate `json:"templates"` Context map[string]string `json:"context"` Subscriptions DefaultSubscriptions `json:"subscriptions"` }
func ParseConfigMap ¶
ParseSecret retrieves configured templates and triggers from the provided config map
type DefaultSubscriptions ¶ added in v0.6.1
type DefaultSubscriptions []Subscription
func (DefaultSubscriptions) GetRecipients ¶ added in v0.6.1
func (subscriptions DefaultSubscriptions) GetRecipients(trigger string, labels map[string]string) []string
Returns list of recipients for the specified trigger
type Subscription ¶ added in v0.6.1
type Subscription struct { // Recipients comma separated list of recipients Recipients []string // Optional trigger name Triggers []string // Options label selector that limits applied applications Selector labels.Selector }
DefaultSubscription holds recipients that receives notification by default.
func (*Subscription) MatchesTrigger ¶ added in v0.6.1
func (s *Subscription) MatchesTrigger(trigger string) bool
func (*Subscription) UnmarshalJSON ¶ added in v0.6.1
func (s *Subscription) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.