Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the stok v1alpha1 API group +kubebuilder:object:generate=true +groupName=stok.goalspike.com
Index ¶
- Constants
- Variables
- func BackendConfig(cfg map[string]string) string
- func BackendConfigMapName(workspace string) string
- func BackendEmptyConfig(backendType string) string
- func WorkspacePodName(name string) string
- type AttachSpec
- type BackendSpec
- type Run
- func (r *Run) ContainerArgs() (args []string)
- func (in *Run) DeepCopy() *Run
- func (in *Run) DeepCopyInto(out *Run)
- func (in *Run) DeepCopyObject() runtime.Object
- func (r *Run) GetHandshake() bool
- func (r *Run) GetHandshakeTimeout() string
- func (r *Run) PodName() string
- func (r *Run) WorkingDir() string
- type RunList
- type RunPhase
- type RunSpec
- func (in *RunSpec) DeepCopy() *RunSpec
- func (in *RunSpec) DeepCopyInto(out *RunSpec)
- func (r *RunSpec) GetArgs() []string
- func (r *RunSpec) GetCommand() string
- func (r *RunSpec) GetConfigMap() string
- func (r *RunSpec) GetConfigMapKey() string
- func (r *RunSpec) GetConfigMapPath() string
- func (r *RunSpec) GetDebug() bool
- func (r *RunSpec) GetWorkspace() string
- func (r *RunSpec) SetArgs(args []string)
- func (r *RunSpec) SetCommand(cmd string)
- func (r *RunSpec) SetConfigMap(name string)
- func (r *RunSpec) SetConfigMapKey(key string)
- func (r *RunSpec) SetConfigMapPath(path string)
- func (r *RunSpec) SetDebug(debug bool)
- func (r *RunSpec) SetWorkspace(ws string)
- type RunStatus
- type Workspace
- func (ws *Workspace) ContainerArgs() (args []string)
- func (in *Workspace) DeepCopy() *Workspace
- func (in *Workspace) DeepCopyInto(out *Workspace)
- func (in *Workspace) DeepCopyObject() runtime.Object
- func (ws *Workspace) GetDebug() bool
- func (ws *Workspace) GetHandshake() bool
- func (ws *Workspace) GetHandshakeTimeout() string
- func (ws *Workspace) PVCName() string
- func (ws *Workspace) PodName() string
- func (ws *Workspace) SetDebug(debug bool)
- func (ws *Workspace) WorkingDir() string
- type WorkspaceCacheSpec
- type WorkspaceList
- type WorkspacePhase
- type WorkspaceSpec
- type WorkspaceStatus
Constants ¶
const ( WorkspacePhaseInitializing WorkspacePhase = "initializing" WorkspacePhaseReady WorkspacePhase = "ready" WorkspacePhaseError WorkspacePhase = "error" WorkspacePhaseUnknown WorkspacePhase = "unknown" WorkspacePhaseDeleting WorkspacePhase = "deleting" WorkspaceDefaultCacheSize = "1Gi" WorkspaceDefaultSecretName = "stok" WorkspaceDefaultServiceAccountName = "stok" BackendTypeFilename = "backend.tf" BackendConfigFilename = "backend.ini" )
const (
DefaultHandshakeTimeout = 10 * time.Second
)
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "stok.goalspike.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func BackendConfig ¶
Return a terraform backend configuration file (similar to an INI file)
func BackendConfigMapName ¶
func BackendEmptyConfig ¶
func WorkspacePodName ¶ added in v0.2.11
Types ¶
type AttachSpec ¶ added in v0.2.11
type AttachSpec struct { // Toggle whether runner should wait for a handshake from client Handshake bool `json:"handshake"` // How long to wait for handshake before timing out // +kubebuilder:default="10s" HandshakeTimeout string `json:"handshakeTimeout"` }
AttachSpec defines behavour for clients attaching to the runner TTY
func (*AttachSpec) DeepCopy ¶ added in v0.2.11
func (in *AttachSpec) DeepCopy() *AttachSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttachSpec.
func (*AttachSpec) DeepCopyInto ¶ added in v0.2.11
func (in *AttachSpec) DeepCopyInto(out *AttachSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackendSpec ¶
type BackendSpec struct { // +kubebuilder:validation:Enum=local;remote;artifactory;azurerm;consul;cos;etcd;etcdv3;gcs;http;manta;oss;pg;s3;swift Type string `json:"type,omitempty"` Config map[string]string `json:"config,omitempty"` }
func (*BackendSpec) DeepCopy ¶
func (in *BackendSpec) DeepCopy() *BackendSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendSpec.
func (*BackendSpec) DeepCopyInto ¶
func (in *BackendSpec) DeepCopyInto(out *BackendSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Run ¶
type Run struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` RunSpec `json:"spec,omitempty"` RunStatus `json:"status,omitempty"` }
func (*Run) ContainerArgs ¶ added in v0.2.12
ContainerArgs returns the args for a run's container
func (*Run) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Run.
func (*Run) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Run) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Run) GetHandshake ¶ added in v0.2.12
func (*Run) GetHandshakeTimeout ¶ added in v0.2.12
func (*Run) WorkingDir ¶ added in v0.2.12
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunList.
func (*RunList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RunList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RunSpec ¶
type RunSpec struct { // +kubebuilder:validation:Enum={"apply","destroy","force-unlock","get","import","init","output","plan","refresh","sh","state list","state mv","state pull","state push","state rm","state show","taint","untaint","validate"} Command string `json:"command"` Args []string `json:"args,omitempty"` Debug bool `json:"debug,omitempty"` ConfigMap string `json:"configMap"` ConfigMapKey string `json:"configMapKey"` ConfigMapPath string `json:"configMapPath"` Workspace string `json:"workspace"` AttachSpec `json:",inline"` }
RunSpec defines the desired state of Run
func (*RunSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunSpec.
func (*RunSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RunSpec) GetConfigMapKey ¶
Get/Set ConfigMapKey functions
func (*RunSpec) GetConfigMapPath ¶ added in v0.2.12
Get/Set ConfigMapPath functions
func (*RunSpec) SetCommand ¶
func (*RunSpec) SetConfigMap ¶
func (*RunSpec) SetConfigMapKey ¶
func (*RunSpec) SetConfigMapPath ¶ added in v0.2.12
func (*RunSpec) SetWorkspace ¶
type RunStatus ¶
type RunStatus struct {
Phase RunPhase `json:"phase"`
}
RunStatus defines the observed state of Run
func (*RunStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunStatus.
func (*RunStatus) DeepCopyInto ¶
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 +kubebuilder:subresource:status +kubebuilder:resource:path=workspaces,scope=Namespaced +kubebuilder:printcolumn:name="Queue",type="string",JSONPath=".status.queue" +kubebuilder:printcolumn:name="Backend",type="string",JSONPath=".spec.backend.type" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" +genclient
func (*Workspace) ContainerArgs ¶ added in v0.2.12
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) GetHandshake ¶ added in v0.2.12
func (*Workspace) GetHandshakeTimeout ¶ added in v0.2.12
func (*Workspace) WorkingDir ¶ added in v0.2.12
type WorkspaceCacheSpec ¶
type WorkspaceCacheSpec struct { StorageClass string `json:"storageClass,omitempty"` Size string `json:"size,omitempty" default:"1Gi"` }
WorkspaceSpec defines the desired state of Workspace's cache storage
func (*WorkspaceCacheSpec) DeepCopy ¶
func (in *WorkspaceCacheSpec) DeepCopy() *WorkspaceCacheSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceCacheSpec.
func (*WorkspaceCacheSpec) DeepCopyInto ¶
func (in *WorkspaceCacheSpec) DeepCopyInto(out *WorkspaceCacheSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶ added in v0.2.11
type WorkspacePhase string
type WorkspaceSpec ¶
type WorkspaceSpec struct { // +kubebuilder:default=stok SecretName string `json:"secretName,omitempty"` // +kubebuilder:default=stok ServiceAccountName string `json:"serviceAccountName,omitempty"` Cache WorkspaceCacheSpec `json:"cache,omitempty"` Backend BackendSpec `json:"backend"` Debug bool `json:"debug,omitempty"` AttachSpec `json:",inline"` }
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 { Queue []string `json:"queue"` Phase WorkspacePhase `json:"phase"` }
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.