Skip to content

[ws-manager-mk2] Remove headless field #16611

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
Mar 1, 2023
Merged
Show file tree
Hide file tree
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
1 change: 0 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 @@ -116,7 +116,6 @@ type PortSpec struct {
// WorkspaceStatus defines the observed state of Workspace
type WorkspaceStatus struct {
PodStarts int `json:"podStarts"`
Headless bool `json:"headless"`
URL string `json:"url,omitempty"`
OwnerToken string `json:"ownerToken,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,6 @@ spec:
type: string
type: array
type: object
headless:
type: boolean
ownerToken:
type: string
phase:
Expand Down Expand Up @@ -538,7 +536,6 @@ spec:
url:
type: string
required:
- headless
- podStarts
type: object
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (r *WorkspaceReconciler) actOnStatus(ctx context.Context, workspace *worksp
case isWorkspaceBeingDeleted(workspace) && !isPodBeingDeleted(pod):
return r.deleteWorkspacePod(ctx, pod, "workspace deleted")

case workspace.Status.Headless && workspace.Status.Phase == workspacev1.WorkspacePhaseStopped && !isPodBeingDeleted(pod):
case workspace.IsHeadless() && workspace.Status.Phase == workspacev1.WorkspacePhaseStopped && !isPodBeingDeleted(pod):
// Workspace was requested to be deleted, propagate by deleting the Pod.
// The Pod deletion will then trigger workspace disposal steps.
err := r.Client.Delete(ctx, pod)
Expand Down