pod

package
v1.24.17 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 31 Imported by: 133

Documentation

Overview

Package pod provides Registry interface and it's RESTStorage implementation for storing Pod api objects.

Index

Constants

This section is empty.

Variables

View Source
var EphemeralContainersStrategy = podEphemeralContainersStrategy{Strategy}

EphemeralContainersStrategy wraps and exports the used podStrategy for the storage package.

View Source
var StatusStrategy = podStatusStrategy{Strategy}

StatusStrategy wraps and exports the used podStrategy for the storage package.

Strategy is the default logic that applies when creating and updating Pod objects via the REST API.

Functions

func AttachLocation

func AttachLocation(
	ctx context.Context,
	getter ResourceGetter,
	connInfo client.ConnectionInfoGetter,
	name string,
	opts *api.PodAttachOptions,
) (*url.URL, http.RoundTripper, error)

AttachLocation returns the attach URL for a pod container. If opts.Container is blank and only one container is present in the pod, that container is used.

func ExecLocation

func ExecLocation(
	ctx context.Context,
	getter ResourceGetter,
	connInfo client.ConnectionInfoGetter,
	name string,
	opts *api.PodExecOptions,
) (*url.URL, http.RoundTripper, error)

ExecLocation returns the exec URL for a pod container. If opts.Container is blank and only one container is present in the pod, that container is used.

func GetAttrs added in v1.6.0

func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error)

GetAttrs returns labels and fields of a given object for filtering purposes.

func Indexers added in v1.18.0

func Indexers() *cache.Indexers

Indexers returns the indexers for pod storage.

func LogLocation

func LogLocation(
	ctx context.Context, getter ResourceGetter,
	connInfo client.ConnectionInfoGetter,
	name string,
	opts *api.PodLogOptions,
) (*url.URL, http.RoundTripper, error)

LogLocation returns the log URL for a pod container. If opts.Container is blank and only one container is present in the pod, that container is used.

func MatchPod

MatchPod returns a generic matcher for a given label and field selector.

func NodeNameIndexFunc added in v1.18.0

func NodeNameIndexFunc(obj interface{}) ([]string, error)

NodeNameIndexFunc return value spec.nodename of given object.

func NodeNameTriggerFunc

func NodeNameTriggerFunc(obj runtime.Object) string

NodeNameTriggerFunc returns value spec.nodename of given object.

func PortForwardLocation

func PortForwardLocation(
	ctx context.Context,
	getter ResourceGetter,
	connInfo client.ConnectionInfoGetter,
	name string,
	opts *api.PodPortForwardOptions,
) (*url.URL, http.RoundTripper, error)

PortForwardLocation returns the port-forward URL for a pod.

func ResourceLocation

func ResourceLocation(ctx context.Context, getter ResourceGetter, rt http.RoundTripper, id string) (*url.URL, http.RoundTripper, error)

ResourceLocation returns a URL to which one can send traffic for the specified pod.

func ToSelectableFields added in v1.18.0

func ToSelectableFields(pod *api.Pod) fields.Set

ToSelectableFields returns a field set that represents the object TODO: fields are not labels, and the validation rules for them do not apply.

Types

type ResourceGetter

type ResourceGetter interface {
	Get(context.Context, string, *metav1.GetOptions) (runtime.Object, error)
}

ResourceGetter is an interface for retrieving resources by ResourceLocation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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