config

package
v0.0.0-...-32a469f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudEvent

type CloudEvent struct {
	Enabled bool
	Url     string
}

CloudEvent contains CloudEvent configuration

type Config

type Config struct {
	// Handlers know how to send notifications to specific services.
	Handler Handler

	// Resources to watch.
	Resource Resource

	// Configurations for namespaces ot watch or ignore
	NamespacesConfig NamespacesConfig
	// Message properties .
	Message Message
	// Diff properties .
	Diff Diff
}

Config struct contains statemonitor configuration

type Diff

type Diff struct {
	IgnorePath []string
}

type Discord

type Discord struct {
	Enabled    bool
	WebhookURL string
}

type Flock

type Flock struct {
	Enabled bool
	// URL of the flock API.
	Url string
}

Flock contains flock configuration

type Handler

type Handler struct {
	Slack        Slack
	SlackWebhook SlackWebhook
	Hipchat      Hipchat
	Mattermost   Mattermost
	Flock        Flock
	Webhook      Webhook
	CloudEvent   CloudEvent
	MSTeams      MSTeams
	SMTP         SMTP
	Lark         Lark
	Discord      Discord
}

Handler contains handler configuration

type Hipchat

type Hipchat struct {
	Enabled bool
	// Hipchat token.
	Token string
	// Room name.
	Room string
	// URL of the hipchat server.
	Url string
}

Hipchat contains hipchat configuration

type Lark

type Lark struct {
	Enabled bool
	// Webhook URL.
	WebhookURL string
}

Lark contains lark configuration

type MSTeams

type MSTeams struct {
	Enabled bool
	// MSTeams API Webhook URL.
	WebhookURL string
}

MSTeams contains MSTeams configuration

type Mattermost

type Mattermost struct {
	Enabled  bool
	Channel  string
	Url      string
	Username string
}

Mattermost contains mattermost configuration

type Message

type Message struct {
	// Message title.
	Title string
}

Message contains message configuration.

type NamespacesConfig

type NamespacesConfig struct {
	// For watching specific namespaces, leave it empty for watching all.
	// this config is ignored when watching namespaces as resource
	Include []string
	// For ignoring specific namespaces
	Exclude []string
}

type Resource

type Resource struct {
	Deployment            bool
	ReplicationController bool
	ReplicaSet            bool
	DaemonSet             bool
	StatefulSet           bool
	Services              bool
	Pod                   bool
	Job                   bool
	Node                  bool
	ClusterRole           bool
	ClusterRoleBinding    bool
	ServiceAccount        bool
	PersistentVolume      bool
	Namespace             bool
	Secret                bool
	ConfigMap             bool
	Ingress               bool
	HPA                   bool
	Event                 bool
	CoreEvent             bool
}

Resource contains resource configuration

type SMTP

type SMTP struct {
	Enabled bool
	// Destination e-mail address.
	To string
	// Sender e-mail address .
	From string
	// Smarthost, aka "SMTP server"; address of server used to send email.
	Smarthost string
	// Subject of the outgoing emails.
	Subject string
	// Extra e-mail headers to be added to all outgoing messages.
	Headers map[string]string
	// Authentication parameters.
	Auth SMTPAuth
	// If "true" forces secure SMTP protocol (AKA StartTLS).
	RequireTLS bool
	// SMTP hello field (optional)
	Hello string
}

SMTP contains SMTP configuration.

type SMTPAuth

type SMTPAuth struct {
	Enabled bool
	// Username for PLAN and LOGIN auth mechanisms.
	Username string
	// Password for PLAIN and LOGIN auth mechanisms.
	Password string
	// Identity for PLAIN auth mechanism
	Identity string
	// Secret for CRAM-MD5 auth mechanism
	Secret string
}

type Slack

type Slack struct {
	// Enable slack notifications.
	Enabled bool
	// Slack "legacy" API token.
	Token string
	// Slack channel.
	Channel string
}

Slack contains slack configuration

type SlackWebhook

type SlackWebhook struct {
	Enabled bool
	// Slack channel.
	Channel string
	// Slack Username.
	Username string
	// Slack Emoji.
	Emoji string
	// Slack Webhook Url.
	Slackwebhookurl string
}

SlackWebhook contains slack configuration

type Webhook

type Webhook struct {
	Enabled bool
	// Webhook URL.
	Url     string
	Cert    string
	TlsSkip bool
}

Webhook contains webhook configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL