Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the spot v1alpha1 API group +kubebuilder:object:generate=true +groupName=spot.release.com
Index ¶
- Constants
- Variables
- type Build
- type BuildCondition
- type BuildConditionType
- type BuildConditions
- type BuildImage
- type BuildList
- type BuildPhase
- type BuildSpec
- type BuildStatus
- type ComponentEnvironmentSpec
- type ComponentIngressSpec
- type ComponentNetworkSpec
- type ComponentSpec
- type ConditionStatus
- type EnvironmentSpec
- type GitReference
- type ImageSpec
- type Project
- type ProjectList
- type ProjectSpec
- type ProjectStatus
- type ProjectTemplateSpec
- type Reference
- type RegistrySpec
- type RepositorySpec
- type Workspace
- func (in *Workspace) DeepCopy() *Workspace
- func (in *Workspace) DeepCopyInto(out *Workspace)
- func (in *Workspace) DeepCopyObject() runtime.Object
- func (r *Workspace) Default()
- func (r *Workspace) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Workspace) ValidateCreate() (admission.Warnings, error)
- func (r *Workspace) ValidateDelete() (admission.Warnings, error)
- func (r *Workspace) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type WorkspaceCondition
- type WorkspaceConditionType
- type WorkspaceConditions
- func (w *WorkspaceConditions) CurrentPhase() WorkspacePhase
- func (in WorkspaceConditions) DeepCopy() WorkspaceConditions
- func (in WorkspaceConditions) DeepCopyInto(out *WorkspaceConditions)
- func (w *WorkspaceConditions) GetCondition(wct WorkspaceConditionType) WorkspaceCondition
- func (w *WorkspaceConditions) SetCondition(condition *WorkspaceCondition)
- type WorkspaceList
- type WorkspacePhase
- type WorkspaceSpec
- type WorkspaceStatus
Constants ¶
const BuildSecretArguments string = "arguments"
const BuildSecretRegistries string = "registries"
These constants are the keys that should be used to define secret data Secrets in k8s is a key/value list and as such, the build expects these keys to exists inside the secret. The value for each of the keys is expected to be a valid JSON field. TODO: Document the JSON field structure
const BuildSecretRepositories string = "repositories"
const BuildSecretSecrets string = "secrets"
const WorkspaceFinalizer = "spot.release.com/namespace"
const WorkspaceGeneratedTagLength = 6
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "spot.release.com", 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 )
var BuildDefaultResourceRequirements = &core.ResourceRequirements{ Requests: core.ResourceList{ core.ResourceMemory: resource.MustParse("2Gi"), core.ResourceCPU: resource.MustParse("1000m"), }, Limits: core.ResourceList{ core.ResourceMemory: resource.MustParse("8Gi"), core.ResourceCPU: resource.MustParse("2000m"), }, }
var ErrComponentEnvSourceFound = errors.New("could not find a value for the specified environment name")
var ErrWorkflowFinalizerMissing = errors.New("workflow requires a finalizer for namespaces")
var ErrWorkflowTagMissing = errors.New("workflow requires a tag to be set")
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { meta.TypeMeta `json:",inline"` meta.ObjectMeta `json:"metadata,omitempty"` Spec BuildSpec `json:"spec,omitempty"` Status BuildStatus `json:"status,omitempty"` }
Build is the Schema for the builds API
func (*Build) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build.
func (*Build) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Build) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Build) GetReference ¶
type BuildCondition ¶
type BuildCondition struct { // Type is the name of the condition. Conceptually this represents a task in the process // of a Build. Type BuildConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=BuildConditionType"` // Status of the condition. // Can be In Progress, Error, Success. Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime meta.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` }
func (*BuildCondition) DeepCopy ¶
func (in *BuildCondition) DeepCopy() *BuildCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildCondition.
func (*BuildCondition) DeepCopyInto ¶
func (in *BuildCondition) DeepCopyInto(out *BuildCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BuildConditionType ¶
type BuildConditionType string
const ( BuildConditionDeployPod BuildConditionType = "Pod Deployment" BuildConditionSource BuildConditionType = "Retrieving Source" BuildConditionBuilding BuildConditionType = "Building Image" BuildConditionRegistry BuildConditionType = "Uploading Build to remote registry" )
type BuildConditions ¶
type BuildConditions []BuildCondition
func (BuildConditions) CurrentPhase ¶
func (bc BuildConditions) CurrentPhase() BuildPhase
Return a BuildPhase that represent the current derivation off the current conditions.
func (BuildConditions) DeepCopy ¶
func (in BuildConditions) DeepCopy() BuildConditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildConditions.
func (BuildConditions) DeepCopyInto ¶
func (in BuildConditions) DeepCopyInto(out *BuildConditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BuildImage ¶
type BuildImage struct { Metadata string `json:"metadata,omitempty"` URL string `json:"url,omitempty"` }
func (*BuildImage) DeepCopy ¶
func (in *BuildImage) DeepCopy() *BuildImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildImage.
func (*BuildImage) DeepCopyInto ¶
func (in *BuildImage) DeepCopyInto(out *BuildImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BuildList ¶
type BuildList struct { meta.TypeMeta `json:",inline"` meta.ListMeta `json:"metadata,omitempty"` Items []Build `json:"items"` }
BuildList contains a list of Build
func (*BuildList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildList.
func (*BuildList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BuildList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BuildPhase ¶
type BuildPhase string
+kubebuilder:validation:Enum=Running;Done;Error
const ( BuildPhaseInitialized BuildPhase = "" // TODO: Remove this when I can figure out how to set a default value. BuildPhaseRunning BuildPhase = "Running" // TODO: Make this the default when the above is removed. BuildPhaseDone BuildPhase = "Done" BuildPhaseError BuildPhase = "Error" )
type BuildSpec ¶
type BuildSpec struct { // Information about the image that's going to be built // For an image to be succesfully built, it needs to have // a RegistrySpec associated with it. Image ImageSpec `json:"image,omitempty"` // SecretRef // Reference to an existing k8s secret. If the secret // is stored in a different namespace, it needs to be accessible // from the operator's namespace SecretRef Reference `json:"secret"` // Affinity is used by the CRD to dispatch the pod that will // generate a build with the node affinity set here. // + optional Affinity *core.Affinity `json:"affinity,omitempty"` // Resource Requirements for the pod that will build the image. // These will be passed directly to the underlying pod. //+ optional Resources *core.ResourceRequirements `json:"resources,omitempty"` }
func (*BuildSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildSpec.
func (*BuildSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BuildStatus ¶
type BuildStatus struct { // Phase is a composite of the conditions. It's main use is to display // the general state of the Build. This value is derived from the BuildConditions. // There are two different outcome for this build, // - Success: Before the phase shift to success, the `Image` will be set with and available. // - Error: At least one condition failed and some information can be found within the Condition. Additionally, // it's possible that there's more information available in the events stream. Phase BuildPhase `json:"phase"` // Set of conditions that the build manages. For a build // to be successful and completed, all the conditions in this set // are required to have a status of ConditionSuccess. // A build is considered to have failed if at least one // of the condition in this list is marked as ConditionError Conditions BuildConditions `json:"conditions"` // The Pod that will run the build logic // It will be in charge of updating the status // of this Build and store the BuildImage // when the image is ready. Pod *Reference `json:"pod,omitempty"` // The Image will store information about the image that // was created by this build. This value is nil until // the stage reaches BuildStageDone Image *BuildImage `json:"image,omitempty"` // Metadata will be set to the image's metadata generated // once the build is completed. This field is only available once // the BuildConditionBuilding is successful. Metadata *string `json:"metadata,omitempty"` }
BuildStatus defines the observed state of Build
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.
func (*BuildStatus) GetCondition ¶
func (bs *BuildStatus) GetCondition(bct BuildConditionType) BuildCondition
Retrieve a *copy* of the condition if it already exists for the given type. If the condition doesn't exist, it will create a new one. In order to persist the condition on the status stack, the condition needs to be applied by calling `SetCondition(condition)`
func (*BuildStatus) SetCondition ¶
func (bs *BuildStatus) SetCondition(condition BuildCondition)
Set the condition in the condition stack. If a condition for the given type already exists, it will be overwritten by this new condition. If it doesn't exist, it will be appended to the stack. For the condition to be persisted, the BuildStatus needs to be committed to the API. The LastTransitionTime is set here and represent the time that the reconciler set the condition in memory, not to be confused with the time the condition was committed to the database.
type ComponentEnvironmentSpec ¶
type ComponentEnvironmentSpec struct { // Name of the EnvironmentSpec at the Workspace level. // The name is going to be used as the name of the ENV inside // the component's pod. Name string `json:"name"` // If the Environment needs to have a different // name than the one specified, `as` can be used // to give it an alias. Alias string `json:"as,omitempty"` // Value generally is going to be generated from the Workspace's `EnvironmentSpec` Value *string `json:"value,omitempty"` }
func (*ComponentEnvironmentSpec) DeepCopy ¶
func (in *ComponentEnvironmentSpec) DeepCopy() *ComponentEnvironmentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentEnvironmentSpec.
func (*ComponentEnvironmentSpec) DeepCopyInto ¶
func (in *ComponentEnvironmentSpec) DeepCopyInto(out *ComponentEnvironmentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentIngressSpec ¶
type ComponentIngressSpec struct { // Path is matched agaisnt the path of the incoming request. Path must begin with // a '/'. // +kubebuilder:default:=/ Path string `json:"path,omitempty"` // https://pkg.go.dev/k8s.io/api@v0.27.2/networking/v1#HTTPIngressPath // Defaults to Prefix // +optional PathType *networking.PathType `json:"path_type,omitempty"` }
func (*ComponentIngressSpec) DeepCopy ¶
func (in *ComponentIngressSpec) DeepCopy() *ComponentIngressSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentIngressSpec.
func (*ComponentIngressSpec) DeepCopyInto ¶
func (in *ComponentIngressSpec) DeepCopyInto(out *ComponentIngressSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentNetworkSpec ¶
type ComponentNetworkSpec struct { // If the Ingress field is set, an ingress will be created with the spec // +optional Ingress *ComponentIngressSpec `json:"ingress,omitempty"` // Needs to be unique within a component, will be used as a prefix for the Ingress's host // if the Ingress is set. Name string `json:"name"` Port int `json:"port"` Protocol string `json:"protocol,omitempty"` }
func (*ComponentNetworkSpec) DeepCopy ¶
func (in *ComponentNetworkSpec) DeepCopy() *ComponentNetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentNetworkSpec.
func (*ComponentNetworkSpec) DeepCopyInto ¶
func (in *ComponentNetworkSpec) DeepCopyInto(out *ComponentNetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentSpec ¶
type ComponentSpec struct { Name string `json:"name"` // Execute a different entrypoint command than the one // specified in the image Command []string `json:"command,omitempty"` // Links a component to an EnvironmentSpec entry. Environments []ComponentEnvironmentSpec `json:"environments,omitempty"` // Network service Networks []ComponentNetworkSpec `json:"networks,omitempty"` // Defines how the image is built for this component // The workspace will aggregate all the images at build time and // will deduplicate the images so only 1 unique image is built. Image ImageSpec `json:"image"` }
func (*ComponentSpec) DeepCopy ¶
func (in *ComponentSpec) DeepCopy() *ComponentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSpec.
func (*ComponentSpec) DeepCopyInto ¶
func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentSpec) GetEnvVars ¶
func (c *ComponentSpec) GetEnvVars() []core.EnvVar
type ConditionStatus ¶
type ConditionStatus string
const ( ConditionInitialized ConditionStatus = "Initialized" ConditionInProgress ConditionStatus = "In Progress" ConditionSuccess ConditionStatus = "Success" ConditionWaiting ConditionStatus = "Waiting" ConditionError ConditionStatus = "Error" // Used to determine if a condition should be skipped. ConditionSkipping ConditionStatus = "Skipping" )
type EnvironmentSpec ¶
func (*EnvironmentSpec) DeepCopy ¶
func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentSpec.
func (*EnvironmentSpec) DeepCopyInto ¶
func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GitReference ¶
type GitReference struct { // Name refers to the name of the branch we're working off of. // It can be master/main or any valid branch present in the remote repository(git) Name string `json:"name"` // The Hash represents the commit SHA of the commit that needs to be checked out. Hash string `json:"hash"` }
Represents a reference that is used to checkout a repository for a given commit.
func (*GitReference) DeepCopy ¶
func (in *GitReference) DeepCopy() *GitReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitReference.
func (*GitReference) DeepCopyInto ¶
func (in *GitReference) DeepCopyInto(out *GitReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageSpec ¶
type ImageSpec struct { // Repository information is passed down to buildkit // as instruction on how to proceed with the repository. // The image will be build from source if the `Repository` is set. //+optional Repository *RepositorySpec `json:"repository,omitempty"` // Registry is where all the information for the container registry // lives. It needs to be properly configured for the build to // be pushed successfully. A build is pushed to the registry only // if the `RepositoryContext` exists with this `Registry` Registry RegistrySpec `json:"registry,omitempty"` }
func (*ImageSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.
func (*ImageSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Project ¶
type Project struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ProjectSpec `json:"spec,omitempty"` Status ProjectStatus `json:"status,omitempty"` }
Project is the Schema for the projects API
func (*Project) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project.
func (*Project) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Project) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProjectList ¶
type ProjectList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Project `json:"items"` }
ProjectList contains a list of Project
func (*ProjectList) DeepCopy ¶
func (in *ProjectList) DeepCopy() *ProjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList.
func (*ProjectList) DeepCopyInto ¶
func (in *ProjectList) DeepCopyInto(out *ProjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectList) DeepCopyObject ¶
func (in *ProjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProjectSpec ¶
type ProjectSpec struct { // Template to use for workspace that belongs to this project // This template can be modified but won't update existing workspace. Template ProjectTemplateSpec `json:"template"` }
ProjectSpec defines the desired state of Project
func (*ProjectSpec) DeepCopy ¶
func (in *ProjectSpec) DeepCopy() *ProjectSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec.
func (*ProjectSpec) DeepCopyInto ¶
func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectStatus ¶
type ProjectStatus struct { }
ProjectStatus defines the observed state of Project
func (*ProjectStatus) DeepCopy ¶
func (in *ProjectStatus) DeepCopy() *ProjectStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus.
func (*ProjectStatus) DeepCopyInto ¶
func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectTemplateSpec ¶
type ProjectTemplateSpec struct { // The host that components can use to generate ingresses. // Complete description of this field explained in // WorkspaceSpec Host string `json:"host"` // Collection of all the components that are required for this // workspace to deploy. Components []ComponentSpec `json:"components,omitempty"` // Defines all the environments that will be needed for this workspace Environments []EnvironmentSpec `json:"environments"` }
func (*ProjectTemplateSpec) DeepCopy ¶
func (in *ProjectTemplateSpec) DeepCopy() *ProjectTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectTemplateSpec.
func (*ProjectTemplateSpec) DeepCopyInto ¶
func (in *ProjectTemplateSpec) DeepCopyInto(out *ProjectTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Reference ¶
type Reference struct { // `namespace` is the namespace of the resource. // Required Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` // `name` is the name of the resourec. // Required Name string `json:"name" protobuf:"bytes,2,opt,name=name"` }
Reference is used to create untyped references to different object that needs to be tracked inside of Custom Resources. Examples can be found in Workspace & Build where for workspace, it needs to reference a build or a pod and uses this struct as a way to serialize the labels of the underlying resource.
func NewReference ¶
Returns a new Reference object, the client.Object interface is global and any core resource defined by K8s(Pod, services, etc) as well as CRD (Build, Workspace, etc) implements this interface.
NOTE: Since this reference is untype, different type could, in theory, share the same namespace/name and could cause issues. This is why it's important to use generatedName() when creating resources internally.
func (*Reference) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reference.
func (*Reference) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Reference) NamespacedName ¶
func (r Reference) NamespacedName() types.NamespacedName
type RegistrySpec ¶
type RegistrySpec struct { // URL is the complete URL that points to a registry. // The Images built by the Builder will be pushed to this registry. // If the registry is private, the service account that the builder runs in // needs to have write access to the registry. // // DockerHub special case is also supported here. If the URL is not a valid URL, // it will be expected to be a DockerHub image. URL string `json:"url"` // Tag to use when deploying the image as part of the workspace. // If the tag is not set, it will try to search for a default. If the // `Tags` field is set, it will use the first tag in that list. // If the `Tags` field is not set either, this field will be set to `latest` // +optional Tag *string `json:"tag,omitempty"` // List of tags the image will be exported with to the registry. // +optional Tags []string `json:"tags,omitempty"` // Target is an optional field to specify what Target you want // to export with this build. This is only usable for build that supports // more than one target. // +optional Target *string `json:"target,omitempty"` }
func (*RegistrySpec) DeepCopy ¶
func (in *RegistrySpec) DeepCopy() *RegistrySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrySpec.
func (*RegistrySpec) DeepCopyInto ¶
func (in *RegistrySpec) DeepCopyInto(out *RegistrySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RepositorySpec ¶
type RepositorySpec struct { // Location of your Dockerfile within the repository. Dockerfile string `json:"dockerfile"` // It's the location for the content of your build within the repository. Context string `json:"context"` // URL of the repository URL string `json:"url"` // Reference Hash Reference GitReference `json:"reference"` }
func (*RepositorySpec) DeepCopy ¶
func (in *RepositorySpec) DeepCopy() *RepositorySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositorySpec.
func (*RepositorySpec) DeepCopyInto ¶
func (in *RepositorySpec) DeepCopyInto(out *RepositorySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workspace ¶
type Workspace struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WorkspaceSpec `json:"spec,omitempty"` Status WorkspaceStatus `json:"status,omitempty"` }
Workspace is the Schema for the workspaces API
func (*Workspace) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workspace.
func (*Workspace) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workspace) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Workspace) SetupWebhookWithManager ¶
func (*Workspace) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Workspace) ValidateDelete ¶
ValidateDelete is not needed, just here to satisfy the interface. Change kubebuiler verbs above to "verbs=create;update;delete" if you want to enable deletion validation.
type WorkspaceCondition ¶
type WorkspaceCondition struct { // Type is the type of the condition and can be think of a task that needs // to run for a workspace to become healthy. Type WorkspaceConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=WorkspaceConditionType"` // Status is the status of the condition. // Can be True, False, Error. Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` }
func (*WorkspaceCondition) DeepCopy ¶
func (in *WorkspaceCondition) DeepCopy() *WorkspaceCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceCondition.
func (*WorkspaceCondition) DeepCopyInto ¶
func (in *WorkspaceCondition) DeepCopyInto(out *WorkspaceCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceConditionType ¶
type WorkspaceConditionType string
const ( WorkspaceConditionNamespace WorkspaceConditionType = "Namespace" WorkspaceConditionNetworking WorkspaceConditionType = "Networking" WorkspaceConditionBuildingImages WorkspaceConditionType = "Building Images" WorkspaceConditionDeployment WorkspaceConditionType = "Deployment" )
The lifecycle of a workspace will go through all of those conditions. Some of them requires conditions to be successful before starting.
type WorkspaceConditions ¶
type WorkspaceConditions []WorkspaceCondition
func (*WorkspaceConditions) CurrentPhase ¶
func (w *WorkspaceConditions) CurrentPhase() WorkspacePhase
Return a WorkspacePhased that represent the current derivation off the current conditions.
func (WorkspaceConditions) DeepCopy ¶
func (in WorkspaceConditions) DeepCopy() WorkspaceConditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceConditions.
func (WorkspaceConditions) DeepCopyInto ¶
func (in WorkspaceConditions) DeepCopyInto(out *WorkspaceConditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceConditions) GetCondition ¶
func (w *WorkspaceConditions) GetCondition(wct WorkspaceConditionType) WorkspaceCondition
Condition will retrieve a *copy* of the condition if it exists. If it doesn't exists, it will create a new one. In order to persist the condition on the status stack, the condition needs to be applied by calling SetCondition(condition)
func (*WorkspaceConditions) SetCondition ¶
func (w *WorkspaceConditions) SetCondition(condition *WorkspaceCondition)
type WorkspaceList ¶
type WorkspaceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Workspace `json:"items"` }
WorkspaceList contains a list of Workspace
func (*WorkspaceList) DeepCopy ¶
func (in *WorkspaceList) DeepCopy() *WorkspaceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceList.
func (*WorkspaceList) DeepCopyInto ¶
func (in *WorkspaceList) DeepCopyInto(out *WorkspaceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceList) DeepCopyObject ¶
func (in *WorkspaceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkspacePhase ¶
type WorkspacePhase string
const ( WorkspacePhaseRunning WorkspacePhase = "Running" WorkspacePhaseError WorkspacePhase = "Error" WorkspacePhaseTerminating WorkspacePhase = "Terminating" )
type WorkspaceSpec ¶
type WorkspaceSpec struct { // The host that components can use to generate ingresses. // This list assumes that there is a load balancer that can // accept any of these host upstream and can direct them to // the ingress controller. // // The domains here will be prefixed by the Workspace tag and the components' // network name. // // # Example // // tag: "my-workspace" // host: release.com // components: // - name: backend // network: // name: app // // For the `backend` component, if an ingress is created, it would be configured // to listen to `app.my-workspace.release.com` Host string `json:"host"` // Collection of all the components that are required for this // workspace to deploy. Components []ComponentSpec `json:"components,omitempty"` // Defines all the environments that will be needed for this workspace Environments []EnvironmentSpec `json:"environments"` // Default tag for all the images that are build that don't // have a tag specified to them. If no value is set, // it will be created before the builds starts. // A tag needs to be a valid DNS_LABEL and as such, it needs to // start with an alphabetic character (no numbers) // +optional Tag string `json:"tag,omitempty"` // SecretRef to an existing secret, within the same namespace, that will be passed // down to each of the build. SecretRef Reference `json:"secret"` }
func (*WorkspaceSpec) DeepCopy ¶
func (in *WorkspaceSpec) DeepCopy() *WorkspaceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceSpec.
func (*WorkspaceSpec) DeepCopyInto ¶
func (in *WorkspaceSpec) DeepCopyInto(out *WorkspaceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceStatus ¶
type WorkspaceStatus struct { // ManagedNamespace is the namespace that will be associated with this workspace. // All k8s objects that will need to exist for this workspace will live under that // namespace Namespace string `json:"namespace,omitempty"` //omitempty until the code exists // Conditions are how the operator handle state transition. Each condition // represent a task that needs to go to completion. Conditions WorkspaceConditions `json:"conditions,omitempty"` // Phase is a high overview of the state of this workspace. It is used as a proxy // to represent the current state of the Workspace with regards to its conditions. Phase WorkspacePhase `json:"phase"` // Builds are the unit of work associated for each of the builds // that are required for this workspace to launch. Builds are seeding // the Images as they complete. Builds []Reference `json:"builds,omitempty"` // Images are seeded by Builds as they are completed. It's // also possible for some services in a workspace to have images that don't // require a build (think database, etc.). Images []BuildImage `json:"images,omitempty"` // References to services that are created for this workspace. // These service are needed to figure out ports mapping for the // container when the workspace is in the Deploying stage. Services map[string]Reference `json:"services,omitempty"` }
WorkspaceStatus defines the observed state of Workspace
func (*WorkspaceStatus) DeepCopy ¶
func (in *WorkspaceStatus) DeepCopy() *WorkspaceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus.
func (*WorkspaceStatus) DeepCopyInto ¶
func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.