v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Overview

+groupName=build.projectriff.io

Package v1alpha1 contains API Schema definitions for the build v1alpha1 API group +kubebuilder:object:generate=true

Index

Constants

View Source
const (
	ApplicationConditionReady                              = apis.ConditionReady
	ApplicationConditionKpackImageReady apis.ConditionType = "KpackImageReady"
	ApplicationConditionImageResolved   apis.ConditionType = "ImageResolved"
)
View Source
const (
	ContainerConditionReady                            = apis.ConditionReady
	ContainerConditionImageResolved apis.ConditionType = "ImageResolved"
)
View Source
const (
	FunctionConditionReady                              = apis.ConditionReady
	FunctionConditionKpackImageReady apis.ConditionType = "KpackImageReady"
	FunctionConditionImageResolved   apis.ConditionType = "ImageResolved"
)
View Source
const BuildNumber = kpackv1alpha1.BuildNumber

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "build.projectriff.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// credentials are not a CRD, but a Secret with this label
	CredentialLabelKey       = GroupVersion.Group + "/credential"
	CredentialsAnnotationKey = GroupVersion.Group + "/credentials"
)
View Source
var (
	ApplicationLabelKey = GroupVersion.Group + "/application"
)
View Source
var (
	ContainerLabelKey = GroupVersion.Group + "/container"
)
View Source
var (
	FunctionLabelKey = GroupVersion.Group + "/function"
)
View Source
var SchemeGroupVersion = GroupVersion

compatibility with k8s.io/code-generator

Functions

func ResolveDefaultImage

func ResolveDefaultImage(resource ImageResource, defaultImagePrefix string) (string, error)

ResolveDefaultImage applies the default image prefix as needed to an image.

The default image prefix may apply to either a repository whose value is '_' or a repository with a leading '_/'.

For a leading '_/', the underscore is replaced with the default image prefix. For a repository of '_', the default image prefix is combined with the name of the build resource.

Types

type Application

type Application struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ApplicationSpec   `json:"spec,omitempty"`
	Status ApplicationStatus `json:"status,omitempty"`
}

Application is the Schema for the applications API

func (*Application) DeepCopy

func (in *Application) DeepCopy() *Application

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Application.

func (*Application) DeepCopyInto

func (in *Application) DeepCopyInto(out *Application)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Application) DeepCopyObject

func (in *Application) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Application) Default added in v0.5.0

func (r *Application) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Application) GetGroupVersionKind

func (*Application) GetGroupVersionKind() schema.GroupVersionKind

func (*Application) GetImage

func (a *Application) GetImage() string

func (*Application) GetStatus

func (a *Application) GetStatus() apis.ResourceStatus

func (*Application) Validate

func (r *Application) Validate() validation.FieldErrors

func (*Application) ValidateCreate added in v0.5.0

func (r *Application) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Application) ValidateDelete added in v0.5.0

func (r *Application) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Application) ValidateUpdate added in v0.5.0

func (r *Application) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ApplicationList

type ApplicationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Application `json:"items"`
}

ApplicationList contains a list of Application

func (*ApplicationList) DeepCopy

func (in *ApplicationList) DeepCopy() *ApplicationList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationList.

func (*ApplicationList) DeepCopyInto

func (in *ApplicationList) DeepCopyInto(out *ApplicationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ApplicationList) DeepCopyObject

func (in *ApplicationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ApplicationSpec

type ApplicationSpec struct {

	// Image repository to push built images. May contain a leading underscore
	// to have the default image prefix applied, or be `_` to combine the default
	// image prefix with the resource's name as a default value.
	Image string `json:"image"`

	// CacheSize for an optional PersistentVolumeClaim used to store
	// intermediate build artifacts, like a maven cache, for future builds.
	CacheSize *resource.Quantity `json:"cacheSize,omitempty"`

	// Source location. Required for on cluster builds.
	Source *Source `json:"source,omitempty"`

	// +optional
	// +nullable
	FailedBuildHistoryLimit *int64 `json:"failedBuildHistoryLimit,omitempty"`
	// +optional
	// +nullable
	SuccessBuildHistoryLimit *int64 `json:"successBuildHistoryLimit,omitempty"`
	// +optional
	ImageTaggingStrategy ImageTaggingStrategy `json:"imageTaggingStrategy,omitempty"`
	// +optional
	Build ImageBuild `json:"build,omitempty"`
}

ApplicationSpec defines the desired state of Application

func (*ApplicationSpec) DeepCopy

func (in *ApplicationSpec) DeepCopy() *ApplicationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec.

func (*ApplicationSpec) DeepCopyInto

func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ApplicationSpec) Default added in v0.5.0

func (s *ApplicationSpec) Default()

func (*ApplicationSpec) Validate

func (s *ApplicationSpec) Validate() validation.FieldErrors

type ApplicationStatus

type ApplicationStatus struct {
	apis.Status `json:",inline"`
	BuildStatus `json:",inline"`
}

ApplicationStatus defines the observed state of Application

func (*ApplicationStatus) DeepCopy

func (in *ApplicationStatus) DeepCopy() *ApplicationStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationStatus.

func (*ApplicationStatus) DeepCopyInto

func (in *ApplicationStatus) DeepCopyInto(out *ApplicationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ApplicationStatus) GetCondition

func (as *ApplicationStatus) GetCondition(t apis.ConditionType) *apis.Condition

func (*ApplicationStatus) GetObservedGeneration

func (as *ApplicationStatus) GetObservedGeneration() int64

func (*ApplicationStatus) GetReadyConditionType

func (*ApplicationStatus) GetReadyConditionType() apis.ConditionType

func (*ApplicationStatus) InitializeConditions

func (as *ApplicationStatus) InitializeConditions()

func (*ApplicationStatus) IsReady

func (as *ApplicationStatus) IsReady() bool

func (*ApplicationStatus) MarkBuildNotUsed

func (as *ApplicationStatus) MarkBuildNotUsed()

func (*ApplicationStatus) MarkImageDefaultPrefixMissing

func (as *ApplicationStatus) MarkImageDefaultPrefixMissing(message string)

func (*ApplicationStatus) MarkImageInvalid

func (as *ApplicationStatus) MarkImageInvalid(message string)

func (*ApplicationStatus) MarkImageResolved

func (as *ApplicationStatus) MarkImageResolved()

func (*ApplicationStatus) PropagateKpackImageStatus added in v0.5.0

func (as *ApplicationStatus) PropagateKpackImageStatus(is *kpackbuildv1alpha1.ImageStatus)

type Blob added in v0.5.0

type Blob = kpackv1alpha1.Blob

+k8s:deepcopy-gen=false

type BuildStatus

type BuildStatus struct {
	// BuildCacheRef is a reference to the PersistentVolumeClaim used as a cache
	// for intermediate build resources.
	BuildCacheRef *refs.TypedLocalObjectReference `json:"buildCacheRef,omitempty"`

	// KpackImageRef is a reference to the kpack Image backing this build.
	KpackImageRef *refs.TypedLocalObjectReference `json:"kpackImageRef,omitempty"`

	// LatestImage is the most recent image for this build.
	LatestImage string `json:"latestImage,omitempty"`

	// TargetImage is the resolved image repository where built images are
	// pushed.
	TargetImage string `json:"targetImage,omitempty"`
}

func (*BuildStatus) DeepCopy

func (in *BuildStatus) DeepCopy() *BuildStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStatus.

func (*BuildStatus) DeepCopyInto

func (in *BuildStatus) DeepCopyInto(out *BuildStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Container

type Container struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ContainerSpec   `json:"spec,omitempty"`
	Status ContainerStatus `json:"status,omitempty"`
}

Container is the Schema for the containers API

func (*Container) DeepCopy

func (in *Container) DeepCopy() *Container

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Container.

func (*Container) DeepCopyInto

func (in *Container) DeepCopyInto(out *Container)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Container) DeepCopyObject

func (in *Container) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Container) Default added in v0.5.0

func (r *Container) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Container) GetGroupVersionKind

func (*Container) GetGroupVersionKind() schema.GroupVersionKind

func (*Container) GetImage

func (c *Container) GetImage() string

func (*Container) GetStatus

func (c *Container) GetStatus() apis.ResourceStatus

func (*Container) Validate

func (r *Container) Validate() validation.FieldErrors

func (*Container) ValidateCreate added in v0.5.0

func (r *Container) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Container) ValidateDelete added in v0.5.0

func (r *Container) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Container) ValidateUpdate added in v0.5.0

func (r *Container) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ContainerList

type ContainerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Container `json:"items"`
}

ContainerList contains a list of Container

func (*ContainerList) DeepCopy

func (in *ContainerList) DeepCopy() *ContainerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerList.

func (*ContainerList) DeepCopyInto

func (in *ContainerList) DeepCopyInto(out *ContainerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ContainerList) DeepCopyObject

func (in *ContainerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ContainerSpec

type ContainerSpec struct {

	// Image repository to watch for built images. May contain a leading underscore
	// to have the default image prefix applied, or be `_` to combine the default
	// image prefix with the resource's name as a default value.
	Image string `json:"image"`
}

ContainerSpec defines the desired state of Container

func (*ContainerSpec) DeepCopy

func (in *ContainerSpec) DeepCopy() *ContainerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSpec.

func (*ContainerSpec) DeepCopyInto

func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ContainerSpec) Default added in v0.5.0

func (s *ContainerSpec) Default()

func (*ContainerSpec) Validate

func (s *ContainerSpec) Validate() validation.FieldErrors

type ContainerStatus

type ContainerStatus struct {
	apis.Status `json:",inline"`
	BuildStatus `json:",inline"`
}

ContainerStatus defines the observed state of Container

func (*ContainerStatus) DeepCopy

func (in *ContainerStatus) DeepCopy() *ContainerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerStatus.

func (*ContainerStatus) DeepCopyInto

func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ContainerStatus) GetCondition

func (cs *ContainerStatus) GetCondition(t apis.ConditionType) *apis.Condition

func (*ContainerStatus) GetObservedGeneration

func (cs *ContainerStatus) GetObservedGeneration() int64

func (*ContainerStatus) GetReadyConditionType

func (*ContainerStatus) GetReadyConditionType() apis.ConditionType

func (*ContainerStatus) InitializeConditions

func (cs *ContainerStatus) InitializeConditions()

func (*ContainerStatus) IsReady

func (cs *ContainerStatus) IsReady() bool

func (*ContainerStatus) MarkImageDefaultPrefixMissing

func (cs *ContainerStatus) MarkImageDefaultPrefixMissing(message string)

func (*ContainerStatus) MarkImageInvalid

func (cs *ContainerStatus) MarkImageInvalid(message string)

func (*ContainerStatus) MarkImageResolved

func (cs *ContainerStatus) MarkImageResolved()

type Function

type Function struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   FunctionSpec   `json:"spec,omitempty"`
	Status FunctionStatus `json:"status,omitempty"`
}

Function is the Schema for the functions API

func (*Function) DeepCopy

func (in *Function) DeepCopy() *Function

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Function.

func (*Function) DeepCopyInto

func (in *Function) DeepCopyInto(out *Function)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Function) DeepCopyObject

func (in *Function) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Function) Default added in v0.5.0

func (r *Function) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Function) GetGroupVersionKind

func (*Function) GetGroupVersionKind() schema.GroupVersionKind

func (*Function) GetImage

func (f *Function) GetImage() string

func (*Function) GetStatus

func (f *Function) GetStatus() apis.ResourceStatus

func (*Function) Validate

func (r *Function) Validate() validation.FieldErrors

func (*Function) ValidateCreate added in v0.5.0

func (r *Function) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Function) ValidateDelete added in v0.5.0

func (r *Function) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Function) ValidateUpdate added in v0.5.0

func (r *Function) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type FunctionList

type FunctionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Function `json:"items"`
}

FunctionList contains a list of Function

func (*FunctionList) DeepCopy

func (in *FunctionList) DeepCopy() *FunctionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionList.

func (*FunctionList) DeepCopyInto

func (in *FunctionList) DeepCopyInto(out *FunctionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FunctionList) DeepCopyObject

func (in *FunctionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FunctionSpec

type FunctionSpec struct {

	// Image repository to push built images. May contain a leading underscore
	// to have the default image prefix applied, or be `_` to combine the default
	// image prefix with the resource's name as a default value.
	Image string `json:"image"`

	// CacheSize of persistent volume to store resources between builds
	CacheSize *resource.Quantity `json:"cacheSize,omitempty"`

	// Source location. Required for on cluster builds.
	Source *Source `json:"source,omitempty"`

	// +optional
	// +nullable
	FailedBuildHistoryLimit *int64 `json:"failedBuildHistoryLimit,omitempty"`
	// +optional
	// +nullable
	SuccessBuildHistoryLimit *int64 `json:"successBuildHistoryLimit,omitempty"`
	// +optional
	ImageTaggingStrategy ImageTaggingStrategy `json:"imageTaggingStrategy,omitempty"`
	// +optional
	Build ImageBuild `json:"build,omitempty"`

	// Artifact file containing the function within the build workspace.
	Artifact string `json:"artifact,omitempty"`

	// Handler name of the method or class to invoke. The value depends on the
	// invoker.
	Handler string `json:"handler,omitempty"`

	// Invoker language runtime name. Detected by default.
	Invoker string `json:"invoker,omitempty"`
}

FunctionSpec defines the desired state of Function

func (*FunctionSpec) DeepCopy

func (in *FunctionSpec) DeepCopy() *FunctionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionSpec.

func (*FunctionSpec) DeepCopyInto

func (in *FunctionSpec) DeepCopyInto(out *FunctionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FunctionSpec) Default added in v0.5.0

func (s *FunctionSpec) Default()

func (*FunctionSpec) Validate

func (s *FunctionSpec) Validate() validation.FieldErrors

type FunctionStatus

type FunctionStatus struct {
	apis.Status `json:",inline"`
	BuildStatus `json:",inline"`
}

FunctionStatus defines the observed state of Function

func (*FunctionStatus) DeepCopy

func (in *FunctionStatus) DeepCopy() *FunctionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionStatus.

func (*FunctionStatus) DeepCopyInto

func (in *FunctionStatus) DeepCopyInto(out *FunctionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FunctionStatus) GetCondition

func (fs *FunctionStatus) GetCondition(t apis.ConditionType) *apis.Condition

func (*FunctionStatus) GetObservedGeneration

func (fs *FunctionStatus) GetObservedGeneration() int64

func (*FunctionStatus) GetReadyConditionType

func (*FunctionStatus) GetReadyConditionType() apis.ConditionType

func (*FunctionStatus) InitializeConditions

func (fs *FunctionStatus) InitializeConditions()

func (*FunctionStatus) IsReady

func (fs *FunctionStatus) IsReady() bool

func (*FunctionStatus) MarkBuildNotUsed

func (fs *FunctionStatus) MarkBuildNotUsed()

func (*FunctionStatus) MarkImageDefaultPrefixMissing

func (fs *FunctionStatus) MarkImageDefaultPrefixMissing(message string)

func (*FunctionStatus) MarkImageInvalid

func (fs *FunctionStatus) MarkImageInvalid(message string)

func (*FunctionStatus) MarkImageResolved

func (fs *FunctionStatus) MarkImageResolved()

func (*FunctionStatus) PropagateKpackImageStatus added in v0.5.0

func (fs *FunctionStatus) PropagateKpackImageStatus(is *kpackbuildv1alpha1.ImageStatus)

type Git added in v0.5.0

type Git = kpackv1alpha1.Git

+k8s:deepcopy-gen=false

type ImageBuild added in v0.5.0

type ImageBuild = kpackv1alpha1.ImageBuild

+k8s:deepcopy-gen=false

type ImageResource

type ImageResource interface {
	apis.Object
	GetImage() string
}

+k8s:deepcopy-gen=false

type ImageTaggingStrategy added in v0.5.0

type ImageTaggingStrategy = kpackv1alpha1.ImageTaggingStrategy

type Registry added in v0.5.0

type Registry = kpackv1alpha1.Registry

+k8s:deepcopy-gen=false

type Source

type Source = kpackv1alpha1.SourceConfig

+k8s:deepcopy-gen=false

Jump to

Keyboard shortcuts

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