Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigFileName = ".kubewatch.yaml"
ConfigFileName stores file of config
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Handler Handler `json:"handler"` //Reason []string `json:"reason"` Resource Resource `json:"resource,omitempty"` // for watching specific namespace, leave it empty for watching all. // this config is ignored when watching namespaces Namespace []string `json:"namespace,omitempty"` Event Event `json:"event,omitempty"` }
Config struct contains kubewatch configuration
func (*Config) CheckMissingResourceEnvvars ¶
func (c *Config) CheckMissingResourceEnvvars()
CheckMissingResourceEnvvars will read the environment for equivalent config variables to set
func (*Config) UnmarshallConfig ¶
func (c *Config) UnmarshallConfig()
type Event ¶
type Event struct { Global []string `json:"string,omitempty"` Create []string `json:"create,omitempty"` Update []string `json:"update,omitempty"` Delete []string `json:"delete,omitempty"` }
Event struct for granular config
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"` }
Handler contains handler configuration
type Hipchat ¶
type Hipchat struct { Token string `json:"token"` Room string `json:"room"` Url string `json:"url"` }
Hipchat contains hipchat configuration
type MSTeams ¶
type MSTeams struct {
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"` Service bool `json:"svc"` Pod bool `json:"po"` Job bool `json:"job"` PersistentVolume bool `json:"pv"` Namespace bool `json:"ns"` Secret bool `json:"secret"` ConfigMap bool `json:"configmap"` Ingress bool `json:"ing"` }
Resource contains resource configuration
Click to show internal directories.
Click to hide internal directories.