config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFileName = "config.yaml"

ConfigFileName is a name of botkube configuration file

View Source
var Notify = true

Notify flag to toggle event notification

Functions

This section is empty.

Types

type Communications

type Communications struct {
	Slack         Slack
	ElasticSearch ElasticSearch
	Mattermost    Mattermost
}

Communications channels to send events to

type Config

type Config struct {
	Resources       []Resource
	Recommendations bool
	Communications  Communications
	Settings        Settings
}

Config structure of configuration yaml file

func New

func New() (*Config, error)

New returns new Config

type ElasticSearch added in v0.7.0

type ElasticSearch struct {
	Enabled  bool
	Username string
	Password string `yaml:",omitempty"`
	Server   string
	Index    Index
}

ElasticSearch config auth settings

type EventType added in v0.8.0

type EventType string

EventType to watch

const (
	// AllowedEventType K8s event types allowed to forward
	AllowedEventType EventType = WarningEvent

	// 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"
	// AllEvent to watch all events
	AllEvent EventType = "all"
)

func (EventType) String added in v0.8.0

func (eventType EventType) String() string

type Index added in v0.7.0

type Index struct {
	Name     string
	Type     string
	Shards   int
	Replicas int
}

Index settings for ELS

type Mattermost added in v0.7.0

type Mattermost struct {
	Enabled bool
	URL     string
	Token   string
	Team    string
	Channel string
}

Mattermost configuration to authentication and send notifications

type Resource

type Resource struct {
	Name       string
	Namespaces []string
	Events     []EventType
}

Resource contains resources to watch

type Settings added in v0.2.0

type Settings struct {
	ClusterName     string
	AllowKubectl    bool
	UpgradeNotifier bool `yaml:"upgradeNotifier"`
}

Settings for multicluster support

type Slack

type Slack struct {
	Enabled bool
	Channel string
	Token   string `yaml:",omitempty"`
}

Slack configuration to authentication and send notifications

Jump to

Keyboard shortcuts

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