Documentation ¶
Index ¶
- func GetImageStreamSize(osClient osclient.Interface, is *imageapi.ImageStream, ...) *resource.Quantity
- func GetImageStreamSizeIncrement(osClient osclient.Interface, is *imageapi.ImageStream, image *imageapi.Image, ...) (isSize, sizeIncrement *resource.Quantity, err error)
- func NewImageRegistry(osClient osclient.Interface) quota.Registry
- func NewImageStreamEvaluator(osClient osclient.Interface) kquota.Evaluator
- func NewImageStreamMappingEvaluator(osClient osclient.Interface) kquota.Evaluator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetImageStreamSize ¶
func GetImageStreamSize(osClient osclient.Interface, is *imageapi.ImageStream, imageCache map[string]*imageapi.Image) *resource.Quantity
GetImageStreamSize computes a sum of sizes of image layers occupying given image stream. Each layer is added just once even if it occurs in multiple images.
func GetImageStreamSizeIncrement ¶
func GetImageStreamSizeIncrement(osClient osclient.Interface, is *imageapi.ImageStream, image *imageapi.Image, imageCache map[string]*imageapi.Image) (isSize, sizeIncrement *resource.Quantity, err error)
GetImageStreamSizeIncrement computes a sum of sizes of image layers occupying given image stream. Additionally it returns an increment which will be added to the size when the given image will be tagged into the image stream. In case the is is nil, returned size will be 0 and returned increment will equal to the image size.
Size increment will always be less or equal to the image size. Less means, that some of image's layers are already stored in a registry.
func NewImageRegistry ¶
NewImageRegistry returns a registry for quota evaluation of OpenShift resources related to images and image streams.
func NewImageStreamEvaluator ¶
NewImageStreamEvaluator computes resource usage of ImageStreams. Instantiating this is necessary for image resource quota admission controller to properly work on ImageStreamMapping objects. Project image size usage must be evaluated in quota's usage status before a CREATE operation on ImageStreamMapping can be allowed.
func NewImageStreamMappingEvaluator ¶
NewImageStreamMappingEvaluator computes resource usage for ImageStreamMapping objects. This particular kind is a virtual resource. It depends on ImageStream usage evaluator to compute project image size accross all image streams in the namespace.
Types ¶
This section is empty.