Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConfigFileName stores file of config ConfigFileName = ".kube/kubewatch.yaml" // ConfigSample is a sample configuration file. ConfigSample = yannotated )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Handlers know how to send notifications to specific services.
Handler Handler `json:"handler"`
// Resources to watch.
Resource Resource `json:"resource"`
// For watching specific namespace, leave it empty for watching all.
// this config is ignored when watching namespaces
Namespace string `json:"namespace,omitempty"`
}
Config struct contains kubewatch configuration
type Flock ¶
type Flock struct {
// URL of the flock API.
Url string `json:"url"`
}
Flock contains flock configuration
type Handler ¶
type Handler struct {
Slack Slack `json:"slack"`
Hipchat Hipchat `json:"hipchat"`
Mattermost Mattermost `json:"mattermost"`
Flock Flock `json:"flock"`
Webhook Webhook `json:"webhook"`
MSTeams MSTeams `json:"msteams"`
SMTP SMTP `json:"smtp"`
}
Handler contains handler configuration
type Hipchat ¶
type Hipchat struct {
// Hipchat token.
Token string `json:"token"`
// Room name.
Room string `json:"room"`
// URL of the hipchat server.
Url string `json:"url"`
}
Hipchat contains hipchat configuration
type MSTeams ¶
type MSTeams struct {
// MSTeams API Webhook URL.
WebhookURL string `json:"webhookurl"`
}
MSTeams contains MSTeams configuration
type Mattermost ¶
type Mattermost struct {
Channel string `json:"room"`
Url string `json:"url"`
Username string `json:"username"`
}
Mattermost contains mattermost configuration
type Resource ¶
type Resource struct {
Deployment bool `json:"deployment"`
ReplicationController bool `json:"rc"`
ReplicaSet bool `json:"rs"`
DaemonSet bool `json:"ds"`
Services bool `json:"svc"`
Pod bool `json:"po"`
Job bool `json:"job"`
Node bool `json:"node"`
ClusterRole bool `json:"clusterrole"`
ServiceAccount bool `json:"sa"`
PersistentVolume bool `json:"pv"`
Namespace bool `json:"ns"`
Secret bool `json:"secret"`
ConfigMap bool `json:"configmap"`
Ingress bool `json:"ing"`
}
Resource contains resource configuration
type SMTP ¶
type SMTP struct {
// Destination e-mail address.
To string `json:"to" yaml:"to,omitempty"`
// Sender e-mail address .
From string `json:"from" yaml:"from,omitempty"`
// Smarthost, aka "SMTP server"; address of server used to send email.
Smarthost string `json:"smarthost" yaml:"smarthost,omitempty"`
// Subject of the outgoing emails.
Subject string `json:"subject" yaml:"subject,omitempty"`
// Extra e-mail headers to be added to all outgoing messages.
Headers map[string]string `json:"headers" yaml:"headers,omitempty"`
// Authentication parameters.
Auth SMTPAuth `json:"auth" yaml:"auth,omitempty"`
// If "true" forces secure SMTP protocol (AKA StartTLS).
RequireTLS bool `json:"requireTLS" yaml:"requireTLS"`
// SMTP hello field (optional)
Hello string `json:"hello" yaml:"hello,omitempty"`
}
SMTP contains SMTP configuration.
type SMTPAuth ¶
type SMTPAuth struct {
// Username for PLAN and LOGIN auth mechanisms.
Username string `json:"username" yaml:"username,omitempty"`
// Password for PLAIN and LOGIN auth mechanisms.
Password string `json:"password" yaml:"password,omitempty"`
// Identity for PLAIN auth mechanism
Identity string `json:"identity" yaml:"identity,omitempty"`
// Secret for CRAM-MD5 auth mechanism
Secret string `json:"secret" yaml:"secret,omitempty"`
}
Source Files
¶
- config.go
- sample.go
Click to show internal directories.
Click to hide internal directories.