klcpermit

package
v0.0.0-...-6e126a9 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const AppAnnotation = "keptn.sh/app"
View Source
const ContainerNameAnnotation = "keptn.sh/container"
View Source
const K8sRecommendedAppAnnotations = "app.kubernetes.io/part-of"
View Source
const K8sRecommendedVersionAnnotations = "app.kubernetes.io/version"
View Source
const K8sRecommendedWorkloadAnnotations = "app.kubernetes.io/name"
View Source
const MaxK8sObjectLength = 253
View Source
const MinKeptnNameLen = 80
View Source
const (
	PluginName = "KLCPermit"
)

PluginName is the name of the plugin used in the plugin registry and configurations.

View Source
const VersionAnnotation = "keptn.sh/version"
View Source
const WorkloadAnnotation = "keptn.sh/workload"

Variables

This section is empty.

Functions

func New

New initializes a new plugin and returns it.

Types

type KeptnState

type KeptnState string
const (
	StateProgressing KeptnState = "Progressing"
	StateSucceeded   KeptnState = "Succeeded"
	StateFailed      KeptnState = "Failed"
	StateUnknown     KeptnState = "Unknown"
	StatePending     KeptnState = "Pending"
	StateDeprecated  KeptnState = "Deprecated"
)

type Manager

type Manager interface {
	Permit(context.Context, *corev1.Pod) Status
}

type Permit

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

Permit is a plugin that waits for pre-deployment checks to be successfully finished

func (*Permit) Name

func (pl *Permit) Name() string

PluginName returns name of the plugin.

func (*Permit) Permit

func (pl *Permit) Permit(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (*framework.Status, time.Duration)

type Status

type Status string
const (
	WorkloadVersionStatusNotSpecified Status = "Workload run status not specified"
	WorkloadVersionNotFound           Status = "Workload run not found"
	Success                           Status = "Success"
	Failure                           Status = "Failure"
	Wait                              Status = "Wait"
)

type WorkloadManager

type WorkloadManager struct {
	Tracer trace.Tracer
	// contains filtered or unexported fields
}

func NewWorkloadManager

func NewWorkloadManager(d dynamic.Interface) *WorkloadManager

func (*WorkloadManager) GetCRD

func (sMgr *WorkloadManager) GetCRD(ctx context.Context, namespace string, name string) (*unstructured.Unstructured, error)

GetCRD returns unstructured to avoid tight coupling with the CRD resource

func (*WorkloadManager) Permit

func (sMgr *WorkloadManager) Permit(ctx context.Context, pod *corev1.Pod) Status

Jump to

Keyboard shortcuts

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