Documentation ¶
Overview ¶
Package pod provides Registry interface and it's RESTStorage implementation for storing Pod api objects.
Index ¶
- Variables
- func AttachLocation(ctx context.Context, getter ResourceGetter, ...) (*url.URL, http.RoundTripper, error)
- func ExecLocation(ctx context.Context, getter ResourceGetter, ...) (*url.URL, http.RoundTripper, error)
- func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error)
- func Indexers() *cache.Indexers
- func LogLocation(ctx context.Context, getter ResourceGetter, ...) (*url.URL, http.RoundTripper, error)
- func MatchPod(label labels.Selector, field fields.Selector) storage.SelectionPredicate
- func NamespaceIndexFunc(obj interface{}) ([]string, error)
- func NodeNameIndexFunc(obj interface{}) ([]string, error)
- func NodeNameTriggerFunc(obj runtime.Object) string
- func PortForwardLocation(ctx context.Context, getter ResourceGetter, ...) (*url.URL, http.RoundTripper, error)
- func ResourceLocation(ctx context.Context, getter ResourceGetter, rt http.RoundTripper, id string) (*url.URL, http.RoundTripper, error)
- func ToSelectableFields(pod *api.Pod) fields.Set
- type ResourceGetter
Constants ¶
This section is empty.
Variables ¶
var EphemeralContainersStrategy = podEphemeralContainersStrategy{Strategy}
EphemeralContainersStrategy wraps and exports the used podStrategy for the storage package.
var ResizeStrategy = podResizeStrategy{ // contains filtered or unexported fields }
ResizeStrategy 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.
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
GetAttrs returns labels and fields of a given object for filtering purposes.
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 NamespaceIndexFunc ¶ added in v1.30.0
NamespaceIndexFunc return value name of given object.
func NodeNameIndexFunc ¶ added in v1.18.0
NodeNameIndexFunc return value spec.nodename of given object.
func NodeNameTriggerFunc ¶
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.
Types ¶
type ResourceGetter ¶
type ResourceGetter interface {
Get(context.Context, string, *metav1.GetOptions) (runtime.Object, error)
}
ResourceGetter is an interface for retrieving resources by ResourceLocation.