vent

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostToWebhooks

func PostToWebhooks(urls []string, podEnv *K8PodEnv, secret string)

PostToWebhooks marshals podEnv into JSON and posts it to the webhook URLs provided.

func Vent

func Vent(urls []string, namespace string, secret string) (e error)

Vent sets up and starts the listener for pod events, which posts them to the provided webhooks when it receives them. It should never return.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller object Based on Controller from github.com/skippbox/kubewatch

func (*Controller) HasSynced

func (c *Controller) HasSynced() bool

HasSynced is required for the cache.Controller interface.

func (*Controller) LastSyncResourceVersion

func (c *Controller) LastSyncResourceVersion() string

LastSyncResourceVersion is required for the cache.Controller interface.

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

Run starts the k8svent controller

type K8PodEnv

type K8PodEnv struct {
	Pod v1.Pod            `json:"pod"`
	Env map[string]string `json:"env"`
}

K8PodEnv is the structure serialized and sent to the webhook endpoints.

type K8sVentPodAnnotation added in v0.12.0

type K8sVentPodAnnotation struct {
	Webhooks    []string `json:"webhooks"`
	Environment string   `json:"environment"`
}

K8sVentPodAnnotation defines the valid structure of the "atomist.com/k8svent" pod annotation.

Jump to

Keyboard shortcuts

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