imageallowrules

package
v0.8.0-alpha7 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func GenerateSimpleAllowRule

func GenerateSimpleAllowRule(namespace string, name string, image string, scope string) (*v1.ImageAllowRule, error)

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

type SimpleImageScope

type SimpleImageScope string
const (
	SimpleImageScopeRegistry   SimpleImageScope = "registry"
	SimpleImageScopeRepository SimpleImageScope = "repository"
	SimpleImageScopeExact      SimpleImageScope = "exact"
	SimpleImageScopeAll        SimpleImageScope = "all"
)

Jump to

Keyboard shortcuts

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