Documentation ¶
Index ¶
- Variables
- func CheckPodMeetSelector(ctx context.Context, c client.Client, pod v1.Pod, ...) (bool, error)
- func SelectAndFilterPods(ctx context.Context, c client.Client, r client.Reader, ...) ([]v1.Pod, error)
- func SelectPods(ctx context.Context, c client.Client, r client.Reader, ...) ([]v1.Pod, error)
- type Params
- type Pod
- type SelectImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoPodSelected = errors.New("no pod is selected")
Functions ¶
func CheckPodMeetSelector ¶
func CheckPodMeetSelector(ctx context.Context, c client.Client, pod v1.Pod, selector v1alpha1.PodSelectorSpec, clusterScoped bool, targetNamespace string, enableFilterNamespace bool) (bool, error)
CheckPodMeetSelector checks if this pod meets the selection criteria.
func SelectAndFilterPods ¶
func SelectAndFilterPods(ctx context.Context, c client.Client, r client.Reader, spec *v1alpha1.PodSelector, clusterScoped bool, targetNamespace string, enableFilterNamespace bool) ([]v1.Pod, error)
SelectAndFilterPods returns the list of pods that filtered by selector and SelectorMode Deprecated: use pod.SelectImpl as instead
func SelectPods ¶
func SelectPods(ctx context.Context, c client.Client, r client.Reader, selector v1alpha1.PodSelectorSpec, clusterScoped bool, targetNamespace string, enableFilterNamespace bool) ([]v1.Pod, error)
SelectPods returns the list of pods that are available for pod chaos action. It returns all pods that match the configured label, annotation and namespace selectors. If pods are specifically specified by `selector.Pods`, it just returns the selector.Pods.
Types ¶
type SelectImpl ¶
func New ¶
func New(params Params) *SelectImpl
func (*SelectImpl) Select ¶
func (impl *SelectImpl) Select(ctx context.Context, ps *v1alpha1.PodSelector) ([]*Pod, error)
Click to show internal directories.
Click to hide internal directories.