controller

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsProviderServiceSuffix = ":service"
)

Variables

This section is empty.

Functions

func CallEventWebhook

func CallEventWebhook(r *flaggerv1.Canary, w flaggerv1.CanaryWebhook, message, eventtype string) error

func CallWebhook

func CallWebhook(name string, namespace string, phase flaggerv1.CanaryPhase, w flaggerv1.CanaryWebhook) error

CallWebhook does a HTTP POST to an external service and returns an error if the response status code is non-2xx

Types

type CanaryJob

type CanaryJob struct {
	Name      string
	Namespace string
	// contains filtered or unexported fields
}

CanaryJob holds the reference to a canary deployment schedule

func (CanaryJob) GetCanaryAnalysisInterval

func (j CanaryJob) GetCanaryAnalysisInterval() time.Duration

func (CanaryJob) Start

func (j CanaryJob) Start()

Start runs the canary analysis on a schedule

func (CanaryJob) Stop

func (j CanaryJob) Stop()

Stop closes the job channel and stops the ticker

type Controller

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

Controller is managing the canary objects and schedules canary deployments

func NewController

func NewController(
	kubeClient kubernetes.Interface,
	flaggerClient clientset.Interface,
	flaggerInformers Informers,
	flaggerWindow time.Duration,
	logger *zap.SugaredLogger,
	notifier notifier.Interface,
	canaryFactory *canary.Factory,
	routerFactory *router.Factory,
	observerFactory *observers.Factory,
	meshProvider string,
	version string,
	eventWebhook string,
) *Controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run starts the K8s workers and the canary scheduler

type Informers

type Informers struct {
	CanaryInformer flaggerinformers.CanaryInformer
	MetricInformer flaggerinformers.MetricTemplateInformer
	AlertInformer  flaggerinformers.AlertProviderInformer
}

Jump to

Keyboard shortcuts

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