Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion workspaces/controller/api/v1beta1/workspace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,12 @@ type WorkspaceStatus struct {
// +kubebuilder:default=false
PendingRestart bool `json:"pendingRestart"`

// information about the current podTemplate options
// information about the current podTemplate options (only set for WorkspaceKind of podTemplate kind)
PodTemplateOptions WorkspacePodOptionsStatus `json:"podTemplateOptions"`

// information about the Pod managed by this Workspace (only set for WorkspaceKind of podTemplate kind)
PodTemplatePod WorkspacePodStatus `json:"podTemplatePod"`

// the current state of the Workspace
// +kubebuilder:default="Unknown"
State WorkspaceState `json:"state"`
Expand Down Expand Up @@ -221,6 +224,24 @@ type WorkspacePodOptionRedirectStep struct {
Target string `json:"target"`
}

type WorkspacePodStatus struct {
// the name of the Pod resource
Name string `json:"name"`

// information about the Pod's containers
// +kubebuilder:validation:Optional
Containers []WorkspacePodContainer `json:"containers,omitempty"`

// information about the Pod's initContainers
// +kubebuilder:validation:Optional
InitContainers []WorkspacePodContainer `json:"initContainers,omitempty"`
}

type WorkspacePodContainer struct {
// the name of the container
Name string `json:"name"`
}

// +kubebuilder:validation:Enum:={"Running","Terminating","Paused","Pending","Error","Unknown"}
type WorkspaceState string

Expand Down
41 changes: 41 additions & 0 deletions workspaces/controller/api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ spec:
like `podMetadata`, `probes`, `extraEnv`, or `containerSecurityContext`
type: boolean
podTemplateOptions:
description: information about the current podTemplate options
description: information about the current podTemplate options (only
set for WorkspaceKind of podTemplate kind)
properties:
imageConfig:
description: info about the current imageConfig option
Expand Down Expand Up @@ -274,6 +275,38 @@ spec:
- imageConfig
- podConfig
type: object
podTemplatePod:
description: information about the Pod managed by this Workspace (only
set for WorkspaceKind of podTemplate kind)
properties:
containers:
description: information about the Pod's containers
items:
properties:
name:
description: the name of the container
type: string
required:
- name
type: object
type: array
initContainers:
description: information about the Pod's initContainers
items:
properties:
name:
description: the name of the container
type: string
required:
- name
type: object
type: array
name:
description: the name of the Pod resource
type: string
required:
- name
type: object
state:
default: Unknown
description: the current state of the Workspace
Expand All @@ -296,6 +329,7 @@ spec:
- pauseTime
- pendingRestart
- podTemplateOptions
- podTemplatePod
- state
- stateMessage
type: object
Expand Down
Loading