Skip to content

Commit bc69137

Browse files
committed
Adding volume fields to workspace CRs
1 parent df7929c commit bc69137

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

components/ws-manager-api/go/crd/v1/workspace_types.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ type WorkspaceSpec struct {
6262

6363
// the XFS quota to enforce on the workspace's /workspace folder
6464
StorageQuota int `json:"storageQuota,omitempty"`
65+
66+
// Storage configures the backing storage for this workspace
67+
Storage StorageSpec `json:"storageSpec,omitempty"`
6568
}
6669

6770
type Ownership struct {
@@ -166,6 +169,11 @@ func (ps PortSpec) Equal(other PortSpec) bool {
166169
return true
167170
}
168171

172+
type StorageSpec struct {
173+
Volume string `json:"volume"`
174+
MountPath string `json:"mountPath"`
175+
}
176+
169177
// WorkspaceStatus defines the observed state of Workspace
170178
type WorkspaceStatus struct {
171179
PodStarts int `json:"podStarts"`
@@ -188,6 +196,8 @@ type WorkspaceStatus struct {
188196
// +kubebuilder:validation:Optional
189197
Runtime *WorkspaceRuntimeStatus `json:"runtime,omitempty"`
190198

199+
VolumeDevice string `json:"volumeDevice,omitempty"`
200+
191201
LastActivity *metav1.Time `json:"lastActivity,omitempty"`
192202
}
193203

@@ -244,8 +254,10 @@ const (
244254
// NodeDisappeared is true if the workspace's node disappeared before the workspace was stopped
245255
WorkspaceConditionNodeDisappeared WorkspaceCondition = "NodeDisappeared"
246256

247-
// ThroughputAdjusted is true if the throughput of the workspace volume has been adjusted
248-
WorkspaceConditionThroughputAdjusted WorkspaceCondition = "ThroughputAdjusted"
257+
// VolumeAttached is true if the workspace's volume has been attached to the node
258+
VolumeAttached WorkspaceCondition = "VolumeAttached"
259+
// VolumeMounted is true if the workspace's volume has been mounted on the node
260+
VolumeMounted WorkspaceCondition = "VolumeMounted"
249261
)
250262

251263
func NewWorkspaceConditionDeployed() metav1.Condition {

components/ws-manager-api/go/crd/v1/zz_generated.deepcopy.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)