Documentation

Index

Constants

View Source
const (
	// NodeNotReady EventReason when Node is NotReady
	NodeNotReady string = "NodeNotReady"
	// NodeReady EventReason when Node is Ready
	NodeReady string = "NodeReady"
)
View Source
const (
	// DisableAnnotation is the object disable annotation
	DisableAnnotation string = "botkube.io/disable"
	// ChannelAnnotation is the multichannel support annotation
	ChannelAnnotation string = "botkube.io/channel"
)

Variables

This section is empty.

Functions

func FindNamespaceFromService

func FindNamespaceFromService(service string) string

FindNamespaceFromService returns namespace from fully qualified domain name

func ValidSecret

func ValidSecret(name, namespace string) (*coreV1.Secret, error)

ValidSecret return Secret object if the secret is present in the specified object

func ValidService

func ValidService(name, namespace string) (*coreV1.Service, error)

ValidService returns Service object is service given service exists in the given namespace

func ValidServicePort

func ValidServicePort(name, namespace string, port int32) (*coreV1.Service, error)

ValidServicePort returns valid Service object if given service with the port exists in the given namespace

Types

type ImageTagChecker

type ImageTagChecker struct {
	Description string
}

ImageTagChecker add recommendations to the event object if latest image tag is used in pod containers

func (ImageTagChecker) Describe

func (f ImageTagChecker) Describe() string

Describe filter

func (ImageTagChecker) Run

func (f ImageTagChecker) Run(object interface{}, event *events.Event)

Run filers and modifies event struct

type IngressValidator

type IngressValidator struct {
	Description string
}

IngressValidator checks if service and tls secret used in ingress specs is already present and adds recommendations to event struct accordingly

func (IngressValidator) Describe

func (iv IngressValidator) Describe() string

Describe filter

func (IngressValidator) Run

func (iv IngressValidator) Run(object interface{}, event *events.Event)

Run filers and modifies event struct

type NamespaceChecker

type NamespaceChecker struct {
	Description string
}

NamespaceChecker ignore events from blocklisted namespaces

func (NamespaceChecker) Describe

func (f NamespaceChecker) Describe() string

Describe filter

func (NamespaceChecker) Run

func (f NamespaceChecker) Run(object interface{}, event *events.Event)

Run filters and modifies event struct

type NodeEventsChecker

type NodeEventsChecker struct {
	Description string
}

NodeEventsChecker checks job status and adds message in the events structure

func (NodeEventsChecker) Describe

func (f NodeEventsChecker) Describe() string

Describe filter

func (NodeEventsChecker) Run

func (f NodeEventsChecker) Run(object interface{}, event *events.Event)

Run filers and modifies event struct

type ObjectAnnotationChecker

type ObjectAnnotationChecker struct {
	Description string
}

ObjectAnnotationChecker add recommendations to the event object if pod created without any labels

func (ObjectAnnotationChecker) Describe

func (f ObjectAnnotationChecker) Describe() string

Describe filter

func (ObjectAnnotationChecker) Run

func (f ObjectAnnotationChecker) Run(object interface{}, event *events.Event)

Run filters and modifies event struct

type PodLabelChecker

type PodLabelChecker struct {
	Description string
}

PodLabelChecker add recommendations to the event object if pod created without any labels

func (PodLabelChecker) Describe

func (f PodLabelChecker) Describe() string

Describe filter

func (PodLabelChecker) Run

func (f PodLabelChecker) Run(object interface{}, event *events.Event)

Run filters and modifies event struct