workloadspread

package
v0.10.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// MatchedWorkloadSpreadSubsetAnnotations matched pod workloadSpread
	MatchedWorkloadSpreadSubsetAnnotations = "apps.kruise.io/matched-workloadspread"

	PodDeletionCostAnnotation = "controller.kubernetes.io/pod-deletion-cost"

	PodDeletionCostPositive = 100
	PodDeletionCostNegative = -100
)

Variables

This section is empty.

Functions

func VerifyGroupKind

func VerifyGroupKind(ref interface{}, expectedKind string, expectedGroups []string) (bool, error)

Types

type Handler

type Handler struct {
	client.Client
}

func NewWorkloadSpreadHandler

func NewWorkloadSpreadHandler(c client.Client) *Handler

func (*Handler) HandlePodCreation

func (h *Handler) HandlePodCreation(pod *corev1.Pod) error

func (*Handler) HandlePodDeletion

func (h *Handler) HandlePodDeletion(pod *corev1.Pod, operation Operation) error

type InjectWorkloadSpread

type InjectWorkloadSpread struct {
	// matched WorkloadSpread.Name
	Name string `json:"name"`
	// Subset.Name
	Subset string `json:"subset"`
	// generate id if the Pod's name is nil.
	UID string `json:"uid,omitempty"`
}

type Operation

type Operation string
const (
	CreateOperation   Operation = "Create"
	DeleteOperation   Operation = "Delete"
	EvictionOperation Operation = "Eviction"
)

Jump to

Keyboard shortcuts

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