validation

package
v0.0.0-...-9afe088 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNextValidationCheckDuration

func GetNextValidationCheckDuration(kd *v1alpha1.KanaryDeployment) time.Duration

GetNextValidationCheckDuration return the shortest duration between deadline-now and MaxIntervalPeriod

func GetValidationDeadLine

func GetValidationDeadLine(kd *v1alpha1.KanaryDeployment) time.Time

GetValidationDeadLine return the timestamp for the end validation period

func IsDeadlinePeriodDone

func IsDeadlinePeriodDone(kd *v1alpha1.KanaryDeployment) bool

IsDeadlinePeriodDone returns true if the InitialDelay validation periode is over.

func IsInitialDelayDone

func IsInitialDelayDone(kd *v1alpha1.KanaryDeployment) (time.Duration, bool)

IsInitialDelayDone returns true if the InitialDelay validation periode is over.

func IsStatusAfterDeadlineNone

func IsStatusAfterDeadlineNone(kd *kanaryv1alpha1.KanaryDeployment) bool

IsStatusAfterDeadlineNone check if there is a Manual Strategy that prevent automation with a None Status.

Types

type Interface

type Interface interface {
	Validation(kclient client.Client, reqLogger logr.Logger, kd *kanaryv1alpha1.KanaryDeployment, dep, canaryDep *appsv1beta1.Deployment) (*Result, error)
}

Interface validation strategy interface

func NewLabelWatch

NewLabelWatch returns new validation.LabelWatch instance

func NewManual

NewManual returns new validation.Manual instance

func NewPromql

NewPromql returns new validation.Manual instance

type Result

type Result struct {
	IsFailed        bool
	ForceSuccessNow bool
	Comment         string
}

Result returns result of a Validation

Jump to

Keyboard shortcuts

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