diff --git a/chart/templates/workspace-template.yaml b/chart/templates/workspace-template.yaml index 0962ddf12b1324..812300511f633f 100644 --- a/chart/templates/workspace-template.yaml +++ b/chart/templates/workspace-template.yaml @@ -49,10 +49,6 @@ data: "probe.yaml": | {{ dict | merge ($comp.templates.probe | default dict) (include "coreWorkspaceAffinity" (dict "comp" $comp "tpe" "probe") | fromYaml) | toJson | indent 4 }} {{- end }} -{{ if (or $comp.templates.regular $comp.affinity) }} - "ghost.yaml": | -{{ dict | merge ($comp.templates.ghost | default dict) (include "coreWorkspaceAffinity" (dict "comp" $comp "tpe" "ghost") | fromYaml) | toJson | indent 4 }} -{{- end }} {{ if (or $comp.templates.imagebuild $comp.affinity) }} "imagebuild.yaml": | {{ dict | merge ($comp.templates.imagebuild | default dict) (include "coreWorkspaceAffinity" (dict "comp" $comp "tpe" "imagebuild") | fromYaml) | toJson | indent 4 }} diff --git a/chart/templates/ws-manager-configmap.yaml b/chart/templates/ws-manager-configmap.yaml index ed6c074dda502b..c92300ea177ea8 100644 --- a/chart/templates/ws-manager-configmap.yaml +++ b/chart/templates/ws-manager-configmap.yaml @@ -71,7 +71,6 @@ data: {{- if $wscomp.templates }} {{ if (or $wscomp.templates.prebuild $wscomp.affinity) -}}"prebuildPath": "/workspace-template/prebuild.yaml",{{- end }} {{ if (or $wscomp.templates.probe $wscomp.affinity) -}}"probePath": "/workspace-template/probe.yaml",{{- end }} - {{ if (or $wscomp.templates.ghost $wscomp.affinity) -}}"ghostPath": "/workspace-template/ghost.yaml",{{- end }} {{ if (or $wscomp.templates.imagebuild $wscomp.affinity) -}}"imagebuildPath": "/workspace-template/imagebuild.yaml",{{- end }} {{ if (or $wscomp.templates.regular $wscomp.affinity) -}}"regularPath": "/workspace-template/regular.yaml",{{- end }} {{ end -}} diff --git a/components/common-go/kubernetes/kubernetes.go b/components/common-go/kubernetes/kubernetes.go index 49dfcacd0c0259..ef99b22cad6284 100644 --- a/components/common-go/kubernetes/kubernetes.go +++ b/components/common-go/kubernetes/kubernetes.go @@ -128,15 +128,6 @@ func IsHeadlessWorkspace(pod *corev1.Pod) bool { return ok && val == "true" } -func IsGhostWorkspace(pod *corev1.Pod) bool { - if !IsWorkspace(pod) { - return false - } - - val, ok := pod.ObjectMeta.Labels[TypeLabel] - return ok && val == "ghost" -} - func IsRegularWorkspace(pod *corev1.Pod) bool { if !IsWorkspace(pod) { return false @@ -146,11 +137,6 @@ func IsRegularWorkspace(pod *corev1.Pod) bool { return ok && val == "regular" } -func IsNonGhostWorkspace(pod *corev1.Pod) bool { - return IsWorkspace(pod) && - !IsGhostWorkspace(pod) -} - func GetWorkspaceType(pod *corev1.Pod) string { val, ok := pod.ObjectMeta.Labels[TypeLabel] if !ok { diff --git a/components/supervisor/cmd/ghost.go b/components/supervisor/cmd/ghost.go deleted file mode 100644 index 95b7854827b3a2..00000000000000 --- a/components/supervisor/cmd/ghost.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2020 Gitpod GmbH. All rights reserved. -// Licensed under the GNU Affero General Public License (AGPL). -// See License-AGPL.txt in the project root for license information. - -package cmd - -import ( - "os" - "os/signal" - "syscall" - - "github.com/spf13/cobra" - - "github.com/gitpod-io/gitpod/common-go/log" -) - -var ghostCmd = &cobra.Command{ - Use: "ghost", - Short: "starts the supervisor", - - Run: func(cmd *cobra.Command, args []string) { - log.Init(ServiceName, Version, true, false) - log.Info("running as ghost - waiting for SIGTERM") - - sigChan := make(chan os.Signal, 1) - signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM) - <-sigChan - - log.Info("SIGTERM received, quitting.") - }, -} - -func init() { - rootCmd.AddCommand(ghostCmd) -} diff --git a/components/ws-manager-api/core.proto b/components/ws-manager-api/core.proto index 94fd8b019a8f1e..362cb609a2f46a 100644 --- a/components/ws-manager-api/core.proto +++ b/components/ws-manager-api/core.proto @@ -562,9 +562,8 @@ enum WorkspaceType { // interact with users directly. PROBE = 2; - // Ghost workspaces are placeholders that pre-scale a cluster for faster workspace startup. They request the same amount of resources - // as a regular workspace, but run no actual load. They're removed at will to make space for an actual workspace. - GHOST = 3; + // DEPRECATED Ghost workspaces + reserved 3; // Imagebuild workspaces build a workspace, incl. their Gitpod layer. They run headless and have no direct user-interaction. IMAGEBUILD = 4; diff --git a/components/ws-manager-api/go/config/config.go b/components/ws-manager-api/go/config/config.go index 6886f54fc176b8..07ed440d839d94 100644 --- a/components/ws-manager-api/go/config/config.go +++ b/components/ws-manager-api/go/config/config.go @@ -158,8 +158,6 @@ type WorkspacePodTemplateConfiguration struct { PrebuildPath string `json:"prebuildPath,omitempty"` // ProbePath is a path to an additional workspace pod template YAML file for probe workspaces ProbePath string `json:"probePath,omitempty"` - // GhostPath is a path to an additional workspace pod template YAML file for ghost workspaces - GhostPath string `json:"ghostPath,omitempty"` // ImagebuildPath is a path to an additional workspace pod template YAML file for imagebuild workspaces ImagebuildPath string `json:"imagebuildPath,omitempty"` } @@ -206,7 +204,6 @@ func (c *Configuration) Validate() error { validation.Field(&c.WorkspacePodTemplate.DefaultPath, validPodTemplate), validation.Field(&c.WorkspacePodTemplate.PrebuildPath, validPodTemplate), validation.Field(&c.WorkspacePodTemplate.ProbePath, validPodTemplate), - validation.Field(&c.WorkspacePodTemplate.GhostPath, validPodTemplate), validation.Field(&c.WorkspacePodTemplate.RegularPath, validPodTemplate), ) if err != nil { diff --git a/components/ws-manager-api/go/core.pb.go b/components/ws-manager-api/go/core.pb.go index bf4897259e5e76..91f2419a8ca298 100644 --- a/components/ws-manager-api/go/core.pb.go +++ b/components/ws-manager-api/go/core.pb.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Gitpod GmbH. All rights reserved. +// Copyright (c) 2022 Gitpod GmbH. All rights reserved. // Licensed under the GNU Affero General Public License (AGPL). // See License-AGPL.txt in the project root for license information. @@ -371,9 +371,6 @@ const ( // Probe workspaces are used to perform end-to-end health checks on the system. They require little to no resources, run headless and never // interact with users directly. WorkspaceType_PROBE WorkspaceType = 2 - // Ghost workspaces are placeholders that pre-scale a cluster for faster workspace startup. They request the same amount of resources - // as a regular workspace, but run no actual load. They're removed at will to make space for an actual workspace. - WorkspaceType_GHOST WorkspaceType = 3 // Imagebuild workspaces build a workspace, incl. their Gitpod layer. They run headless and have no direct user-interaction. WorkspaceType_IMAGEBUILD WorkspaceType = 4 ) @@ -384,14 +381,12 @@ var ( 0: "REGULAR", 1: "PREBUILD", 2: "PROBE", - 3: "GHOST", 4: "IMAGEBUILD", } WorkspaceType_value = map[string]int32{ "REGULAR": 0, "PREBUILD": 1, "PROBE": 2, - "GHOST": 3, "IMAGEBUILD": 4, } ) @@ -3083,70 +3078,70 @@ var file_core_proto_rawDesc = []byte{ 0x50, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x05, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, - 0x08, 0x03, 0x10, 0x03, 0x22, 0x04, 0x08, 0x06, 0x10, 0x06, 0x2a, 0x50, 0x0a, 0x0d, 0x57, 0x6f, + 0x08, 0x03, 0x10, 0x03, 0x22, 0x04, 0x08, 0x06, 0x10, 0x06, 0x2a, 0x4b, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, - 0x02, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, - 0x49, 0x4d, 0x41, 0x47, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x04, 0x32, 0xe5, 0x06, 0x0a, - 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4f, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, + 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, + 0x04, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x32, 0xe5, 0x06, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, 0x73, 0x6d, + 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x73, 0x6d, + 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0d, 0x53, + 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, + 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x11, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x4c, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, - 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, - 0x0a, 0x11, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x77, 0x73, - 0x6d, 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x6d, - 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x17, 0x2e, 0x77, 0x73, 0x6d, 0x61, - 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x43, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x18, - 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, - 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, - 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, - 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, - 0x70, 0x6f, 0x64, 0x2f, 0x77, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x61, - 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x42, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x12, 0x17, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0a, 0x4d, + 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, + 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, + 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, + 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, + 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, + 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x77, + 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/components/ws-manager-api/typescript/src/core_pb.d.ts b/components/ws-manager-api/typescript/src/core_pb.d.ts index f8f324af9b766b..158d0504a6f02b 100644 --- a/components/ws-manager-api/typescript/src/core_pb.d.ts +++ b/components/ws-manager-api/typescript/src/core_pb.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 Gitpod GmbH. All rights reserved. + * Copyright (c) 2022 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License-AGPL.txt in the project root for license information. */ @@ -1039,6 +1039,5 @@ export enum WorkspaceType { REGULAR = 0, PREBUILD = 1, PROBE = 2, - GHOST = 3, IMAGEBUILD = 4, } diff --git a/components/ws-manager-api/typescript/src/core_pb.js b/components/ws-manager-api/typescript/src/core_pb.js index 2ff203145e5ec4..f1f10780a4159a 100644 --- a/components/ws-manager-api/typescript/src/core_pb.js +++ b/components/ws-manager-api/typescript/src/core_pb.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 Gitpod GmbH. All rights reserved. + * Copyright (c) 2022 Gitpod GmbH. All rights reserved. * Licensed under the GNU Affero General Public License (AGPL). * See License-AGPL.txt in the project root for license information. */ @@ -8001,7 +8001,6 @@ proto.wsman.WorkspaceType = { REGULAR: 0, PREBUILD: 1, PROBE: 2, - GHOST: 3, IMAGEBUILD: 4 }; diff --git a/components/ws-manager-bridge/src/bridge.ts b/components/ws-manager-bridge/src/bridge.ts index e3ade2936f101d..f0c0ad4fcecf03 100644 --- a/components/ws-manager-bridge/src/bridge.ts +++ b/components/ws-manager-bridge/src/bridge.ts @@ -7,7 +7,7 @@ import { inject, injectable, interfaces } from "inversify"; import { MessageBusIntegration } from "./messagebus-integration"; import { Disposable, WorkspaceInstance, Queue, WorkspaceInstancePort, PortVisibility, RunningWorkspaceInfo, DisposableCollection } from "@gitpod/gitpod-protocol"; -import { WorkspaceStatus, WorkspacePhase, GetWorkspacesRequest, WorkspaceConditionBool, PortVisibility as WsManPortVisibility, WorkspaceType, PromisifiedWorkspaceManagerClient } from "@gitpod/ws-manager/lib"; +import { WorkspaceStatus, WorkspacePhase, GetWorkspacesRequest, WorkspaceConditionBool, PortVisibility as WsManPortVisibility, PromisifiedWorkspaceManagerClient } from "@gitpod/ws-manager/lib"; import { WorkspaceDB } from "@gitpod/gitpod-db/lib/workspace-db"; import { UserDB } from "@gitpod/gitpod-db/lib/user-db"; import { log } from '@gitpod/gitpod-protocol/lib/util/logging'; @@ -135,9 +135,7 @@ export class WorkspaceManagerBridge implements Disposable { log.warn("Received invalid status update", status); return; } - if (status.spec.type === WorkspaceType.GHOST) { - return; - } + log.debug("Received status update", status); const span = TraceContext.startSpan("handleStatusUpdate", ctx); diff --git a/components/ws-manager/pkg/manager/create.go b/components/ws-manager/pkg/manager/create.go index 2b3a1460d76f37..4736e64149cdf9 100644 --- a/components/ws-manager/pkg/manager/create.go +++ b/components/ws-manager/pkg/manager/create.go @@ -53,8 +53,6 @@ func (m *Manager) createWorkspacePod(startContext *startWorkspaceContext) (*core typeSpecificTpl, err = config.GetWorkspacePodTemplate(m.Config.WorkspacePodTemplate.PrebuildPath) case api.WorkspaceType_PROBE: typeSpecificTpl, err = config.GetWorkspacePodTemplate(m.Config.WorkspacePodTemplate.ProbePath) - case api.WorkspaceType_GHOST: - typeSpecificTpl, err = config.GetWorkspacePodTemplate(m.Config.WorkspacePodTemplate.GhostPath) case api.WorkspaceType_IMAGEBUILD: typeSpecificTpl, err = config.GetWorkspacePodTemplate(m.Config.WorkspacePodTemplate.ImagebuildPath) } @@ -278,8 +276,6 @@ func (m *Manager) createDefiniteWorkspacePod(startContext *startWorkspaceContext prefix = "prebuild" case api.WorkspaceType_PROBE: prefix = "probe" - case api.WorkspaceType_GHOST: - prefix = "ghost" case api.WorkspaceType_IMAGEBUILD: prefix = "imagebuild" // mount self-signed gitpod CA certificate to ensure @@ -538,11 +534,6 @@ func (m *Manager) createWorkspaceContainer(startContext *startWorkspaceContext) } ) - if startContext.Request.Type == api.WorkspaceType_GHOST { - command = []string{"/.supervisor/supervisor", "ghost"} - readinessProbe = nil - } - image := fmt.Sprintf("%s/%s/%s", m.Config.RegistryFacadeHost, regapi.ProviderPrefixRemote, startContext.Request.Id) return &corev1.Container{ diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index 25af3e5cf1ec03..c2e0ee9ba59c56 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -795,7 +795,7 @@ func shouldDisableRemoteStorage(pod *corev1.Pod) bool { tpe = api.WorkspaceType_REGULAR } switch tpe { - case api.WorkspaceType_GHOST, api.WorkspaceType_IMAGEBUILD: + case api.WorkspaceType_IMAGEBUILD: return true default: return false diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_ghost.golden b/components/ws-manager/pkg/manager/testdata/cdwp_ghost.golden deleted file mode 100644 index 4782a9a6d77c76..00000000000000 --- a/components/ws-manager/pkg/manager/testdata/cdwp_ghost.golden +++ /dev/null @@ -1,245 +0,0 @@ -{ - "reason": { - "metadata": { - "name": "ghost-foobar", - "namespace": "default", - "creationTimestamp": null, - "labels": { - "app": "gitpod", - "component": "workspace", - "gitpod.io/networkpolicy": "default", - "gpwsman": "true", - "headless": "true", - "metaID": "foobar", - "owner": "tester", - "workspaceID": "foobar", - "workspaceType": "ghost" - }, - "annotations": { - "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", - "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", - "gitpod.io/requiredNodeServices": "ws-daemon,registry-facade", - "gitpod/admission": "admit_owner_only", - "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", - "gitpod/id": "foobar", - "gitpod/imageSpec": "CrwBZXUuZ2NyLmlvL2dpdHBvZC1kZXYvd29ya3NwYWNlLWltYWdlcy9hYzFjMDc1NTAwNzk2NmU0ZDZlMDkwZWE4MjE3MjlhYzc0N2QyMmFjL2V1Lmdjci5pby9naXRwb2QtZGV2L3dvcmtzcGFjZS1iYXNlLWltYWdlcy9naXRodWIuY29tL3R5cGVmb3gvZ2l0cG9kOjgwYTdkNDI3YTFmY2QzNDZkNDIwNjAzZDgwYTMxZDU3Y2Y3NWE3YWYSNGV1Lmdjci5pby9naXRwb2QtY29yZS1kZXYvYnVpZC90aGVpYS1pZGU6c29tZXZlcnNpb24=", - "gitpod/never-ready": "true", - "gitpod/ownerToken": "%7J'[Of/8NDiWE+9F,I6^Jcj_1\u0026}-F8p", - "gitpod/servicePrefix": "foobarservice", - "gitpod/traceid": "", - "gitpod/url": "foobar-foobarservice-gitpod.io", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "23000", - "prometheus.io/scrape": "true", - "seccomp.security.alpha.kubernetes.io/pod": "localhost/workspace-default" - }, - "finalizers": [ - "gitpod.io/finalizer" - ] - }, - "spec": { - "volumes": [ - { - "name": "vol-this-workspace", - "hostPath": { - "path": "/tmp/workspaces/foobar", - "type": "DirectoryOrCreate" - } - }, - { - "name": "daemon-mount", - "hostPath": { - "path": "/tmp/workspaces/foobar-daemon", - "type": "DirectoryOrCreate" - } - } - ], - "containers": [ - { - "name": "workspace", - "image": "registry-facade:8080/remote/foobar", - "command": [ - "/.supervisor/supervisor", - "ghost" - ], - "ports": [ - { - "containerPort": 23000 - } - ], - "env": [ - { - "name": "GITPOD_REPO_ROOT", - "value": "/workspace" - }, - { - "name": "GITPOD_CLI_APITOKEN", - "value": "Ab=5=rRA*9:C'T{;RRB\u003e]vK2p6`fFfrS" - }, - { - "name": "GITPOD_WORKSPACE_ID", - "value": "foobar" - }, - { - "name": "GITPOD_INSTANCE_ID", - "value": "foobar" - }, - { - "name": "GITPOD_THEIA_PORT", - "value": "23000" - }, - { - "name": "THEIA_WORKSPACE_ROOT", - "value": "/workspace" - }, - { - "name": "GITPOD_HOST", - "value": "gitpod.io" - }, - { - "name": "GITPOD_WORKSPACE_URL", - "value": "foobar-foobarservice-gitpod.io" - }, - { - "name": "THEIA_SUPERVISOR_ENDPOINT", - "value": ":22999" - }, - { - "name": "THEIA_WEBVIEW_EXTERNAL_ENDPOINT", - "value": "webview-{{hostname}}" - }, - { - "name": "THEIA_MINI_BROWSER_HOST_PATTERN", - "value": "browser-{{hostname}}" - }, - { - "name": "GITPOD_GIT_USER_NAME", - "value": "usernameGoesHere" - }, - { - "name": "GITPOD_GIT_USER_EMAIL", - "value": "some@user.com" - }, - { - "name": "foo", - "value": "bar" - }, - { - "name": "GITPOD_INTERVAL", - "value": "30000" - }, - { - "name": "GITPOD_MEMORY", - "value": "999" - }, - { - "name": "GITPOD_HEADLESS", - "value": "true" - } - ], - "resources": { - "limits": { - "cpu": "900m", - "memory": "1G" - }, - "requests": { - "cpu": "899m", - "ephemeral-storage": "5Gi", - "memory": "999M" - } - }, - "volumeMounts": [ - { - "name": "vol-this-workspace", - "mountPath": "/workspace", - "mountPropagation": "HostToContainer" - }, - { - "name": "daemon-mount", - "mountPath": "/.workspace", - "mountPropagation": "HostToContainer" - } - ], - "terminationMessagePolicy": "File", - "imagePullPolicy": "IfNotPresent", - "securityContext": { - "capabilities": { - "add": [ - "AUDIT_WRITE", - "FSETID", - "KILL", - "NET_BIND_SERVICE", - "SYS_PTRACE" - ], - "drop": [ - "SETPCAP", - "CHOWN", - "NET_RAW", - "DAC_OVERRIDE", - "FOWNER", - "SYS_CHROOT", - "SETFCAP", - "SETUID", - "SETGID" - ] - }, - "privileged": false, - "runAsUser": 33333, - "runAsGroup": 33333, - "runAsNonRoot": true, - "readOnlyRootFilesystem": false, - "allowPrivilegeEscalation": true - } - } - ], - "restartPolicy": "Never", - "serviceAccountName": "workspace", - "automountServiceAccountToken": false, - "hostname": "foobar", - "affinity": { - "nodeAffinity": { - "requiredDuringSchedulingIgnoredDuringExecution": { - "nodeSelectorTerms": [ - { - "matchExpressions": [ - { - "key": "gitpod.io/workload_workspace_headless", - "operator": "Exists" - }, - { - "key": "gitpod.io/ws-daemon_ready_ns_default", - "operator": "Exists" - }, - { - "key": "gitpod.io/registry-facade_ready_ns_default", - "operator": "Exists" - } - ] - } - ] - } - } - }, - "tolerations": [ - { - "key": "node.kubernetes.io/disk-pressure", - "operator": "Exists", - "effect": "NoExecute" - }, - { - "key": "node.kubernetes.io/memory-pressure", - "operator": "Exists", - "effect": "NoExecute" - }, - { - "key": "node.kubernetes.io/network-unavailable", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 30 - } - ], - "enableServiceLinks": false - }, - "status": {} - } -} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_ghost.json b/components/ws-manager/pkg/manager/testdata/cdwp_ghost.json deleted file mode 100644 index 6aca87bda7802c..00000000000000 --- a/components/ws-manager/pkg/manager/testdata/cdwp_ghost.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "request": { - "id": "foobar", - "type": 3, - "metadata": { - "owner": "tester", - "metaId": "foobar" - }, - "servicePrefix": "foobarservice", - "spec": { - "ideImage": { - "webRef": "eu.gcr.io/gitpod-core-dev/buid/theia-ide:someversion" - }, - "workspaceImage": "eu.gcr.io/gitpod-dev/workspace-images/ac1c0755007966e4d6e090ea821729ac747d22ac/eu.gcr.io/gitpod-dev/workspace-base-images/github.com/typefox/gitpod:80a7d427a1fcd346d420603d80a31d57cf75a7af", - "initializer": { - "snapshot": { - "snapshot": "workspaces/cryptic-id-goes-herg/fd62804b-4cab-11e9-843a-4e645373048e.tar@gitpod-dev-user-christesting" - } - }, - "ports": [ - { - "port": 8080 - } - ], - "envvars": [ - { - "name": "foo", - "value": "bar" - } - ], - "git": { - "username": "usernameGoesHere", - "email": "some@user.com" - } - } - } -} \ No newline at end of file diff --git a/install/installer/pkg/components/ws-manager/configmap.go b/install/installer/pkg/components/ws-manager/configmap.go index 48fd06b2564f40..beb0ca6a6188c3 100644 --- a/install/installer/pkg/components/ws-manager/configmap.go +++ b/install/installer/pkg/components/ws-manager/configmap.go @@ -165,7 +165,6 @@ func buildWorkspaceTemplates(ctx *common.RenderContext) (config.WorkspacePodTemp Tpl *corev1.Pod }{ {Name: "default", Path: &cfg.DefaultPath, Tpl: cfgTpls.Default}, - {Name: "ghost", Path: &cfg.GhostPath, Tpl: cfgTpls.Ghost}, {Name: "imagebuild", Path: &cfg.ImagebuildPath, Tpl: cfgTpls.ImageBuild}, {Name: "prebuild", Path: &cfg.PrebuildPath, Tpl: cfgTpls.Prebuild}, {Name: "regular", Path: &cfg.RegularPath, Tpl: cfgTpls.Regular}, diff --git a/install/installer/pkg/components/ws-manager/configmap_test.go b/install/installer/pkg/components/ws-manager/configmap_test.go index dd386633540bd2..f1007163de3c19 100644 --- a/install/installer/pkg/components/ws-manager/configmap_test.go +++ b/install/installer/pkg/components/ws-manager/configmap_test.go @@ -75,20 +75,6 @@ func TestBuildWorkspaceTemplates(t *testing.T) { }, }, }, - { - Name: "ghost tpl", - Config: &configv1.WorkspaceTemplates{ - Ghost: &corev1.Pod{}, - }, - Expectation: Expectation{ - TplConfig: wsmancfg.WorkspacePodTemplateConfiguration{ - GhostPath: "/workspace-templates/ghost.yaml", - }, - Data: map[string]bool{ - "ghost.yaml": true, - }, - }, - }, { Name: "imgbuild tpl", Config: &configv1.WorkspaceTemplates{ diff --git a/operations/observability/mixins/cross-teams/dashboards/gitpod-admin-workspace.libsonnet b/operations/observability/mixins/cross-teams/dashboards/gitpod-admin-workspace.libsonnet index 0ff2db8644acb5..85cd4c16942263 100644 --- a/operations/observability/mixins/cross-teams/dashboards/gitpod-admin-workspace.libsonnet +++ b/operations/observability/mixins/cross-teams/dashboards/gitpod-admin-workspace.libsonnet @@ -57,7 +57,7 @@ local workspaceTemplate = template.new( name='workspace', datasource='$datasource', - query='label_values(kube_pod_labels{%s=~"$cluster",component="workspace", label_workspace_type!="ghost"}, pod)' % _config.clusterLabel, + query='label_values(kube_pod_labels{%s=~"$cluster",component="workspace"}, pod)' % _config.clusterLabel, current='all', refresh=2, includeAll=false, diff --git a/operations/observability/mixins/cross-teams/dashboards/gitpod-overview.libsonnet b/operations/observability/mixins/cross-teams/dashboards/gitpod-overview.libsonnet index 676ce1e3361ca0..71611b0d21ef5a 100644 --- a/operations/observability/mixins/cross-teams/dashboards/gitpod-overview.libsonnet +++ b/operations/observability/mixins/cross-teams/dashboards/gitpod-overview.libsonnet @@ -58,7 +58,6 @@ local runningWorkspacesGraph = .addSeriesOverride({ alias: 'REGULAR', color: '#73BF69' }) .addSeriesOverride({ alias: 'PREBUILD', color: '#5794F2' }) .addSeriesOverride({ alias: 'PROBE', color: '#B877D9' }) - .addSeriesOverride({ alias: 'GHOST', color: '#ffffff' }) .addSeriesOverride({ alias: 'Regular Not Active', color: '#FADE2A' }) ; @@ -126,7 +125,6 @@ local workspaceFailuresGraph = .addSeriesOverride({ alias: 'REGULAR', color: '#73BF69' }) .addSeriesOverride({ alias: 'PREBUILD', color: '#5794F2' }) .addSeriesOverride({ alias: 'PROBE', color: '#B877D9' }) - .addSeriesOverride({ alias: 'GHOST', color: '#ffffff' }) ; local workspacePhasesGraph = @@ -141,12 +139,6 @@ local workspacePhasesGraph = repeat='cluster', ) .addTarget(prometheus.target('gitpod_ws_manager_workspace_phase_total{%(clusterLabel)s=~"$cluster", phase!="RUNNING"}' % _config, legendFormat='{{type}} - {{phase}}')) - // Ghosts use different levels of white/grey - .addSeriesOverride({ alias: 'GHOST - INITIALIZING', color: '#ffffff' }) - .addSeriesOverride({ alias: 'GHOST - CREATING', color: '#cccccc' }) - .addSeriesOverride({ alias: 'GHOST - PENDING', color: '#999999' }) - .addSeriesOverride({ alias: 'GHOST - STOPPING', color: '#666666' }) - .addSeriesOverride({ alias: 'GHOST - STOPPED', color: '#333333' }) // Regular use different levels of green .addSeriesOverride({ alias: 'REGULAR - INITIALIZING', color: '#C8F2C2' }) .addSeriesOverride({ alias: 'REGULAR - CREATING', color: '#96D98D' }) diff --git a/operations/observability/mixins/workspace/dashboards/components/ws-manager.json b/operations/observability/mixins/workspace/dashboards/components/ws-manager.json index ce31ca56b5d16f..5009d42bb75beb 100644 --- a/operations/observability/mixins/workspace/dashboards/components/ws-manager.json +++ b/operations/observability/mixins/workspace/dashboards/components/ws-manager.json @@ -651,135 +651,6 @@ "align": false, "alignLevel": null } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "description": "Avg is shown here, just so we know that we are configuring our buckets right.\n\nMore info about how avg can help us with bucket configuration can be seen at Tom Wilkie's RED Method talk.", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 8, - "x": 16, - "y": 12 - }, - "hiddenSeries": false, - "id": 53, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "How avg help us configure representative Prometheus histogram buckets", - "url": "https://youtu.be/zk77VS98Em8?t=908" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "repeatDirection": "h", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, \n sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_bucket{cluster=~\"$cluster\", type=\"GHOST\"}[1m])\n ) by (cluster, type, le)\n)", - "interval": "", - "legendFormat": "{{cluster}} - {{type}} - 99th Percentile", - "queryType": "randomWalk", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, \n sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_bucket{cluster=~\"$cluster\", type=\"GHOST\"}[1m])\n ) by (cluster, type, le)\n)", - "interval": "", - "legendFormat": "{{cluster}} - {{type}} - 95th Percentile", - "queryType": "randomWalk", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.50, \n sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_bucket{cluster=~\"$cluster\", type=\"GHOST\"}[1m])\n ) by (cluster, type, le)\n)", - "interval": "", - "legendFormat": "{{cluster}} - {{type}} - 50th Percentile", - "queryType": "randomWalk", - "refId": "C" - }, - { - "expr": " sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_sum{cluster=~\"$cluster\",type=\"GHOST\"}[1m])\n ) by (cluster)\n /\n sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_count{cluster=~\"$cluster\",type=\"GHOST\"}[1m])\n ) by (cluster)", - "hide": false, - "interval": "", - "legendFormat": "{{cluster}} - avg", - "queryType": "randomWalk", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Ghost workspace startup time", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "reqps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } } ], "title": "ws-manager Metrics", diff --git a/operations/observability/mixins/workspace/dashboards/success-criteria.json b/operations/observability/mixins/workspace/dashboards/success-criteria.json index 853736c6c9fd1d..f5eb60037a3dba 100644 --- a/operations/observability/mixins/workspace/dashboards/success-criteria.json +++ b/operations/observability/mixins/workspace/dashboards/success-criteria.json @@ -108,7 +108,7 @@ "uid": "${datasource}" }, "exemplar": false, - "expr": "1-((\n (\n sum(rate(gitpod_ws_manager_workspace_stops_total{reason=\"failed\",type!~\"GHOST|PREBUILD\"}[1d])) OR on() vector(0)\n /\n sum(rate(gitpod_ws_manager_workspace_stops_total{type!~\"GHOST|PREBUILD\"}[1d]))\n )\n) + (\n (\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\",grpc_code!~\"OK|ResourceExhausted\"}[1d])) OR on() vector(0)\n /\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\"}[1d]))\n )\n))", + "expr": "1-((\n (\n sum(rate(gitpod_ws_manager_workspace_stops_total{reason=\"failed\",type!~\"PREBUILD\"}[1d])) OR on() vector(0)\n /\n sum(rate(gitpod_ws_manager_workspace_stops_total{type!~\"PREBUILD\"}[1d]))\n )\n) + (\n (\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\",grpc_code!~\"OK|ResourceExhausted\"}[1d])) OR on() vector(0)\n /\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\"}[1d]))\n )\n))", "instant": false, "interval": "", "legendFormat": "Success Rate", @@ -199,7 +199,7 @@ "uid": "${datasource}" }, "exemplar": true, - "expr": "histogram_quantile(\n 0.95, \n sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_bucket{type!=\"GHOST\",type!=\"PREBUILD\"}[1d])\n ) by (le, cluster)\n )", + "expr": "histogram_quantile(\n 0.95, \n sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_bucket{type!=\"PREBUILD\"}[1d])\n ) by (le, cluster)\n )", "interval": "", "legendFormat": "{{cluster}}", "refId": "A" diff --git a/operations/observability/mixins/workspace/rules/SLO/workspacefailure/rules.libsonnet b/operations/observability/mixins/workspace/rules/SLO/workspacefailure/rules.libsonnet index fcfb70d038757f..e2f0fcf8cad3bd 100644 --- a/operations/observability/mixins/workspace/rules/SLO/workspacefailure/rules.libsonnet +++ b/operations/observability/mixins/workspace/rules/SLO/workspacefailure/rules.libsonnet @@ -14,9 +14,9 @@ expr: ||| ( ( - sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"GHOST|PREBUILD"}[5m])) + sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"PREBUILD"}[5m])) / - sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"GHOST|PREBUILD"}[5m])) + sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"PREBUILD"}[5m])) ) ) + ( ( @@ -32,9 +32,9 @@ expr: ||| ( ( - sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"GHOST|PREBUILD"}[30m])) + sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"PREBUILD"}[30m])) / - sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"GHOST|PREBUILD"}[30m])) + sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"PREBUILD"}[30m])) ) ) + ( ( @@ -50,9 +50,9 @@ expr: ||| ( ( - sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"GHOST|PREBUILD"}[1h])) + sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"PREBUILD"}[1h])) / - sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"GHOST|PREBUILD"}[1h])) + sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"PREBUILD"}[1h])) ) ) + ( ( @@ -68,9 +68,9 @@ expr: ||| ( ( - sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"GHOST|PREBUILD"}[2h])) + sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"PREBUILD"}[2h])) / - sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"GHOST|PREBUILD"}[2h])) + sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"PREBUILD"}[2h])) ) ) + ( ( @@ -86,9 +86,9 @@ expr: ||| ( ( - sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"GHOST|PREBUILD"}[6h])) + sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"PREBUILD"}[6h])) / - sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"GHOST|PREBUILD"}[6h])) + sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"PREBUILD"}[6h])) ) ) + ( ( @@ -104,9 +104,9 @@ expr: ||| ( ( - sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"GHOST|PREBUILD"}[1d])) + sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"PREBUILD"}[1d])) / - sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"GHOST|PREBUILD"}[1d])) + sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"PREBUILD"}[1d])) ) ) + ( ( @@ -122,9 +122,9 @@ expr: ||| ( ( - sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"GHOST|PREBUILD"}[3d])) + sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"PREBUILD"}[3d])) / - sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"GHOST|PREBUILD"}[3d])) + sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"PREBUILD"}[3d])) ) ) + ( ( @@ -140,9 +140,9 @@ expr: ||| ( ( - sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"GHOST|PREBUILD"}[30d])) + sum(rate(gitpod_ws_manager_workspace_stops_total{reason="failed",type!~"PREBUILD"}[30d])) / - sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"GHOST|PREBUILD"}[30d])) + sum(rate(gitpod_ws_manager_workspace_stops_total{type!~"PREBUILD"}[30d])) ) ) + ( ( diff --git a/test/tests/workspace/ghost_test.go b/test/tests/workspace/ghost_test.go deleted file mode 100644 index 788e767328dbc0..00000000000000 --- a/test/tests/workspace/ghost_test.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2020 Gitpod GmbH. All rights reserved. -// Licensed under the GNU Affero General Public License (AGPL). -// See License-AGPL.txt in the project root for license information. - -package workspace - -import ( - "context" - "testing" - "time" - - "sigs.k8s.io/e2e-framework/pkg/envconf" - "sigs.k8s.io/e2e-framework/pkg/features" - - "github.com/gitpod-io/gitpod/test/pkg/integration" - wsmanapi "github.com/gitpod-io/gitpod/ws-manager/api" -) - -func TestGhostWorkspace(t *testing.T) { - f := features.New("ghost"). - WithLabel("component", "ws-manager"). - Assess("it can start a ghost workspace", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context { - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) - defer cancel() - - api := integration.NewComponentAPI(ctx, cfg.Namespace(), kubeconfig, cfg.Client()) - t.Cleanup(func() { - api.Done(t) - }) - - // there's nothing specific about ghost that we want to test beyond that they start properly - ws, err := integration.LaunchWorkspaceDirectly(ctx, api, integration.WithRequestModifier(func(req *wsmanapi.StartWorkspaceRequest) error { - req.Type = wsmanapi.WorkspaceType_GHOST - req.Spec.Envvars = append(req.Spec.Envvars, &wsmanapi.EnvironmentVariable{ - Name: "GITPOD_TASKS", - Value: `[{ "init": "echo \"some output\" > someFile; sleep 20; exit 0;" }]`, - }) - return nil - })) - if err != nil { - t.Fatal(err) - } - - _, err = integration.WaitForWorkspaceStart(ctx, ws.Req.Id, api) - if err != nil { - t.Fatal(err) - } - - err = integration.DeleteWorkspace(ctx, api, ws.Req.Id) - if err != nil { - t.Fatal(err) - } - return ctx - }). - Feature() - - testEnv.Test(t, f) -}