imagepolicy

package
v0.0.0-...-d679cd3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailOnResolutionFailure

func FailOnResolutionFailure(imageResolutionType imagepolicyapiv1.ImageResolutionType) bool

FailOnResolutionFailure returns true if you should fail when resolution fails

func NewInitializer

func NewInitializer(imageMutators imagereferencemutators.ImageMutators, internalImageRegistry string) admission.PluginInitializer

func Register

func Register(plugins *admission.Plugins)

func RequestsResolution

func RequestsResolution(imageResolutionType imagepolicyapiv1.ImageResolutionType) bool

RequestsResolution returns true if you should attempt to resolve image pull specs

func RewriteImagePullSpec

func RewriteImagePullSpec(imageResolutionType imagepolicyapiv1.ImageResolutionType) bool

RewriteImagePullSpec returns true if you should rewrite image pull specs when resolution succeeds

Types

type ImagePolicyPlugin

type ImagePolicyPlugin struct {
	*admission.Handler

	Client imagev1client.Interface

	NsLister corev1listers.NamespaceLister
	// contains filtered or unexported fields
}

func NewImagePolicyPlugin

func NewImagePolicyPlugin(parsed *imagepolicy.ImagePolicyConfig) (*ImagePolicyPlugin, error)

ImagePolicyPlugin returns an admission controller for pods that controls what images are allowed to run on the cluster.

func (*ImagePolicyPlugin) Admit

Admit attempts to apply the image policy to the incoming resource.

func (*ImagePolicyPlugin) SetExternalKubeInformerFactory

func (a *ImagePolicyPlugin) SetExternalKubeInformerFactory(kubeInformers informers.SharedInformerFactory)

func (*ImagePolicyPlugin) SetImageMutators

func (a *ImagePolicyPlugin) SetImageMutators(imageMutators imagereferencemutators.ImageMutators)

func (*ImagePolicyPlugin) SetInternalImageRegistry

func (a *ImagePolicyPlugin) SetInternalImageRegistry(internalImageRegistryName string)

func (*ImagePolicyPlugin) SetRESTClientConfig

func (a *ImagePolicyPlugin) SetRESTClientConfig(restClientConfig rest.Config)

func (*ImagePolicyPlugin) Validate

Validate attempts to apply the image policy to the incoming resource.

func (*ImagePolicyPlugin) ValidateInitialization

func (a *ImagePolicyPlugin) ValidateInitialization() error

Validate ensures that all required interfaces have been provided, or returns an error.

type WantsImageMutators

type WantsImageMutators interface {
	SetImageMutators(imagereferencemutators.ImageMutators)
	admission.InitializationValidator
}

type WantsInternalImageRegistry

type WantsInternalImageRegistry interface {
	SetInternalImageRegistry(string)
	admission.InitializationValidator
}

Directories

Path Synopsis
apis
imagepolicy/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.

Jump to

Keyboard shortcuts

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