Documentation ¶
Index ¶
- Constants
- Variables
- func CreatePodMigrationJob(ctx context.Context, pod *corev1.Pod, evictOptions framework.EvictOptions, ...) error
- func New(args runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func WithContext(ctx context.Context, jobCtx *JobContext) context.Context
- type JobContext
- type Reconciler
- func (r *Reconciler) Evict(ctx context.Context, pod *corev1.Pod, evictOptions framework.EvictOptions) bool
- func (r *Reconciler) Filter(pod *corev1.Pod) bool
- func (r *Reconciler) Name() string
- func (r *Reconciler) PreEvictionFilter(pod *corev1.Pod) bool
- func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (r *Reconciler) Start(ctx context.Context) error
Constants ¶
View Source
const (
Name = names.MigrationController
)
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 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 ¶
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
Click to show internal directories.
Click to hide internal directories.