klcpermit

package
v0.0.0-...-b8c2c4b Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "KLCPermit"
)

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

Variables

This section is empty.

Functions

func GetCRDName

func GetCRDName(pod *corev1.Pod) string

func New

New initializes a new plugin and returns it.

Types

type KeptnState

type KeptnState string
const (
	StateRunning   KeptnState = "Running"
	StateSucceeded KeptnState = "Succeeded"
	StateFailed    KeptnState = "Failed"
	StateUnknown   KeptnState = "Unknown"
	StatePending   KeptnState = "Pending"
)

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 implements a wait for pre-deployment checks

func (*Permit) Name

func (pl *Permit) Name() string

Name 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 (
	WorkloadInstanceStatusNotSpecified Status = "Workload run status not specified"
	WorkloadInstanceNotFound           Status = "Workload run not found"
	Success                            Status = "Success"
	Failure                            Status = "Failure"
	Wait                               Status = "Wait"
)

type WorkloadManager

type WorkloadManager struct {
	// 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