Documentation ¶
Index ¶
- Constants
- func New(plArgs runtime.Object, fh framework.Handle) (framework.Plugin, error)
- type VolumeBinding
- func (pl *VolumeBinding) EventsToRegister() []framework.ClusterEvent
- func (pl *VolumeBinding) Filter(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (pl *VolumeBinding) Name() string
- func (pl *VolumeBinding) PreBind(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
- func (pl *VolumeBinding) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) *framework.Status
- func (pl *VolumeBinding) PreFilterExtensions() framework.PreFilterExtensions
- func (pl *VolumeBinding) Reserve(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
- func (pl *VolumeBinding) Score(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
- func (pl *VolumeBinding) ScoreExtensions() framework.ScoreExtensions
- func (pl *VolumeBinding) Unreserve(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string)
Constants ¶
const (
// DefaultBindTimeoutSeconds defines the default bind timeout in seconds
DefaultBindTimeoutSeconds = 600
)
const Name = names.VolumeBinding
Name is the name of the plugin used in Registry and configurations.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type VolumeBinding ¶
type VolumeBinding struct { Binder scheduling.SchedulerVolumeBinder PVCLister corelisters.PersistentVolumeClaimLister GenericEphemeralVolumeFeatureEnabled bool // contains filtered or unexported fields }
VolumeBinding is a plugin that binds pod volumes in scheduling. In the Filter phase, pod binding cache is created for the pod and used in Reserve and PreBind phases.
func (*VolumeBinding) EventsToRegister ¶ added in v1.22.0
func (pl *VolumeBinding) EventsToRegister() []framework.ClusterEvent
EventsToRegister returns the possible events that may make a Pod failed by this plugin schedulable.
func (*VolumeBinding) Filter ¶
func (pl *VolumeBinding) Filter(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status
Filter invoked at the filter extension point. It evaluates if a pod can fit due to the volumes it requests, for both bound and unbound PVCs.
For PVCs that are bound, then it checks that the corresponding PV's node affinity is satisfied by the given node.
For PVCs that are unbound, it tries to find available PVs that can satisfy the PVC requirements and that the PV node affinity is satisfied by the given node.
If storage capacity tracking is enabled, then enough space has to be available for the node and volumes that still need to be created.
The predicate returns true if all bound PVCs have compatible PVs with the node, and if all unbound PVCs can be matched with an available and node-compatible PV.
func (*VolumeBinding) Name ¶
func (pl *VolumeBinding) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*VolumeBinding) PreBind ¶ added in v1.19.0
func (pl *VolumeBinding) PreBind(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
PreBind will make the API update with the assumed bindings and wait until the PV controller has completely finished the binding operation.
If binding errors, times out or gets undone, then an error will be returned to retry scheduling.
func (*VolumeBinding) PreFilter ¶ added in v1.19.0
func (pl *VolumeBinding) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) *framework.Status
PreFilter invoked at the prefilter extension point to check if pod has all immediate PVCs bound. If not all immediate PVCs are bound, an UnschedulableAndUnresolvable is returned.
func (*VolumeBinding) PreFilterExtensions ¶ added in v1.19.0
func (pl *VolumeBinding) PreFilterExtensions() framework.PreFilterExtensions
PreFilterExtensions returns prefilter extensions, pod add and remove.
func (*VolumeBinding) Reserve ¶ added in v1.19.0
func (pl *VolumeBinding) Reserve(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
Reserve reserves volumes of pod and saves binding status in cycle state.
func (*VolumeBinding) Score ¶ added in v1.21.0
func (pl *VolumeBinding) Score(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the score extension point.
func (*VolumeBinding) ScoreExtensions ¶ added in v1.21.0
func (pl *VolumeBinding) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
func (*VolumeBinding) Unreserve ¶ added in v1.19.0
func (pl *VolumeBinding) Unreserve(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string)
Unreserve clears assumed PV and PVC cache. It's idempotent, and does nothing if no cache found for the given pod.