v4.1.0+incompatible Latest Latest

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 22 Imported by: 63




View Source
const (
	PluginName = ""


This section is empty.


func GetImageStreamUsage

func GetImageStreamUsage(is *imageapi.ImageStream) corev1.ResourceList

GetImageStreamUsage counts number of unique internally managed images occupying given image stream. It returns a number of unique image references found in the image stream spec not contained in processedSpecRefs and a number of unique image hashes contained in iS status not contained in processedStatusRefs. Given sets will be updated with new references found.

func NewImageLimitRangerPlugin

func NewImageLimitRangerPlugin(config io.Reader) (admission.Interface, error)

NewImageLimitRangerPlugin provides a new imageLimitRangerPlugin.

func Register

func Register(plugins *admission.Plugins)


type InternalImageReferenceHandler

type InternalImageReferenceHandler func(imageReference string, inSpec, inStatus bool)

InternalImageReferenceHandler is a function passed to the computer when processing images that allows a caller to perform actions on image references. The handler is called on a unique image reference just once. Argument inSpec says whether the image reference is present in an image stream spec. The inStatus says the same for an image stream status.

The reference can either be:

  1. a docker image reference (e.g.
  2. an image stream tag (e.g. project/isname:latest)
  3. an image ID (e.g. sha256:2643199e5ed5047eeed22da854748ed88b3a63ba0497601ba75852f7b92d4640)

The first two a can be obtained only from IS spec. Processing of IS status can generate only the 3rd option.

The docker image reference will always be normalized such that registry url is always specified while a default docker namespace and tag are stripped.

type LimitRangesForNamespaceFunc

type LimitRangesForNamespaceFunc func(namespace string) ([]*corev1.LimitRange, error)

func (LimitRangesForNamespaceFunc) LimitsForNamespace

func (fn LimitRangesForNamespaceFunc) LimitsForNamespace(namespace string) (corev1.ResourceList, error)

type LimitVerifier

type LimitVerifier interface {
	VerifyLimits(namespace string, is *imageapi.ImageStream) error

func NewLimitVerifier

func NewLimitVerifier(limiter NamespaceLimiter) LimitVerifier

NewLimitVerifier accepts a NamespaceLimiter

type NamespaceLimiter

type NamespaceLimiter interface {
	LimitsForNamespace(namespace string) (corev1.ResourceList, error)

Jump to

Keyboard shortcuts

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