package pod

import "k8s.io/kubernetes/pkg/registry/core/pod"

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

Index

Variables

var EphemeralContainersStrategy = podEphemeralContainersStrategy{Strategy}
var StatusStrategy = podStatusStrategy{Strategy}
var Strategy = podStrategy{legacyscheme.Scheme, names.SimpleNameGenerator}

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

var StrategyWithoutGraceful = podStrategyWithoutGraceful{Strategy}

StrategyWithoutGraceful implements the legacy instant delete behavior.

Functions

func AttachLocation

func AttachLocation(
	getter ResourceGetter,
	connInfo client.ConnectionInfoGetter,
	ctx context.Context,
	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(
	getter ResourceGetter,
	connInfo client.ConnectionInfoGetter,
	ctx context.Context,
	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

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

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

func LogLocation

func LogLocation(
	getter ResourceGetter,
	connInfo client.ConnectionInfoGetter,
	ctx context.Context,
	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 NodeNameTriggerFunc

func NodeNameTriggerFunc(obj runtime.Object) string

NodeNameTriggerFunc returns value spec.nodename of given object.

func PodToSelectableFields

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

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

func PortForwardLocation

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

PortForwardLocation returns the port-forward URL for a pod.

func ResourceLocation

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

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

Types

type ResourceGetter

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

ResourceGetter is an interface for retrieving resources by ResourceLocation.

Source Files

doc.go strategy.go

Directories

PathSynopsis
pkg/registry/core/pod/rest
pkg/registry/core/pod/storage
Version
v1.17.8
Published
Jun 26, 2020
Platform
js/wasm
Imports
28 packages
Last checked
2 minutes ago

Tools for package owners.