v1

package
v0.0.0-...-3091b23 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the terraform v1 API group +kubebuilder:object:generate=true +groupName=terraform.scipian.io

Index

Constants

View Source
const (
	PendingJobCreation = "PendingJobCreation"
	ErrRetriveTfstate  = "ErrRetriveTfstate"
	RunSucceeded       = "RunSucceeded"
	JobCompleted       = "JobCompleted"
	JobFailed          = "JobFailed"
	PendingPodCreation = "PendingPodCreation"
	PodPending         = "PodPending"
	PodSucceeded       = "PodSucceeded"
	PodFailed          = "PodFailed"
	PodRunning         = "PodRunning"
	ErrImagePull       = "ErrImagePull"
	ImagePullBackOff   = "ImagePullBackOff"
	WorkspaceCreated   = "WorkspaceCreated"
)

Valid status reasons for scipian objects (Workspace and Run)

Variables

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

	// 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 ObjectPhase

type ObjectPhase string

ObjectPhase is a label for the condition of different scipian objects(Workspace and Run) at the current time.

const (
	// ObjPending means that the scipian object has been accepted by the system, but the job and/or pod related
	// to the object has not started. The object remains in this phase until the job creates a pod.
	ObjPending ObjectPhase = "Pending"
	// ObjRunning means that the pod created by the job is active. The object remains in this phase until the job
	// completes successfully and tfstate is retrieved. Applicable only while creating a workspace / creating a
	// run with destroyResource: False
	ObjRunning ObjectPhase = "Running"
	// WorkspaceDeleting means that the pod created by the job (that deletes a terraform workspace) is active.
	// The workspace remains in this state still the job completes successfully and the workspace finalizer is
	// removed. Applicable only while deleting a workspace object.
	WorkspaceDeleting ObjectPhase = "Deleting"
	// ObjSucceeded means that the scipian object has been created successfully after successful tfstate retrieval.
	// Only applicable while creating a scipian object.
	ObjSucceeded ObjectPhase = "Succeeded"
	// ObjFailed means that the job created by the scipian object failed due to some reason or when a pod goes into
	// a pending state because of an ErrImagePull or ImagePullBackOff error (Only applicable for workspace).
	ObjFailed ObjectPhase = "Failed"
	// ObjIncomplete means that the job created by the scipian object has completed successfully, but the tfstate
	// retrieval was unsuccessful. Applicable only while creating a scipian object.
	ObjIncomplete ObjectPhase = "Incomplete"
	// RunDestroying is similar to ObjRunning and is applicable only while creating a run object with
	// destroyResource: True.
	RunDestroying ObjectPhase = "Destroying"
)

Valid statuses for scipian objects (Workspace and Run)

type Run

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

	Spec    RunSpec   `json:"spec,omitempty"`
	Status  RunStatus `json:"status,omitempty"`
	PodName string    `json:"podName,omitempty"`
}

Run is the Schema for the runs API

func (*Run) DeepCopy

func (in *Run) DeepCopy() *Run

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

func (*Run) DeepCopyInto

func (in *Run) DeepCopyInto(out *Run)

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

func (*Run) DeepCopyObject

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

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

type RunList

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

RunList contains a list of Run

func (*RunList) DeepCopy

func (in *RunList) DeepCopy() *RunList

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

func (*RunList) DeepCopyInto

func (in *RunList) DeepCopyInto(out *RunList)

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

func (*RunList) DeepCopyObject

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

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

type RunSpec

type RunSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	WorkspaceName   string `json:"workspaceName"`
	DestroyResource bool   `json:"destroyResource,omitempty"`
}

RunSpec defines the desired state of Run

func (*RunSpec) DeepCopy

func (in *RunSpec) DeepCopy() *RunSpec

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

func (*RunSpec) DeepCopyInto

func (in *RunSpec) DeepCopyInto(out *RunSpec)

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

type RunStatus

type RunStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Phase        ObjectPhase `json:"phase"`
	Reason       string      `json:"reason"`
	JobCompleted bool        `json:"jobCompleted"`
}

RunStatus defines the observed state of Run

func (*RunStatus) DeepCopy

func (in *RunStatus) DeepCopy() *RunStatus

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

func (*RunStatus) DeepCopyInto

func (in *RunStatus) DeepCopyInto(out *RunStatus)

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"`
	PodName string          `json:"podName,omitempty"`
}

Workspace is the Schema for the workspaces API

func (*Workspace) DeepCopy

func (in *Workspace) DeepCopy() *Workspace

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

func (*Workspace) DeepCopyInto

func (in *Workspace) DeepCopyInto(out *Workspace)

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

func (*Workspace) DeepCopyObject

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

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

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 WorkspaceSpec

type WorkspaceSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Image      string            `json:"image"`
	Secret     string            `json:"secret"`
	WorkingDir string            `json:"workingDir"`
	Region     string            `json:"region"`
	EnvVars    map[string]string `json:"envVars,omitempty"`
	TfVars     map[string]string `json:"tfVars,omitempty"`
	TfState    string            `json:"state,omitempty"`
}

WorkspaceSpec defines the desired state of Workspace

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 {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Phase        ObjectPhase `json:"phase"`
	Reason       string      `json:"reason"`
	JobCompleted bool        `json:"jobCompleted"`
}

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.

Jump to

Keyboard shortcuts

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