v1alpha1

package
v0.0.0-...-1c213c1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the workloads v1alpha1 API group +kubebuilder:object:generate=true +groupName=workloads.cloudfoundry.org

Index

Constants

View Source
const (
	BuildpackLifecycle LifecycleType = "buildpack"
	DockerPackage      PackageType   = "docker"

	StartedState DesiredState = "STARTED"
	StoppedState DesiredState = "STOPPED"

	HTTPHealthCheckType    HealthCheckType = "http"
	PortHealthCheckType    HealthCheckType = "port"
	ProcessHealthCheckType HealthCheckType = "process"
)
View Source
const (
	CFAppGUIDLabelKey       = "workloads.cloudfoundry.org/app-guid"
	CFAppRevisionKey        = "workloads.cloudfoundry.org/app-rev"
	CFAppRevisionKeyDefault = "0"
	CFPackageGUIDLabelKey   = "workloads.cloudfoundry.org/package-guid"
	CFBuildGUIDLabelKey     = "workloads.cloudfoundry.org/build-guid"
	CFProcessGUIDLabelKey   = "workloads.cloudfoundry.org/process-guid"
	CFProcessTypeLabelKey   = "workloads.cloudfoundry.org/process-type"
	StagingConditionType    = "Staging"
	ReadyConditionType      = "Ready"
	SucceededConditionType  = "Succeeded"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "workloads.cloudfoundry.org", 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
)

Functions

This section is empty.

Types

type BuildDropletStatus

type BuildDropletStatus struct {
	// Specifies the Container registry image, and secrets to access
	Registry Registry `json:"registry"`

	// Specifies the stack used to build the Droplet
	Stack string `json:"stack"`

	// Specifies the process types and associated start commands for the Droplet
	ProcessTypes []ProcessType `json:"processTypes"`

	// Specifies the exposed ports for the application
	Ports []int32 `json:"ports"`
}

BuildDropletStatus defines the observed state of the CFBuild's Droplet or runnable image

func (*BuildDropletStatus) DeepCopy

func (in *BuildDropletStatus) DeepCopy() *BuildDropletStatus

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

func (*BuildDropletStatus) DeepCopyInto

func (in *BuildDropletStatus) DeepCopyInto(out *BuildDropletStatus)

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

type CFApp

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

	Spec   CFAppSpec   `json:"spec,omitempty"`
	Status CFAppStatus `json:"status,omitempty"`
}

CFApp is the Schema for the cfapps API

func (*CFApp) DeepCopy

func (in *CFApp) DeepCopy() *CFApp

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

func (*CFApp) DeepCopyInto

func (in *CFApp) DeepCopyInto(out *CFApp)

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

func (*CFApp) DeepCopyObject

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

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

func (*CFApp) Default

func (r *CFApp) Default()

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

func (*CFApp) SetupWebhookWithManager

func (r *CFApp) SetupWebhookWithManager(mgr ctrl.Manager) error

type CFAppList

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

CFAppList contains a list of CFApp

func (*CFAppList) DeepCopy

func (in *CFAppList) DeepCopy() *CFAppList

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

func (*CFAppList) DeepCopyInto

func (in *CFAppList) DeepCopyInto(out *CFAppList)

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

func (*CFAppList) DeepCopyObject

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

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

type CFAppSpec

type CFAppSpec struct {
	// Name defines the name of the app
	// This is more restrictive than CC's app model- to make default route validation errors less likely
	// +kubebuilder:validation:Pattern="^[-\\w]+$"
	Name string `json:"name"`

	// Specifies the current state of the CFApp
	// Allowed values are:
	// "STARTED": App is started
	// "STOPPED": App is stopped
	DesiredState DesiredState `json:"desiredState"`

	// Lifecycle specifies how to build droplets
	Lifecycle Lifecycle `json:"lifecycle"`

	// Name of a secret containing a map of multiple environment variables passed to every CFProcess of the app
	EnvSecretName string `json:"envSecretName,omitempty"`

	// CurrentDropletRef provides reference to the droplet currently assigned (active) for the app
	CurrentDropletRef v1.LocalObjectReference `json:"currentDropletRef,omitempty"`
}

CFAppSpec defines the desired state of CFApp

func (*CFAppSpec) DeepCopy

func (in *CFAppSpec) DeepCopy() *CFAppSpec

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

func (*CFAppSpec) DeepCopyInto

func (in *CFAppSpec) DeepCopyInto(out *CFAppSpec)

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

type CFAppStatus

type CFAppStatus struct {
	// Conditions capture the current status of the App
	Conditions []metav1.Condition `json:"conditions"`

	ObservedDesiredState DesiredState `json:"observedDesiredState"`
}

CFAppStatus defines the observed state of CFApp

func (*CFAppStatus) DeepCopy

func (in *CFAppStatus) DeepCopy() *CFAppStatus

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

func (*CFAppStatus) DeepCopyInto

func (in *CFAppStatus) DeepCopyInto(out *CFAppStatus)

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

type CFBuild

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

	Spec   CFBuildSpec   `json:"spec,omitempty"`
	Status CFBuildStatus `json:"status,omitempty"`
}

CFBuild is the Schema for the cfbuilds API

func (*CFBuild) DeepCopy

func (in *CFBuild) DeepCopy() *CFBuild

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

func (*CFBuild) DeepCopyInto

func (in *CFBuild) DeepCopyInto(out *CFBuild)

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

func (*CFBuild) DeepCopyObject

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

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

func (*CFBuild) Default

func (r *CFBuild) Default()

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

func (*CFBuild) SetupWebhookWithManager

func (r *CFBuild) SetupWebhookWithManager(mgr ctrl.Manager) error

type CFBuildList

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

CFBuildList contains a list of CFBuild

func (*CFBuildList) DeepCopy

func (in *CFBuildList) DeepCopy() *CFBuildList

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

func (*CFBuildList) DeepCopyInto

func (in *CFBuildList) DeepCopyInto(out *CFBuildList)

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

func (*CFBuildList) DeepCopyObject

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

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

type CFBuildSpec

type CFBuildSpec struct {
	// Specifies the CFPackage associated with this build
	PackageRef v1.LocalObjectReference `json:"packageRef"`
	// Specifies the CFApp associated with this build
	AppRef v1.LocalObjectReference `json:"appRef"`

	// Specifies the memory request for the staging image
	StagingMemoryMB int `json:"stagingMemoryMB"`
	// Specifies the disk request for the staging image - Do we need this?
	StagingDiskMB int `json:"stagingDiskMB"`

	// Specifies the buildpacks and stack for the build
	Lifecycle Lifecycle `json:"lifecycle"`
}

CFBuildSpec defines the desired state of CFBuild

func (*CFBuildSpec) DeepCopy

func (in *CFBuildSpec) DeepCopy() *CFBuildSpec

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

func (*CFBuildSpec) DeepCopyInto

func (in *CFBuildSpec) DeepCopyInto(out *CFBuildSpec)

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

type CFBuildStatus

type CFBuildStatus struct {
	BuildDropletStatus *BuildDropletStatus `json:"droplet,omitempty"`
	// Conditions capture the current status of the Build
	Conditions []metav1.Condition `json:"conditions"`
}

CFBuildStatus defines the observed state of CFBuild

func (*CFBuildStatus) DeepCopy

func (in *CFBuildStatus) DeepCopy() *CFBuildStatus

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

func (*CFBuildStatus) DeepCopyInto

func (in *CFBuildStatus) DeepCopyInto(out *CFBuildStatus)

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

type CFPackage

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

	Spec   CFPackageSpec   `json:"spec,omitempty"`
	Status CFPackageStatus `json:"status,omitempty"`
}

CFPackage is the Schema for the cfpackages API

func (*CFPackage) DeepCopy

func (in *CFPackage) DeepCopy() *CFPackage

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

func (*CFPackage) DeepCopyInto

func (in *CFPackage) DeepCopyInto(out *CFPackage)

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

func (*CFPackage) DeepCopyObject

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

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

func (*CFPackage) Default

func (r *CFPackage) Default()

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

func (*CFPackage) SetupWebhookWithManager

func (r *CFPackage) SetupWebhookWithManager(mgr ctrl.Manager) error

type CFPackageList

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

CFPackageList contains a list of CFPackage

func (*CFPackageList) DeepCopy

func (in *CFPackageList) DeepCopy() *CFPackageList

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

func (*CFPackageList) DeepCopyInto

func (in *CFPackageList) DeepCopyInto(out *CFPackageList)

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

func (*CFPackageList) DeepCopyObject

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

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

type CFPackageSpec

type CFPackageSpec struct {
	// Type specifies the package type
	// Valid values are:
	// "bits": package to upload source code
	Type PackageType `json:"type"`

	// AppRef reference to the CFApp that owns this package
	AppRef v1.LocalObjectReference `json:"appRef"`

	// Source contains the details for the source image(bits)
	Source PackageSource `json:"source,omitempty"`
}

CFPackageSpec defines the desired state of CFPackage

func (*CFPackageSpec) DeepCopy

func (in *CFPackageSpec) DeepCopy() *CFPackageSpec

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

func (*CFPackageSpec) DeepCopyInto

func (in *CFPackageSpec) DeepCopyInto(out *CFPackageSpec)

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

type CFPackageStatus

type CFPackageStatus struct {
	// Conditions capture the current status of the Package
	Conditions []metav1.Condition `json:"conditions"`
}

CFPackageStatus defines the observed state of CFPackage

func (*CFPackageStatus) DeepCopy

func (in *CFPackageStatus) DeepCopy() *CFPackageStatus

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

func (*CFPackageStatus) DeepCopyInto

func (in *CFPackageStatus) DeepCopyInto(out *CFPackageStatus)

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

type CFProcess

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

	Spec   CFProcessSpec   `json:"spec,omitempty"`
	Status CFProcessStatus `json:"status,omitempty"`
}

CFProcess is the Schema for the cfprocesses API

func (*CFProcess) DeepCopy

func (in *CFProcess) DeepCopy() *CFProcess

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

func (*CFProcess) DeepCopyInto

func (in *CFProcess) DeepCopyInto(out *CFProcess)

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

func (*CFProcess) DeepCopyObject

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

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

func (*CFProcess) Default

func (r *CFProcess) Default()

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

func (*CFProcess) SetupWebhookWithManager

func (r *CFProcess) SetupWebhookWithManager(mgr ctrl.Manager) error

type CFProcessList

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

CFProcessList contains a list of CFProcess

func (*CFProcessList) DeepCopy

func (in *CFProcessList) DeepCopy() *CFProcessList

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

func (*CFProcessList) DeepCopyInto

func (in *CFProcessList) DeepCopyInto(out *CFProcessList)

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

func (*CFProcessList) DeepCopyObject

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

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

type CFProcessSpec

type CFProcessSpec struct {
	// Specifies the App that owns this process
	AppRef v1.LocalObjectReference `json:"appRef"`

	// Specifies the name of the process in the App
	ProcessType string `json:"processType"`

	// Specifies the Command(k8s) ENTRYPOINT(Docker) of the Process
	Command string `json:"command,omitempty"`

	// Specifies the Liveness Probe (k8s) details of the Process
	HealthCheck HealthCheck `json:"healthCheck"`

	// Specifies the desired number of Process replicas to deploy
	DesiredInstances int `json:"desiredInstances"`

	// Specifies the Process memory limit
	MemoryMB int64 `json:"memoryMB"`

	// Specifies the Process disk limit
	DiskQuotaMB int64 `json:"diskQuotaMB"`

	// Specifies the Process ports to expose
	Ports []int32 `json:"ports"`
}

CFProcessSpec defines the desired state of CFProcess

func (*CFProcessSpec) DeepCopy

func (in *CFProcessSpec) DeepCopy() *CFProcessSpec

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

func (*CFProcessSpec) DeepCopyInto

func (in *CFProcessSpec) DeepCopyInto(out *CFProcessSpec)

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

type CFProcessStatus

type CFProcessStatus struct {
	// RunningInstances captures the actual number of Process replicas
	RunningInstances int `json:"runningInstances"`
	// Conditions capture the current status of the Process
	Conditions []metav1.Condition `json:"conditions"`
}

CFProcessStatus defines the observed state of CFProcess

func (*CFProcessStatus) DeepCopy

func (in *CFProcessStatus) DeepCopy() *CFProcessStatus

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

func (*CFProcessStatus) DeepCopyInto

func (in *CFProcessStatus) DeepCopyInto(out *CFProcessStatus)

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

type DesiredState

type DesiredState string

DesiredState defines the desired state of CFApp. +kubebuilder:validation:Enum=STOPPED;STARTED

type HealthCheck

type HealthCheck struct {
	// Specifies the type of Health Check the App process will use
	// Valid values are:
	// "http": http health check
	// "port": TCP health check
	// "process" (default): checks if process for start command is still alive
	Type HealthCheckType `json:"type"`

	// Specifies the input parameters for the liveness probe/health check in kubernetes
	Data HealthCheckData `json:"data"`
}

func (*HealthCheck) DeepCopy

func (in *HealthCheck) DeepCopy() *HealthCheck

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

func (*HealthCheck) DeepCopyInto

func (in *HealthCheck) DeepCopyInto(out *HealthCheck)

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

type HealthCheckData

type HealthCheckData struct {
	// HTTPEndpoint is only used by an "http" liveness probe
	HTTPEndpoint string `json:"httpEndpoint,omitempty"`

	InvocationTimeoutSeconds int64 `json:"invocationTimeoutSeconds"`
	TimeoutSeconds           int64 `json:"timeoutSeconds"`
}

HealthCheckData used to pass through input parameters to liveness probe

func (*HealthCheckData) DeepCopy

func (in *HealthCheckData) DeepCopy() *HealthCheckData

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

func (*HealthCheckData) DeepCopyInto

func (in *HealthCheckData) DeepCopyInto(out *HealthCheckData)

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

type HealthCheckType

type HealthCheckType string

HealthCheckType used to ensure illegal HealthCheckTypes are not passed +kubebuilder:validation:Enum=http;port;process

type Lifecycle

type Lifecycle struct {
	// Specifies the CF Lifecycle type:
	// Valid values are:
	// "buildpack": stage the app using kpack
	Type LifecycleType `json:"type"`
	// Lifecycle data used to specify details for the Lifecycle
	Data LifecycleData `json:"data"`
}

func (*Lifecycle) DeepCopy

func (in *Lifecycle) DeepCopy() *Lifecycle

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

func (*Lifecycle) DeepCopyInto

func (in *Lifecycle) DeepCopyInto(out *Lifecycle)

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

type LifecycleData

type LifecycleData struct {
	// List of buildpacks used to build the app
	Buildpacks []string `json:"buildpacks,omitempty"`
	Stack      string   `json:"stack"`
}

Shared by CFApp and CFBuild

func (*LifecycleData) DeepCopy

func (in *LifecycleData) DeepCopy() *LifecycleData

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

func (*LifecycleData) DeepCopyInto

func (in *LifecycleData) DeepCopyInto(out *LifecycleData)

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

type LifecycleType

type LifecycleType string

LifecycleType inform the platform of how to build droplets and run apps allow only values "buildpack" +kubebuilder:validation:Enum=buildpack

type PackageSource

type PackageSource struct {
	// registry ( Source code is an OCI image in a registry that contains application source)
	Registry Registry `json:"registry"`
}

func (*PackageSource) DeepCopy

func (in *PackageSource) DeepCopy() *PackageSource

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

func (*PackageSource) DeepCopyInto

func (in *PackageSource) DeepCopyInto(out *PackageSource)

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

type PackageType

type PackageType string

PackageType used to enum the inputs to package.type +kubebuilder:validation:Enum=bits

type ProcessType

type ProcessType struct {
	Type    string `json:"type"`
	Command string `json:"command"`
}

ProcessType is a map of process names and associated start commands for the Droplet

func (*ProcessType) DeepCopy

func (in *ProcessType) DeepCopy() *ProcessType

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

func (*ProcessType) DeepCopyInto

func (in *ProcessType) DeepCopyInto(out *ProcessType)

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

type Registry

type Registry struct {
	// Image specifies the location of the source image
	Image string `json:"image"`
	// ImagePullSecrets specifies a list of secrets required to access the image
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

Registry is used by CFPackage and CFBuild/Droplet to identify Registry and secrets to access the image provided

func (*Registry) DeepCopy

func (in *Registry) DeepCopy() *Registry

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

func (*Registry) DeepCopyInto

func (in *Registry) DeepCopyInto(out *Registry)

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

Jump to

Keyboard shortcuts

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