Documentation
¶
Overview ¶
Package imagestreamtagwrapper implements a wrapper for a ctrlruntimeclient that assembles imagestreamtags client-side by fetching the corresponding imagestream and image(s).
It is a workaround to get a caching client for imagestreamtags even though they do not support the watch verb (xref https://github.com/openshift/api/issues/601).
Note that this still does not allow to get informers for imagestreamtags. Reacting to iamgestreamtags can be achieved by reacting to imagestreams and then enqueue all referenced tags.
Index ¶
- func MustNew(upstream ctrlruntimeclient.Client, cache cache.Cache) ctrlruntimeclient.Client
- func MustNewWithImageReader(upstream ctrlruntimeclient.Client, cache cache.Cache, ...) ctrlruntimeclient.Client
- func New(upstream ctrlruntimeclient.Client, cache cache.Cache) (ctrlruntimeclient.Client, error)
- func NewWithImageReader(upstream ctrlruntimeclient.Client, cache cache.Cache, ...) (ctrlruntimeclient.Client, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNew ¶
func MustNew(upstream ctrlruntimeclient.Client, cache cache.Cache) ctrlruntimeclient.Client
MustNew panics when there was an error during initialisation
func MustNewWithImageReader ¶
func MustNewWithImageReader(upstream ctrlruntimeclient.Client, cache cache.Cache, imageReader ctrlruntimeclient.Reader) ctrlruntimeclient.Client
MustNewWithImageReader is like NewWithImageReader but panics on initialization errors.
func New ¶
func New(upstream ctrlruntimeclient.Client, cache cache.Cache) (ctrlruntimeclient.Client, error)
New returns a new imagestreamtagwrapper. Only use with a caching client as upstream, as it has to fetch multiple objects in order to construct an imagestreamtag, which is more expensive than just getting it directly when not using a cache.
func NewWithImageReader ¶
func NewWithImageReader(upstream ctrlruntimeclient.Client, cache cache.Cache, imageReader ctrlruntimeclient.Reader) (ctrlruntimeclient.Client, error)
NewWithImageReader returns a wrapper that reads Images from imageReader instead of caching every Image in the cluster. ImageStreams remain cached because controllers watch them for changes.
Types ¶
This section is empty.