container

package
v0.0.0-...-354d10d Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCheck

func NewCheck(image string, opts ...Option) *containerCheck

NewCheck is a check that runs preflight's Container Policy.

Types

type Option

type Option = func(*containerCheck)

func WithCertificationProject

func WithCertificationProject(id, token string) Option

WithCertificationProject adds the project's id and pyxis token to the check allowing for the project's metadata to change the certification (if necessary). An example might be the Scratch or Privileged flags on a project allowing for the corresponding policy to be executed.

func WithDockerConfigJSONFromFile

func WithDockerConfigJSONFromFile(s string) Option

func WithInsecureConnection

func WithInsecureConnection() Option

WithInsecureConnection allows for preflight to connect to an insecure registry to pull images.

func WithManifestListDigest

func WithManifestListDigest(manifestListDigest string) Option

WithManifestListDigest signifies that we have a manifest list and should add this digest to any Pyxis calls. This is only valid when submitting to Pyxis. Otherwise, it will be ignored.

func WithPlatform

func WithPlatform(platform string) Option

WithPlatform will define for what platform the image should be pulled. E.g. amd64, s390x.

func WithPyxisEnv

func WithPyxisEnv(env string) Option

WithPyxisEnv will set the pyxis host for interactions and submission based on the provided value of env. If the selected env is unknown, prod is used. Choose from [prod, uat, qa, stage].

func WithPyxisHost

func WithPyxisHost(host string) Option

WithPyxisHost explicitly sets the pyxis host for pyxis interactions. Useful for debugging or testing against a very specific pyxis endpoint. Most callers should use the "WithPyxisEnv" option instead.

Jump to

Keyboard shortcuts

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