kubernetes: k8s.io/kubernetes/pkg/registry/core/pod Index | Files | Directories

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

Package Files

doc.go strategy.go

Variables

var EphemeralContainersStrategy = podEphemeralContainersStrategy{Strategy}

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

var StatusStrategy = podStatusStrategy{Strategy}

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

var Strategy = podStrategy{legacyscheme.Scheme, names.SimpleNameGenerator}

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

func AttachLocation Uses

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 Uses

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 Uses

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

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

func Indexers Uses

func Indexers() *cache.Indexers

Indexers returns the indexers for pod storage.

func LogLocation Uses

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 Uses

func MatchPod(label labels.Selector, field fields.Selector) storage.SelectionPredicate

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

func NodeNameIndexFunc Uses

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

NodeNameIndexFunc return value spec.nodename of given object.

func NodeNameTriggerFunc Uses

func NodeNameTriggerFunc(obj runtime.Object) string

NodeNameTriggerFunc returns value spec.nodename of given object.

func PortForwardLocation Uses

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 Uses

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 Uses

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.

type ResourceGetter Uses

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

ResourceGetter is an interface for retrieving resources by ResourceLocation.

Directories

PathSynopsis
rest
storage

Package pod imports 31 packages (graph) and is imported by 53 packages. Updated 2020-09-24. Refresh now. Tools for package owners.