Documentation
¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API.
Index ¶
- Constants
- Variables
- func SetObjectDefaults_Lockfile(in *Lockfile)
- func SetObjectDefaults_Repository(in *Repository)
- type BuildStatus
- type ContainerSpec
- type HashAlgorithm
- type Lockfile
- type LockfileSpec
- type LockfileStatus
- type ProcessorConfig
- type ProcessorStage
- type Repository
- type RepositoryBuildConfig
- type RepositorySourceConfig
- type RepositorySpec
- type StorageMount
Constants ¶
const KindLockfile = "Lockfile"
const KindRepository = "Repository"
const Version = "v1alpha1"
Variables ¶
var ( Kinds = []string{ KindRepository, KindLockfile, } Types = map[string]reflect.Type{ KindRepository: reflect.TypeOf((*Repository)(nil)).Elem(), KindLockfile: reflect.TypeOf((*Lockfile)(nil)).Elem(), } Defaulters = map[string]reflect.Value{ KindRepository: reflect.ValueOf(SetObjectDefaults_Repository), KindLockfile: reflect.ValueOf(SetObjectDefaults_Lockfile), } )
Functions ¶
func SetObjectDefaults_Lockfile ¶
func SetObjectDefaults_Lockfile(in *Lockfile)
func SetObjectDefaults_Repository ¶
func SetObjectDefaults_Repository(in *Repository)
Types ¶
type BuildStatus ¶
type BuildStatus struct { // Timestamp is the RFC 3339 timestamp for when the build was performed Timestamp string `json:"timestamp" yaml:"timestamp"` // DiscoHash is the discovery directory hash digest in the form of DiscoHashType DiscoHash string `json:"discoHash" yaml:"discoHash"` // DiscoHashType is the type of hash used to compute the discovery digest DiscoHashType HashAlgorithm `json:"discoHashType" yaml:"discoHashType"` // DiscoPath is the path to the discovery directory used to create the build DiscoPath string `json:"discoPath" yaml:"discoPath"` // BuildHash is the build directory hash digest in the form of BuildHashType BuildHash string `json:"buildHash" yaml:"buildHash"` // BuildHashType is the type of hash used to compute the build digest BuildHashType HashAlgorithm `json:"buildHashType" yaml:"buildHashType"` // BuildPath is the path to the build directory where the build output was written to BuildPath string `json:"buildPath" yaml:"buildPath"` }
BuildStatus defines the state of a build at the time it was built
type ContainerSpec ¶
type ContainerSpec struct { // Image is the container image to run Image string `json:"image" yaml:"image"` // Network defines network specific configuration Network bool `json:"network,omitempty" yaml:"network,omitempty"` // SuppressGitRoot prevents Kerria from automatically mounting the git root into the processor. // The destination for this automatic mount is /gitroot within the container SuppressGitRoot bool `json:"suppressGitRoot,omitempty" yaml:"suppressGitRoot,omitempty"` // +listType=map // +listMapKey=src // AdditionalMounts are additional storage or directories to mount into the container AdditionalMounts []StorageMount `json:"additionalMounts,omitempty" yaml:"additionalMounts,omitempty"` // +listType=atomic // Envs is a slice of env string that will be exposed to container Envs []string `json:"envs,omitempty" yaml:"envs,omitempty"` }
ContainerSpec defines a spec for running a function as a container
type HashAlgorithm ¶
type HashAlgorithm string
HashAlgorithm is a string enum representing the supported hash algorithms +enum
const ( MD5 HashAlgorithm = "md5" SHA1 HashAlgorithm = "sha1" SHA256 HashAlgorithm = "sha256" SHA512 HashAlgorithm = "sha512" )
type Lockfile ¶
type Lockfile struct { // +k8s:openapi-gen=true meta.TypeMeta `json:",inline" yaml:",inline"` // +k8s:openapi-gen=true meta.ObjectMeta `json:"metadata" yaml:"metadata"` Spec LockfileSpec `json:"spec,omitempty" yaml:"spec,omitempty"` Status LockfileStatus `json:"status,omitempty" yaml:"status,omitempty"` }
Lockfile is the current build state of the managed repository
type LockfileSpec ¶
type LockfileSpec struct { // +default="sha256" DefaultHash string `json:"defaultHash,omitempty" yaml:"defaultHash,omitempty"` }
LockfileSpec represents the configuration for how to manage the lockfile
type LockfileStatus ¶
type LockfileStatus struct { // +listType=map // +listMapKey=discoPath // Builds is a list of BuildStatus for all builds in the repository Builds []BuildStatus `json:"builds" yaml:"builds"` }
LockfileStatus represents the current state of the lockfile
type ProcessorConfig ¶
type ProcessorConfig struct { Name string `json:"name" yaml:"name"` // +default="None" // Stage is the build stage to run this processor in Stage ProcessorStage `json:"stage,omitempty" yaml:"stage,omitempty"` // Container defines the container that executes the processor Container ContainerSpec `json:"container" yaml:"container"` // Properties are arbitrary properties passed directly to the processor Properties interface{} `json:"properties,omitempty" yaml:"properties,omitempty"` }
ProcessorConfig defines how a processor should be configured for the repository
type ProcessorStage ¶
type ProcessorStage string
ProcessorStage is a string enum representing the build process stage a processor should run in +enum
const ( None ProcessorStage = "None" PreBuild ProcessorStage = "PreBuild" PostBuild ProcessorStage = "PostBuild" )
type Repository ¶
type Repository struct { meta.TypeMeta `json:",inline" yaml:",inline"` meta.ObjectMeta `json:"metadata" yaml:"metadata"` Spec RepositorySpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
Repository is the configuration API for a kerria-managed repository
type RepositoryBuildConfig ¶
type RepositoryBuildConfig struct { // +listType=atomic // +default=["--enable-helm", "--enable-alpha-plugins", "--network"] // KustomizeFlags are a list of additional flags to add to the `kustomize build` command KustomizeFlags []string `json:"kustomizeFlags,omitempty" yaml:"kustomizeFlags,omitempty"` // +default="builds" // OutputPath is the directory kerria uses as the root of the build output tree OutputPath string `json:"outputPath,omitempty" yaml:"outputPath,omitempty"` }
RepositoryBuildConfig specifies how kerria should build and store manifests
type RepositorySourceConfig ¶
type RepositorySourceConfig struct { // Name is an optional name for the source Name string `json:"name,omitempty" yaml:"name,omitempty"` // Glob is a directory pattern for manifest sources Glob string `json:"glob" yaml:"glob"` // +default={} // Labels is a map of all labels that will be inherited by the discoveries of the source Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` // +default={} // Annotations is a map of all annotations that will be inherited by the discoveries of the source Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` }
RepositorySourceConfig describes how kerria should find source manifests
type RepositorySpec ¶
type RepositorySpec struct { Build RepositoryBuildConfig `json:"build,omitempty" yaml:"build,omitempty"` // +listType=map // +listMapKey=path // Sources is a list of RepositorySourceConfig to find source manifests Sources []RepositorySourceConfig `json:"sources,omitempty" yaml:"sources,omitempty"` // +listType=map // +listMapKey=name Processors []ProcessorConfig `json:"processors,omitempty" yaml:"processors,omitempty"` }
RepositorySpec is the specification for how kerria manages a repository
type StorageMount ¶
type StorageMount struct { // Type of mount e.g. bind mount, local volume, etc. Type string `json:"type,omitempty" yaml:"type,omitempty"` // Src for the storage to be mounted. // For named volumes, this is the name of the volume. // For anonymous volumes, this field is omitted (empty string). // For bind mounts, this is the path to the file or directory on the host. Src string `json:"src,omitempty" yaml:"src,omitempty"` // Dst where the file or directory is mounted in the container. Dst string `json:"dst,omitempty" yaml:"dst,omitempty"` // RW to mount in ReadWrite mode if it's explicitly configured // See https://docs.docker.com/storage/bind-mounts/#use-a-read-only-bind-mount RW bool `json:"rw,omitempty" yaml:"rw,omitempty"` }
StorageMount represents a container's mounted storage option(s)