sandbox

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = &Config{}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Source string `json:"source" pflag:",Path of your source code"`

	// Flytectl sandbox only supports Flyte version available in Github release https://github.com/flyteorg/flyte/tags.
	// Flytectl sandbox will only work for v0.10.0+.
	// Default value dind represents the latest release.
	Version string `json:"version" pflag:",Version of flyte. Only supports flyte releases greater than v0.10.0"`

	// Optionally it is possible to specify a specific fqn for the docker image with the tag. This should be
	// Flyte compliant sandbox image. Usually useful, if you want to push the image to your own registry and relaunch
	// from there.
	Image string `json:"image" pflag:",Optional. Provide a fully qualified path to a Flyte compliant docker image."`

	// Default value false represents that Flytectl will not use the latest pre-release if it exists.
	Prerelease bool `json:"pre" pflag:",Optional. Pre release Version of flyte will be used for sandbox."`

	// Optionally it is possible to pass in environment variables to sandbox container.
	Env []string `json:"env" pflag:",Optional. Provide Env variable in key=value format which can be passed to sandbox container."`

	// Optionally it is possible to use local sandbox image
	// Flytectl will not pull the image from the registry if the local flag passes. It is usually useful while testing your local images without pushing them to a registry.
	ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"`

	ImagePullOptions ImagePullOptions `json:"imagePullOptions" pflag:",Optional. Defines image pull options (e.g. auth)"`
}

Config holds configuration flags for sandbox command.

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

type ImagePullOptions added in v0.5.9

type ImagePullOptions struct {
	RegistryAuth string `json:"registryAuth" pflag:",The base64 encoded credentials for the registry."`
	Platform     string `json:"platform" pflag:",Forces a specific platform's image to be pulled.'"`
}

type ImagePullPolicy added in v0.3.23

type ImagePullPolicy int
const (
	ImagePullPolicyAlways ImagePullPolicy = iota
	ImagePullPolicyIfNotPresent
	ImagePullPolicyNever
)

func ImagePullPolicyString added in v0.3.23

func ImagePullPolicyString(s string) (ImagePullPolicy, error)

ImagePullPolicyString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ImagePullPolicyValues added in v0.3.23

func ImagePullPolicyValues() []ImagePullPolicy

ImagePullPolicyValues returns all values of the enum

func (ImagePullPolicy) IsAImagePullPolicy added in v0.3.23

func (i ImagePullPolicy) IsAImagePullPolicy() bool

IsAImagePullPolicy returns "true" if the value is listed in the enum definition. "false" otherwise

func (ImagePullPolicy) MarshalJSON added in v0.3.23

func (i ImagePullPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for ImagePullPolicy

func (*ImagePullPolicy) Set added in v0.3.23

func (i *ImagePullPolicy) Set(val string) error

Set implements PFlag's Value interface to attempt to set the value of the flag from string.

func (ImagePullPolicy) String added in v0.3.23

func (i ImagePullPolicy) String() string

func (ImagePullPolicy) Type added in v0.3.23

func (i ImagePullPolicy) Type() string

Type implements PFlag's Value interface to return type name.

func (*ImagePullPolicy) UnmarshalJSON added in v0.3.23

func (i *ImagePullPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ImagePullPolicy

Jump to

Keyboard shortcuts

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