workload

package
v0.0.0-...-6526340 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIgnore

func IsIgnore(err error) bool

IsIgnore returns true if err was an ignoreError.

Types

type Manager

type Manager interface {
	// Start starts the manager.
	Start(stopCh <-chan struct{}) error
	// Handle handles a workload admission request.
	Handle(request *admissionv1beta1.AdmissionRequest) (w *Workload, used, released []*VolumeInfo, err error)
	// MountedVolumes returns mounted volumes by a workload.
	MountedVolumes(ref *corev1.ObjectReference) ([]*VolumeInfo, error)
	// Exist returns true is a workload exist.
	Exist(ref *corev1.ObjectReference) (bool, error)
}

Manager is used to manage workloads, such as Pod, Deployments, etc.

func New

func New(
	k8sClient kubernetes.Interface,
	informerFactory informers.SharedInformerFactory,
	tappManager tapps.Manager) Manager

New creates a new Manager.

type VolumeInfo

VolumeInfo is the information of a volume used by a workload.

type Workload

type Workload struct {
	corev1.ObjectReference
	Replicas *int32
}

Workload is the information of a workload used some volumes.

Jump to

Keyboard shortcuts

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