Documentation ¶
Index ¶
- func CollectImageInfo(kc client.Client, pod *core.Pod, images map[string]kmapi.ImageInfo, ...) (map[string]kmapi.ImageInfo, error)
- func CollectPullCredentials(pod *core.Pod, refs map[string]kmapi.PullCredentials) (map[string]kmapi.PullCredentials, error)
- func DetectLineage(ctx context.Context, kc client.Client, obj client.Object) ([]kmapi.ObjectInfo, error)
- func GetImageRef(containerImage, statusImage, statusImageID string) (string, error)
- type Cachable
- type DynamicCachableOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectImageInfo ¶ added in v0.25.13
func CollectPullCredentials ¶ added in v0.25.15
func CollectPullCredentials(pod *core.Pod, refs map[string]kmapi.PullCredentials) (map[string]kmapi.PullCredentials, error)
func DetectLineage ¶ added in v0.25.13
func GetImageRef ¶ added in v0.25.13
Types ¶
type Cachable ¶
type Cachable interface { GVK(gvk schema.GroupVersionKind) (bool, error) GVR(gvr schema.GroupVersionResource) (bool, error) }
func NewCachable ¶
func NewCachable(cl discovery.DiscoveryInterface) (Cachable, error)
func NewDynamicCachable ¶
func NewDynamicCachable(cfg *rest.Config, opts ...DynamicCachableOption) (Cachable, error)
NewDynamicCachable returns a dynamic Cachable for cfg. The dynamic Cachable dynamically discovers resource types at runtime. opts configure the Cachable.
type DynamicCachableOption ¶
type DynamicCachableOption func(*dynamicCachable) error
DynamicCachableOption is a functional option on the dynamicCachable
var WithLazyDiscovery DynamicCachableOption = func(drm *dynamicCachable) error { drm.lazy = true return nil }
WithLazyDiscovery prevents the Cachable from discovering REST mappings until an API call is made.
func WithCustomCachable ¶
func WithCustomCachable(newCachable func() (Cachable, error)) DynamicCachableOption
WithCustomCachable supports setting a custom Cachable refresher instead of the default method, which uses a discovery client.
This exists mainly for testing, but can be useful if you need tighter control over how discovery is performed, which discovery endpoints are queried, etc.
func WithLimiter ¶
func WithLimiter(lim *rate.Limiter) DynamicCachableOption
WithLimiter sets the Cachable's underlying limiter to lim.