From 17f7b6c2a7ef7b8c50b5f1ae52e512fa15056770 Mon Sep 17 00:00:00 2001 From: Thomas Schubart <24721048+Furisto@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:00:37 +0100 Subject: [PATCH] Add throughput condition (#18982) --- .../ws-manager-api/go/crd/v1/workspace_types.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/components/ws-manager-api/go/crd/v1/workspace_types.go b/components/ws-manager-api/go/crd/v1/workspace_types.go index 3c4bb39c5c1049..5035a08f7c4f7f 100644 --- a/components/ws-manager-api/go/crd/v1/workspace_types.go +++ b/components/ws-manager-api/go/crd/v1/workspace_types.go @@ -195,7 +195,7 @@ func (s *WorkspaceStatus) SetCondition(cond metav1.Condition) { s.Conditions = wsk8s.AddUniqueCondition(s.Conditions, cond) } -// +kubebuilder:validation:Enum=Deployed;Failed;Timeout;FirstUserActivity;Closed;HeadlessTaskFailed;StoppedByRequest;Aborted;ContentReady;EverReady;BackupComplete;BackupFailure;Refresh;NodeDisappeared +// +kubebuilder:validation:Enum=Deployed;Failed;Timeout;FirstUserActivity;Closed;HeadlessTaskFailed;StoppedByRequest;Aborted;ContentReady;EverReady;BackupComplete;BackupFailure;Refresh;NodeDisappeared;ThroughputAdjusted type WorkspaceCondition string const ( @@ -243,6 +243,9 @@ const ( // NodeDisappeared is true if the workspace's node disappeared before the workspace was stopped WorkspaceConditionNodeDisappeared WorkspaceCondition = "NodeDisappeared" + + // ThroughputAdjusted is true if the throughput of the workspace volume has been adjusted + WorkspaceConditionThroughputAdjusted WorkspaceCondition = "ThroughputAdjusted" ) func NewWorkspaceConditionDeployed() metav1.Condition { @@ -371,6 +374,14 @@ func NewWorkspaceConditionNodeDisappeared() metav1.Condition { } } +func NewWorkspaceConditionThroughputAdjusted() metav1.Condition { + return metav1.Condition{ + Type: string(WorkspaceConditionThroughputAdjusted), + LastTransitionTime: metav1.Now(), + Status: metav1.ConditionTrue, + } +} + // +kubebuilder:validation:Enum:=Unknown;Pending;Imagebuild;Creating;Initializing;Running;Stopping;Stopped type WorkspacePhase string