selectors

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package selectors provides selectors for filtering Kubernetes objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerSelector

type ContainerSelector func(index int, c *corev1.Container) bool

ContainerSelector is a function that determines if a container matches a specific criteria for mutation.

In the context of a Mutator Apply() pass, the selector is evaluated against the original container snapshot before any edits are applied. This ensures stable matching even if an earlier edit renames the container.

func AllContainers

func AllContainers() ContainerSelector

AllContainers returns a ContainerSelector that matches all containers.

func ContainerAtIndex

func ContainerAtIndex(index int) ContainerSelector

ContainerAtIndex returns a ContainerSelector that matches a container at the given index.

func ContainerNamed

func ContainerNamed(name string) ContainerSelector

ContainerNamed returns a ContainerSelector that matches a container with the given name.

func ContainerNotNamed added in v0.7.1

func ContainerNotNamed(name string) ContainerSelector

ContainerNotNamed returns a ContainerSelector that matches all containers except the one with the given name.

func ContainersNamed

func ContainersNamed(names ...string) ContainerSelector

ContainersNamed returns a ContainerSelector that matches containers with any of the given names.

func ContainersNotNamed added in v0.7.1

func ContainersNotNamed(names ...string) ContainerSelector

ContainersNotNamed returns a ContainerSelector that matches all containers except those with any of the given names.

Jump to

Keyboard shortcuts

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