Skip to content

Add throughput condition #18982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion components/ws-manager-api/go/crd/v1/workspace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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

Expand Down