imageallowrules

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ErrImageNotAllowedIdentifier = "not allowed by any ImageAllowRule"

Variables

This section is empty.

Functions

func CheckImageAgainstRules

func CheckImageAgainstRules(ctx context.Context, c client.Reader, namespace string, image string, digest string, imageAllowRules []v1.ImageAllowRuleInstance, keychain authn.Keychain, opts ...remote.Option) error

CheckImageAgainstRules checks if the image is allowed by the given ImageAllowRules If no rules are given, the image is - DENIED if strict mode (deny-by-default) is enabled - ALLOWED if strict mode is disabled (the default) ! Only one single rule has to allow the image for this to pass !

func CheckImageAllowed

func CheckImageAllowed(ctx context.Context, c client.Reader, namespace, image, digest string, opts ...remote.Option) error

CheckImageAllowed checks if the image is allowed by the ImageAllowRules on cluster and project level

Types

type ErrImageNotAllowed

type ErrImageNotAllowed struct {
	Image string
}

func (*ErrImageNotAllowed) Error

func (e *ErrImageNotAllowed) Error() string

func (*ErrImageNotAllowed) Is

func (e *ErrImageNotAllowed) Is(target error) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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