Documentation ¶
Index ¶
- Constants
- Variables
- type AWSSigning
- type BotPlatform
- type Commands
- type Communications
- type CommunicationsConfig
- type Config
- type ElasticSearch
- type EventType
- type Index
- type Kubectl
- type Level
- type Mattermost
- type Namespaces
- type NotifType
- type Resource
- type Settings
- type Slack
- type Teams
- type UpdateSetting
- type Webhook
Constants ¶
const ( // CreateEvent when resource is created CreateEvent EventType = "create" // UpdateEvent when resource is updated UpdateEvent EventType = "update" // DeleteEvent when resource deleted DeleteEvent EventType = "delete" // ErrorEvent on errors in resources ErrorEvent EventType = "error" // WarningEvent for warning events WarningEvent EventType = "warning" // NormalEvent for Normal events NormalEvent EventType = "normal" // InfoEvent for insignificant Info events InfoEvent EventType = "info" // AllEvent to watch all events AllEvent EventType = "all" // ShortNotify is the Default NotifType ShortNotify NotifType = "short" // LongNotify for short events notification LongNotify NotifType = "long" // Info level Info Level = "info" // Warn level Warn Level = "warn" // Debug level Debug Level = "debug" // Error level Error Level = "error" // Critical level Critical Level = "critical" // SlackBot bot platform SlackBot BotPlatform = "slack" // MattermostBot bot platform MattermostBot BotPlatform = "mattermost" // TeamsBot bot platform TeamsBot BotPlatform = "teams" )
Variables ¶
var CommunicationConfigFileName = "comm_config.yaml"
CommunicationConfigFileName is a name of botkube communication configuration file
var Notify = true
Notify flag to toggle event notification
var ResourceConfigFileName = "resource_config.yaml"
ResourceConfigFileName is a name of botkube resource configuration file
Functions ¶
This section is empty.
Types ¶
type AWSSigning ¶ added in v0.11.0
type AWSSigning struct { Enabled bool AWSRegion string `yaml:"awsRegion"` RoleArn string `yaml:"roleArn"` }
AWSSigning contains AWS configurations
type Communications ¶
type Communications struct {
Communications CommunicationsConfig
}
Communications contains communication config
func NewCommunicationsConfig ¶ added in v0.11.0
func NewCommunicationsConfig() (*Communications, error)
NewCommunicationsConfig return new communication config object
type CommunicationsConfig ¶ added in v0.11.0
type CommunicationsConfig struct { Slack Slack Mattermost Mattermost Webhook Webhook Teams Teams ElasticSearch ElasticSearch }
CommunicationsConfig channels to send events to
type Config ¶
type Config struct { Resources []Resource Recommendations bool Communications CommunicationsConfig Settings Settings }
Config structure of configuration yaml file
type ElasticSearch ¶ added in v0.7.0
type ElasticSearch struct { Enabled bool Username string Password string `yaml:",omitempty"` Server string AWSSigning AWSSigning `yaml:"awsSigning"` Index Index }
ElasticSearch config auth settings
type Kubectl ¶ added in v0.11.0
type Kubectl struct { Enabled bool Commands Commands DefaultNamespace string RestrictAccess bool `yaml:"restrictAccess"` }
Kubectl configuration for executing commands inside cluster
type Mattermost ¶ added in v0.7.0
type Mattermost struct { Enabled bool URL string Token string Team string Channel string NotifType NotifType `yaml:",omitempty"` }
Mattermost configuration to authentication and send notifications
type Namespaces ¶ added in v0.9.0
Namespaces contains namespaces to include and ignore Include contains a list of namespaces to be watched,
- "all" to watch all the namespaces
Ignore contains a list of namespaces to be ignored when all namespaces are included It is an optional (omitempty) field which is tandem with Include [all] example : include [all], ignore [x,y,z]
type Resource ¶
type Resource struct { Name string Namespaces Namespaces Events []EventType UpdateSetting UpdateSetting `yaml:"updateSetting"` }
Resource contains resources to watch
type Settings ¶ added in v0.2.0
type Settings struct { ClusterName string Kubectl Kubectl ConfigWatcher bool UpgradeNotifier bool `yaml:"upgradeNotifier"` }
Settings for multicluster support
type Slack ¶
type Slack struct { Enabled bool Channel string NotifType NotifType `yaml:",omitempty"` Token string `yaml:",omitempty"` }
Slack configuration to authentication and send notifications
type Teams ¶ added in v0.11.0
type Teams struct { Enabled bool AppID string `yaml:"appID,omitempty"` AppPassword string `yaml:"appPassword,omitempty"` Team string Port string MessagePath string NotifType NotifType `yaml:",omitempty"` }
Teams creds for authentication with MS Teams
type UpdateSetting ¶ added in v0.10.0
UpdateSetting struct defines updateEvent fields specification