Documentation ¶
Index ¶
- func FailOnResolutionFailure(imageResolutionType imagepolicyapiv1.ImageResolutionType) bool
- func NewInitializer(imageMutators imagereferencemutators.ImageMutators, ...) admission.PluginInitializer
- func Register(plugins *admission.Plugins)
- func RequestsResolution(imageResolutionType imagepolicyapiv1.ImageResolutionType) bool
- func RewriteImagePullSpec(imageResolutionType imagepolicyapiv1.ImageResolutionType) bool
- type ImagePolicyPlugin
- func (a *ImagePolicyPlugin) Admit(ctx context.Context, attr admission.Attributes, _ admission.ObjectInterfaces) error
- func (a *ImagePolicyPlugin) SetExternalKubeInformerFactory(kubeInformers informers.SharedInformerFactory)
- func (a *ImagePolicyPlugin) SetImageMutators(imageMutators imagereferencemutators.ImageMutators)
- func (a *ImagePolicyPlugin) SetInternalImageRegistry(internalImageRegistryName string)
- func (a *ImagePolicyPlugin) SetRESTClientConfig(restClientConfig rest.Config)
- func (a *ImagePolicyPlugin) Validate(ctx context.Context, attr admission.Attributes, _ admission.ObjectInterfaces) error
- func (a *ImagePolicyPlugin) ValidateInitialization() error
- type WantsImageMutators
- type WantsInternalImageRegistry
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 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 ¶
func (a *ImagePolicyPlugin) Admit(ctx context.Context, attr admission.Attributes, _ admission.ObjectInterfaces) error
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 ¶
func (a *ImagePolicyPlugin) Validate(ctx context.Context, attr admission.Attributes, _ admission.ObjectInterfaces) error
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. |
Click to show internal directories.
Click to hide internal directories.