migration

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

Variables

View Source
var (
	UUIDGenerateFn = uuid.NewUUID
)

Functions

func CreatePodMigrationJob added in v0.7.0

func CreatePodMigrationJob(ctx context.Context, pod *corev1.Pod, evictOptions framework.EvictOptions, client client.Client, args *deschedulerconfig.MigrationControllerArgs) error

func New

func New(args runtime.Object, handle framework.Handle) (framework.Plugin, error)

func WithContext added in v0.7.0

func WithContext(ctx context.Context, jobCtx *JobContext) context.Context

Types

type JobContext added in v0.7.0

type JobContext struct {
	Labels      map[string]string
	Annotations map[string]string
	Timeout     *time.Duration
	Mode        sev1alpha1.PodMigrationJobMode
}

func FromContext added in v0.7.0

func FromContext(ctx context.Context) *JobContext

func (*JobContext) ApplyTo added in v0.7.0

func (c *JobContext) ApplyTo(job *sev1alpha1.PodMigrationJob) error

type Reconciler

type Reconciler struct {
	client.Client
	// contains filtered or unexported fields
}

func (*Reconciler) Evict

func (r *Reconciler) Evict(ctx context.Context, pod *corev1.Pod, evictOptions framework.EvictOptions) bool

Evict evicts a pod

func (*Reconciler) Filter

func (r *Reconciler) Filter(pod *corev1.Pod) bool

Filter checks if a pod can be evicted

func (*Reconciler) Name

func (r *Reconciler) Name() string

func (*Reconciler) PreEvictionFilter added in v1.2.0

func (r *Reconciler) PreEvictionFilter(pod *corev1.Pod) bool

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a PodMigrationJob object and makes changes based on the state read and what is in the Spec Automatically generate RBAC rules to allow the Controller to read and write Deployments

func (*Reconciler) Start

func (r *Reconciler) Start(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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