Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the etok v1alpha1 API group +kubebuilder:object:generate=true +groupName=etok.dev
Index ¶
- Constants
- Variables
- func ApprovedAnnotationKey(runName string) string
- func RunLockFileConfigMapName(name string) string
- func WorkspacePodName(name string) string
- type AttachSpec
- type Run
- type RunList
- type RunPhase
- type RunSpec
- type RunStatus
- type Workspace
- func (in *Workspace) DeepCopy() *Workspace
- func (in *Workspace) DeepCopyInto(out *Workspace)
- func (in *Workspace) DeepCopyObject() runtime.Object
- func (ws *Workspace) IsPrivilegedCommand(cmd string) bool
- func (ws *Workspace) IsReconciled() bool
- func (ws *Workspace) IsRunApproved(run *Run) bool
- func (ws *Workspace) PVCName() string
- func (ws *Workspace) PodName() string
- func (ws *Workspace) VariablesConfigMapName() string
- type WorkspaceCacheSpec
- type WorkspaceList
- type WorkspacePhase
- type WorkspaceSpec
- type WorkspaceStatus
Constants ¶
const (
DefaultHandshakeTimeout = 10 * time.Second
)
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "etok.dev", 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 ApprovedAnnotationKey ¶
func RunLockFileConfigMapName ¶ added in v0.0.4
func WorkspacePodName ¶
Types ¶
type AttachSpec ¶
type AttachSpec struct { // Enable TTY on pod and await handshake string from client Handshake bool `json:"handshake,omitempty"` // How long to wait for handshake before timing out HandshakeTimeout string `json:"handshakeTimeout,omitempty"` }
AttachSpec defines behaviour for clients attaching to the pod's TTY
func (*AttachSpec) DeepCopy ¶
func (in *AttachSpec) DeepCopy() *AttachSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttachSpec.
func (*AttachSpec) DeepCopyInto ¶
func (in *AttachSpec) DeepCopyInto(out *AttachSpec)
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) ApprovedAnnotationKey ¶
ApprovedAnnotationKey is the key to be set on a workspace's annotations to indicate that this run is approved. Only necessary if the workspace has categorised the run's command as privileged.
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) IsReconciled ¶ added in v0.0.3
func (*Run) LockFileConfigMapName ¶ added in v0.0.4
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 { // The command to run on the pod Command string `json:"command"` // The arguments to be passed to the command Args []string `json:"args,omitempty"` // ConfigMap containing the tarball to extract on the pod ConfigMap string `json:"configMap"` // The config map key identifying the tarball to extract ConfigMapKey string `json:"configMapKey"` // The path within the archive to the root module ConfigMapPath string `json:"configMapPath"` // The workspace of the run. Workspace string `json:"workspace"` // Logging verbosity. Verbosity int `json:"verbosity,omitempty"` // AttachSpec defines behaviour for clients attaching to the pod's TTY 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.
type RunStatus ¶
type RunStatus struct { // Current phase of the run's lifecycle. Phase RunPhase `json:"phase,omitempty"` // True if resource has been reconciled at least once. Reconciled bool `json:"reconciled,omitempty"` }
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,shortName={ws} +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.terraformVersion" +kubebuilder:printcolumn:name="Queue",type="string",JSONPath=".status.queue" +genclient
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) IsPrivilegedCommand ¶
func (*Workspace) IsReconciled ¶ added in v0.0.3
func (*Workspace) IsRunApproved ¶
func (*Workspace) VariablesConfigMapName ¶ added in v0.0.4
type WorkspaceCacheSpec ¶
type WorkspaceCacheSpec struct { // Storage class for the cache's persistent volume claim. This is a pointer // to distinguish between explicit empty string and nil (which triggers // different behaviour for dynamic provisioning of persistent volumes). StorageClass *string `json:"storageClass,omitempty"` // Size of cache's persistent volume claim. Size string `json:"size,omitempty"` }
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 ¶
type WorkspacePhase string
const ( WorkspacePhaseInitializing WorkspacePhase = "initializing" WorkspacePhaseReady WorkspacePhase = "ready" WorkspacePhaseError WorkspacePhase = "error" WorkspacePhaseUnknown WorkspacePhase = "unknown" WorkspacePhaseDeleting WorkspacePhase = "deleting" )
type WorkspaceSpec ¶
type WorkspaceSpec struct { // Name of the secret resource. Its keys and values will be made available // as environment variables on the workspace pod. SecretName string `json:"secretName,omitempty"` // Name of the service account configured for the workspace pod. ServiceAccountName string `json:"serviceAccountName,omitempty"` // Persistent Volume Claim specification for workspace's cache. Cache WorkspaceCacheSpec `json:"cache,omitempty"` // Logging verbosity. Verbosity int `json:"verbosity,omitempty"` // List of commands that are deemed privileged. The client must set a // specific annotation on the workspace to approve a run with a privileged // command. PrivilegedCommands []string `json:"privilegedCommands,omitempty"` // Required version of Terraform on workspace pod TerraformVersion string `json:"terraformVersion,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 { // Queue of runs. Parse bypass the queue. Queue []string `json:"queue,omitempty"` // Lifecycle phase of workspace. Phase WorkspacePhase `json:"phase,omitempty"` // True if resource has been reconciled at least once. Reconciled bool `json:"reconciled,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.