image

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

func NewImageRegistry(osClient osclient.Interface) quota.Registry

NewImageRegistry returns a registry for quota evaluation of OpenShift resources related to images and image streams.

func NewImageStreamEvaluator

func NewImageStreamEvaluator(osClient osclient.Interface) kquota.Evaluator

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

func NewImageStreamMappingEvaluator(osClient osclient.Interface) kquota.Evaluator

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL