Skip to content

Commit 9331ac5

Browse files
csweichelaledbfFuristo
authored
Add storage metadata to workspace CR (#19044)
* Adding volume fields to workspace CRs * Move workspace volume details to status * Add VolumeAttachRequest condition * Add throughput condition (#18982) --------- Co-authored-by: Alejandro de Brito Fontes <[email protected]> Co-authored-by: Thomas Schubart <[email protected]>
1 parent b786da1 commit 9331ac5

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,21 @@ type WorkspaceStatus struct {
188188
// +kubebuilder:validation:Optional
189189
Runtime *WorkspaceRuntimeStatus `json:"runtime,omitempty"`
190190

191+
Storage StorageStatus `json:"storage,omitempty"`
192+
191193
LastActivity *metav1.Time `json:"lastActivity,omitempty"`
192194
}
193195

194196
func (s *WorkspaceStatus) SetCondition(cond metav1.Condition) {
195197
s.Conditions = wsk8s.AddUniqueCondition(s.Conditions, cond)
196198
}
197199

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

@@ -244,6 +252,11 @@ const (
244252
// NodeDisappeared is true if the workspace's node disappeared before the workspace was stopped
245253
WorkspaceConditionNodeDisappeared WorkspaceCondition = "NodeDisappeared"
246254

255+
VolumeAttachRequest WorkspaceCondition = "VolumeAttachRequest"
256+
// VolumeAttached is true if the workspace's volume has been attached to the node
257+
VolumeAttached WorkspaceCondition = "VolumeAttached"
258+
// VolumeMounted is true if the workspace's volume has been mounted on the node
259+
VolumeMounted WorkspaceCondition = "VolumeMounted"
247260
// ThroughputAdjusted is true if the throughput of the workspace volume has been adjusted
248261
WorkspaceConditionThroughputAdjusted WorkspaceCondition = "ThroughputAdjusted"
249262
)

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)