Skip to content

Commit f22999f

Browse files
committed
Move workspace volume details to status
1 parent bc69137 commit f22999f

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ 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"`
6865
}
6966

7067
type Ownership struct {
@@ -169,11 +166,6 @@ func (ps PortSpec) Equal(other PortSpec) bool {
169166
return true
170167
}
171168

172-
type StorageSpec struct {
173-
Volume string `json:"volume"`
174-
MountPath string `json:"mountPath"`
175-
}
176-
177169
// WorkspaceStatus defines the observed state of Workspace
178170
type WorkspaceStatus struct {
179171
PodStarts int `json:"podStarts"`
@@ -196,7 +188,8 @@ type WorkspaceStatus struct {
196188
// +kubebuilder:validation:Optional
197189
Runtime *WorkspaceRuntimeStatus `json:"runtime,omitempty"`
198190

199-
VolumeDevice string `json:"volumeDevice,omitempty"`
191+
Storage StorageStatus `json:"storage,omitempty"`
192+
VolumeDevice string `json:"volumeDevice,omitempty"`
200193

201194
LastActivity *metav1.Time `json:"lastActivity,omitempty"`
202195
}
@@ -205,6 +198,12 @@ func (s *WorkspaceStatus) SetCondition(cond metav1.Condition) {
205198
s.Conditions = wsk8s.AddUniqueCondition(s.Conditions, cond)
206199
}
207200

201+
type StorageStatus struct {
202+
VolumeName string `json:"volumeName"`
203+
AttachedDevice string `json:"attachedDevice"`
204+
MountPath string `json:"mountPath"`
205+
}
206+
208207
// +kubebuilder:validation:Enum=Deployed;Failed;Timeout;FirstUserActivity;Closed;HeadlessTaskFailed;StoppedByRequest;Aborted;ContentReady;EverReady;BackupComplete;BackupFailure;Refresh;NodeDisappeared;ThroughputAdjusted
209208
type WorkspaceCondition string
210209

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

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

0 commit comments

Comments
 (0)