diff --git a/install/installer/pkg/components/server/configmap.go b/install/installer/pkg/components/server/configmap.go index db0d8054f012f2..c960fb63c36d2a 100644 --- a/install/installer/pkg/components/server/configmap.go +++ b/install/installer/pkg/components/server/configmap.go @@ -8,6 +8,7 @@ import ( "fmt" "net" "strconv" + "strings" "github.com/gitpod-io/gitpod/installer/pkg/common" "github.com/gitpod-io/gitpod/installer/pkg/components/usage" @@ -137,7 +138,10 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { workspaceClasses := []WorkspaceClass{ { Id: config.DefaultWorkspaceClass, - DisplayName: config.DefaultWorkspaceClass, + Category: GeneralPurpose, + DisplayName: strings.Title(config.DefaultWorkspaceClass), + Description: "Default workspace class", + PowerUps: 1, IsDefault: true, Deprecated: false, }, @@ -148,7 +152,10 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { for _, cl := range cfg.WebApp.WorkspaceClasses { class := WorkspaceClass{ Id: cl.Id, + Category: WorkspaceClassCategory(cl.Category), DisplayName: cl.DisplayName, + Description: cl.Description, + PowerUps: cl.PowerUps, IsDefault: cl.IsDefault, Deprecated: cl.Deprecated, Marker: cl.Marker, diff --git a/install/installer/pkg/components/server/types.go b/install/installer/pkg/components/server/types.go index b5612c96347ccb..ee634a99714ae0 100644 --- a/install/installer/pkg/components/server/types.go +++ b/install/installer/pkg/components/server/types.go @@ -129,11 +129,14 @@ type WorkspaceDefaults struct { } type WorkspaceClass struct { - Id string `json:"id"` - DisplayName string `json:"displayName"` - IsDefault bool `json:"isDefault"` - Deprecated bool `json:"deprecated"` - Marker map[string]bool `json:"marker,omitempty"` + Id string `json:"id"` + Category WorkspaceClassCategory `json:"category"` + DisplayName string `json:"displayName"` + Description string `json:"description"` + PowerUps uint32 `json:"powerups"` + IsDefault bool `json:"isDefault"` + Deprecated bool `json:"deprecated"` + Marker map[string]bool `json:"marker,omitempty"` } type NamedWorkspaceFeatureFlag string @@ -142,3 +145,9 @@ const ( NamedWorkspaceFeatureFlagFullWorkspaceBackup NamedWorkspaceFeatureFlag = "full_workspace_backup" NamedWorkspaceFeatureFlagFixedResources NamedWorkspaceFeatureFlag = "fixed_resources" ) + +type WorkspaceClassCategory string + +const ( + GeneralPurpose WorkspaceClassCategory = "GENERAL PURPOSE" +) diff --git a/install/installer/pkg/config/v1/experimental/experimental.go b/install/installer/pkg/config/v1/experimental/experimental.go index ac6c3e25055c9f..864a3d78768e55 100644 --- a/install/installer/pkg/config/v1/experimental/experimental.go +++ b/install/installer/pkg/config/v1/experimental/experimental.go @@ -209,7 +209,10 @@ type UsageConfig struct { type WebAppWorkspaceClass struct { Id string `json:"id"` + Category string `json:"category"` DisplayName string `json:"displayName"` + Description string `json:"description"` + PowerUps uint32 `json:"powerups"` IsDefault bool `json:"isDefault"` Deprecated bool `json:"deprecated"` Marker map[string]bool `json:"marker,omitempty"`