Documentation ¶
Index ¶
- func GetPodSpec(obj runtime.Object) (*kapi.PodSpec, *field.Path, error)
- func GetPodSpecV1(obj runtime.Object) (*kapiv1.PodSpec, *field.Path, error)
- func HasPodSpec(gr schema.GroupResource) (schema.GroupKind, bool)
- type ContainerMutator
- type ImageReferenceMutateFunc
- type ImageReferenceMutator
- type PodSpecReferenceMutator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPodSpec ¶
GetPodSpec returns a mutable pod spec out of the provided object, including a field path to the field in the object, or an error if the object does not contain a pod spec. This only returns internal objects.
func GetPodSpecV1 ¶
GetPodSpecV1 returns a mutable pod spec out of the provided object, including a field path to the field in the object, or an error if the object does not contain a pod spec. This only returns pod specs for v1 compatible objects.
func HasPodSpec ¶
func HasPodSpec(gr schema.GroupResource) (schema.GroupKind, bool)
HasPodSpec returns true if the resource is known to have a pod spec.
Types ¶
type ContainerMutator ¶
type ImageReferenceMutateFunc ¶
type ImageReferenceMutateFunc func(ref *kapi.ObjectReference) error
ImageReferenceMutateFunc is passed a reference representing an image, and may alter the Name, Kind, and Namespace fields of the reference. If an error is returned the object may still be mutated under the covers.
type ImageReferenceMutator ¶
type ImageReferenceMutator interface { // Mutate invokes fn on every image reference in the object. If fn returns an error, // a field.Error is added to the list to be returned. Mutate does not terminate early // if errors are detected. Mutate(fn ImageReferenceMutateFunc) field.ErrorList }
func GetImageReferenceMutator ¶
func GetImageReferenceMutator(obj runtime.Object) (ImageReferenceMutator, error)
GetImageReferenceMutator returns a mutator for the provided object, or an error if no such mutator is defined.
type PodSpecReferenceMutator ¶
type PodSpecReferenceMutator interface { GetContainerByIndex(init bool, i int) (ContainerMutator, bool) GetContainerByName(name string) (ContainerMutator, bool) Path() *field.Path }
func GetPodSpecReferenceMutator ¶
func GetPodSpecReferenceMutator(obj runtime.Object) (PodSpecReferenceMutator, error)
GetPodSpecReferenceMutator returns a mutator for the provided object, or an error if no such mutator is defined.