Skip to content

Commit c08a035

Browse files
committed
Add throughput condition (#18982)
1 parent b367004 commit c08a035

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ type StorageStatus struct {
203203
MountPath string `json:"mountPath"`
204204
}
205205

206-
// +kubebuilder:validation:Enum=Deployed;Failed;Timeout;FirstUserActivity;Closed;HeadlessTaskFailed;StoppedByRequest;Aborted;ContentReady;EverReady;BackupComplete;BackupFailure;Refresh;NodeDisappeared
206+
// +kubebuilder:validation:Enum=Deployed;Failed;Timeout;FirstUserActivity;Closed;HeadlessTaskFailed;StoppedByRequest;Aborted;ContentReady;EverReady;BackupComplete;BackupFailure;Refresh;NodeDisappeared;ThroughputAdjusted
207207
type WorkspaceCondition string
208208

209209
const (
@@ -257,6 +257,8 @@ const (
257257
VolumeAttached WorkspaceCondition = "VolumeAttached"
258258
// VolumeMounted is true if the workspace's volume has been mounted on the node
259259
VolumeMounted WorkspaceCondition = "VolumeMounted"
260+
// ThroughputAdjusted is true if the throughput of the workspace volume has been adjusted
261+
WorkspaceConditionThroughputAdjusted WorkspaceCondition = "ThroughputAdjusted"
260262
)
261263

262264
func NewWorkspaceConditionDeployed() metav1.Condition {
@@ -385,6 +387,14 @@ func NewWorkspaceConditionNodeDisappeared() metav1.Condition {
385387
}
386388
}
387389

390+
func NewWorkspaceConditionThroughputAdjusted() metav1.Condition {
391+
return metav1.Condition{
392+
Type: string(WorkspaceConditionThroughputAdjusted),
393+
LastTransitionTime: metav1.Now(),
394+
Status: metav1.ConditionTrue,
395+
}
396+
}
397+
388398
// +kubebuilder:validation:Enum:=Unknown;Pending;Imagebuild;Creating;Initializing;Running;Stopping;Stopped
389399
type WorkspacePhase string
390400

0 commit comments

Comments
 (0)