Skip to content

Commit 17f7b6c

Browse files
authored
Add throughput condition (#18982)
1 parent 75713b2 commit 17f7b6c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func (s *WorkspaceStatus) SetCondition(cond metav1.Condition) {
195195
s.Conditions = wsk8s.AddUniqueCondition(s.Conditions, cond)
196196
}
197197

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

201201
const (
@@ -243,6 +243,9 @@ const (
243243

244244
// NodeDisappeared is true if the workspace's node disappeared before the workspace was stopped
245245
WorkspaceConditionNodeDisappeared WorkspaceCondition = "NodeDisappeared"
246+
247+
// ThroughputAdjusted is true if the throughput of the workspace volume has been adjusted
248+
WorkspaceConditionThroughputAdjusted WorkspaceCondition = "ThroughputAdjusted"
246249
)
247250

248251
func NewWorkspaceConditionDeployed() metav1.Condition {
@@ -371,6 +374,14 @@ func NewWorkspaceConditionNodeDisappeared() metav1.Condition {
371374
}
372375
}
373376

377+
func NewWorkspaceConditionThroughputAdjusted() metav1.Condition {
378+
return metav1.Condition{
379+
Type: string(WorkspaceConditionThroughputAdjusted),
380+
LastTransitionTime: metav1.Now(),
381+
Status: metav1.ConditionTrue,
382+
}
383+
}
384+
374385
// +kubebuilder:validation:Enum:=Unknown;Pending;Imagebuild;Creating;Initializing;Running;Stopping;Stopped
375386
type WorkspacePhase string
376387

0 commit comments

Comments
 (0)