Documentation ¶
Index ¶
- type ByWeight
- type Manager
- type PlacementPolicyManager
- func (m *PlacementPolicyManager) AnnotatePod(ctx context.Context, pod *corev1.Pod, pp *v1alpha1.PlacementPolicy, ...) (*corev1.Pod, error)
- func (m *PlacementPolicyManager) GetPlacementPolicy(ctx context.Context, namespace, name string) (*v1alpha1.PlacementPolicy, error)
- func (m *PlacementPolicyManager) GetPlacementPolicyForPod(ctx context.Context, pod *corev1.Pod) (*v1alpha1.PlacementPolicy, error)
- func (m *PlacementPolicyManager) GetPodsWithLabels(ctx context.Context, podLabels map[string]string) ([]*corev1.Pod, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByWeight ¶
type ByWeight []*v1alpha1.PlacementPolicy
type Manager ¶
type Manager interface { GetPlacementPolicyForPod(context.Context, *corev1.Pod) (*v1alpha1.PlacementPolicy, error) GetPodsWithLabels(context.Context, map[string]string) ([]*corev1.Pod, error) AnnotatePod(context.Context, *corev1.Pod, *v1alpha1.PlacementPolicy, bool) (*corev1.Pod, error) GetPlacementPolicy(context.Context, string, string) (*v1alpha1.PlacementPolicy, error) }
Manager defines the interfaces for PlacementPolicy management.
type PlacementPolicyManager ¶
type PlacementPolicyManager struct {
// contains filtered or unexported fields
}
func NewPlacementPolicyManager ¶
func NewPlacementPolicyManager( client kubernetes.Interface, ppClient ppclientset.Interface, snapshotSharedLister framework.SharedLister, ppInformer ppinformers.PlacementPolicyInformer, podLister corelisters.PodLister) *PlacementPolicyManager
func (*PlacementPolicyManager) AnnotatePod ¶
func (m *PlacementPolicyManager) AnnotatePod(ctx context.Context, pod *corev1.Pod, pp *v1alpha1.PlacementPolicy, preferredNodeWithMatchingLabels bool) (*corev1.Pod, error)
AnnotatePod annotates the pod with the placement policy.
func (*PlacementPolicyManager) GetPlacementPolicy ¶
func (m *PlacementPolicyManager) GetPlacementPolicy(ctx context.Context, namespace, name string) (*v1alpha1.PlacementPolicy, error)
func (*PlacementPolicyManager) GetPlacementPolicyForPod ¶
func (m *PlacementPolicyManager) GetPlacementPolicyForPod(ctx context.Context, pod *corev1.Pod) (*v1alpha1.PlacementPolicy, error)
GetPlacementPolicyForPod returns the placement policy for the given pod
func (*PlacementPolicyManager) GetPodsWithLabels ¶
Click to show internal directories.
Click to hide internal directories.