From 7dd8bf6344a0ee85453d27985710b7aad44cd5c8 Mon Sep 17 00:00:00 2001 From: Thomas Schubart Date: Thu, 21 Jul 2022 10:25:51 +0000 Subject: [PATCH] [ws-daemon/manager] Use feature flag --- components/common-go/kubernetes/kubernetes.go | 4 +- .../ee/agent-smith/pkg/agent/actions.go | 3 +- components/gitpod-protocol/src/protocol.ts | 1 + .../server/src/workspace/workspace-starter.ts | 18 +- components/ws-daemon/pkg/cpulimit/cpulimit.go | 50 ++++- components/ws-daemon/pkg/cpulimit/dispatch.go | 6 +- .../ws-daemon/pkg/cpulimit/limiter_test.go | 19 +- components/ws-manager-api/core.proto | 3 + components/ws-manager-api/go/core.pb.go | 178 +++++++++--------- .../typescript/src/core_pb.d.ts | 1 + .../ws-manager-api/typescript/src/core_pb.js | 3 +- components/ws-manager/pkg/manager/create.go | 22 +-- .../manager/testdata/cdwp_admission.golden | 2 - .../pkg/manager/testdata/cdwp_affinity.golden | 2 - .../pkg/manager/testdata/cdwp_class.golden | 2 - .../testdata/cdwp_class_notfound.golden | 2 - .../manager/testdata/cdwp_customcerts.golden | 2 - .../testdata/cdwp_debug_workspace_pod.golden | 2 - .../testdata/cdwp_empty_resource_req.golden | 2 - .../pkg/manager/testdata/cdwp_envvars.golden | 2 - .../testdata/cdwp_fullworkspacebackup.golden | 2 - .../manager/testdata/cdwp_imagebuild.golden | 2 - .../testdata/cdwp_imagebuild_template.golden | 2 - .../pkg/manager/testdata/cdwp_prebuild.golden | 2 - .../testdata/cdwp_prebuild_template.golden | 2 - ...rebuild_template_override_resources.golden | 2 - .../pkg/manager/testdata/cdwp_probe.golden | 2 - .../testdata/cdwp_readinessprobe.golden | 2 - .../pkg/manager/testdata/cdwp_secrets.golden | 2 - .../pkg/manager/testdata/cdwp_sshkeys.golden | 2 - .../pkg/manager/testdata/cdwp_tasks.golden | 2 - .../pkg/manager/testdata/cdwp_template.golden | 2 - .../pkg/manager/testdata/cdwp_timeout.golden | 2 - .../pkg/manager/testdata/cdwp_userns.golden | 2 - .../testdata/cdwp_withaffinity_regular.golden | 2 - .../testdata/cdwp_withaffinityheadless.golden | 2 - .../pkg/manager/testdata/cpwp_no_pvc.json | 2 +- .../pkg/components/ws-daemon/configmap.go | 2 + .../config/v1/experimental/experimental.go | 2 + 39 files changed, 187 insertions(+), 175 deletions(-) diff --git a/components/common-go/kubernetes/kubernetes.go b/components/common-go/kubernetes/kubernetes.go index bd2deb5f13f1bc..20c6c41db9058b 100644 --- a/components/common-go/kubernetes/kubernetes.go +++ b/components/common-go/kubernetes/kubernetes.go @@ -65,8 +65,8 @@ const ( // WorkspaceSSHPublicKeys contains all authorized ssh public keys that can be connected to the workspace WorkspaceSSHPublicKeys = "gitpod.io/sshPublicKeys" - // workspaceCpuLimit denotes the cpu limit of a workspace - WorkspaceCpuLimitAnnotation = "gitpod.io/cpuLimit" + // workspaceCpuMinLimitAnnotation denotes the minimum cpu limit of a workspace i.e. the minimum amount of resources it is guaranteed to get + WorkspaceCpuMinLimitAnnotation = "gitpod.io/cpuMinLimit" // workspaceCpuBurstLimit denotes the cpu burst limit of a workspace WorkspaceCpuBurstLimitAnnotation = "gitpod.io/cpuBurstLimit" diff --git a/components/ee/agent-smith/pkg/agent/actions.go b/components/ee/agent-smith/pkg/agent/actions.go index 5d5dd4c3ec4ad5..5f3a19038d8486 100644 --- a/components/ee/agent-smith/pkg/agent/actions.go +++ b/components/ee/agent-smith/pkg/agent/actions.go @@ -70,7 +70,8 @@ func (agent *Smith) limitCPUUse(podname string) error { return err } - pod.Annotations[wsk8s.WorkspaceCpuLimitAnnotation] = agent.Config.Enforcement.CPULimitPenalty + pod.Annotations[wsk8s.WorkspaceCpuMinLimitAnnotation] = agent.Config.Enforcement.CPULimitPenalty + pod.Annotations[wsk8s.WorkspaceCpuBurstLimitAnnotation] = agent.Config.Enforcement.CPULimitPenalty _, err = pods.Update(ctx, pod, corev1.UpdateOptions{}) if err != nil { return err diff --git a/components/gitpod-protocol/src/protocol.ts b/components/gitpod-protocol/src/protocol.ts index adf06081d1709e..0a16c6f23ee008 100644 --- a/components/gitpod-protocol/src/protocol.ts +++ b/components/gitpod-protocol/src/protocol.ts @@ -273,6 +273,7 @@ export const WorkspaceFeatureFlags = { full_workspace_backup: undefined, persistent_volume_claim: undefined, protected_secrets: undefined, + workspace_class_limiting: undefined, }; export type NamedWorkspaceFeatureFlag = keyof typeof WorkspaceFeatureFlags; diff --git a/components/server/src/workspace/workspace-starter.ts b/components/server/src/workspace/workspace-starter.ts index ad29cca9c569fe..36e489f5784dad 100644 --- a/components/server/src/workspace/workspace-starter.ts +++ b/components/server/src/workspace/workspace-starter.ts @@ -761,14 +761,6 @@ export class WorkspaceStarter { featureFlags = featureFlags.concat(["persistent_volume_claim"]); } - if (!!featureFlags) { - // only set feature flags if there actually are any. Otherwise we waste the - // few bytes of JSON in the database for no good reason. - configuration.featureFlags = featureFlags; - } - - const usageAttributionId = await this.userService.getWorkspaceUsageAttributionId(user, workspace.projectId); - let workspaceClass = ""; let classesEnabled = await getExperimentsClientForBackend().getValueAsync("workspace_classes", false, { user: user, @@ -808,8 +800,18 @@ export class WorkspaceStarter { workspaceClass = workspaceClass + "-pvc"; } } + + featureFlags = featureFlags.concat(["workspace_class_limiting"]); } + if (!!featureFlags) { + // only set feature flags if there actually are any. Otherwise we waste the + // few bytes of JSON in the database for no good reason. + configuration.featureFlags = featureFlags; + } + + const usageAttributionId = await this.userService.getWorkspaceUsageAttributionId(user, workspace.projectId); + const now = new Date().toISOString(); const instance: WorkspaceInstance = { id: uuidv4(), diff --git a/components/ws-daemon/pkg/cpulimit/cpulimit.go b/components/ws-daemon/pkg/cpulimit/cpulimit.go index f33ad7622c8450..85994e1579513d 100644 --- a/components/ws-daemon/pkg/cpulimit/cpulimit.go +++ b/components/ws-daemon/pkg/cpulimit/cpulimit.go @@ -7,6 +7,7 @@ package cpulimit import ( "context" "sort" + "strings" "time" "github.com/gitpod-io/gitpod/common-go/log" @@ -179,7 +180,7 @@ func (d *Distributor) Tick(dt time.Duration) (DistributorDebug, error) { ws := d.History[id] limit, err := d.Limiter.Limit(ws) if err != nil { - log.Errorf("unable to apply min limit: %v", err) + log.WithError(err).Errorf("unable to apply min limit") continue } @@ -191,7 +192,7 @@ func (d *Distributor) Tick(dt time.Duration) (DistributorDebug, error) { if totalBandwidth < d.TotalBandwidth && ws.Throttled() { limit, err = d.BurstLimiter.Limit(ws) if err != nil { - log.Errorf("unable to apply burst limit: %v", err) + log.WithError(err).Errorf("unable to apply burst limit") continue } @@ -222,6 +223,12 @@ type ResourceLimiter interface { Limit(wsh *WorkspaceHistory) (Bandwidth, error) } +var _ ResourceLimiter = (*fixedLimiter)(nil) +var _ ResourceLimiter = (*annotationLimiter)(nil) +var _ ResourceLimiter = (*BucketLimiter)(nil) +var _ ResourceLimiter = (*ClampingBucketLimiter)(nil) +var _ ResourceLimiter = (*compositeLimiter)(nil) + // FixedLimiter returns a fixed limit func FixedLimiter(limit Bandwidth) ResourceLimiter { return fixedLimiter{limit} @@ -306,7 +313,7 @@ type ClampingBucketLimiter struct { } // Limit decides on a CPU use limit -func (bl *ClampingBucketLimiter) Limit(wsh *WorkspaceHistory) (newLimit Bandwidth) { +func (bl *ClampingBucketLimiter) Limit(wsh *WorkspaceHistory) (Bandwidth, error) { budgetSpent := wsh.Usage() if bl.lastBucketLock { @@ -315,25 +322,54 @@ func (bl *ClampingBucketLimiter) Limit(wsh *WorkspaceHistory) (newLimit Bandwidt } } if bl.lastBucketLock { - return bl.Buckets[len(bl.Buckets)-1].Limit + return bl.Buckets[len(bl.Buckets)-1].Limit, nil } for i, bkt := range bl.Buckets { if i+1 == len(bl.Buckets) { // We've reached the last bucket - budget doesn't matter anymore bl.lastBucketLock = true - return bkt.Limit + return bkt.Limit, nil } budgetSpent -= bkt.Budget if budgetSpent <= 0 { // BudgetSpent value is in this bucket, hence we have found our current bucket - return bkt.Limit + return bkt.Limit, nil } } // empty bucket list - return 0 + return 0, nil +} + +type compositeLimiter struct { + limiters []ResourceLimiter +} + +func CompositeLimiter(limiters ...ResourceLimiter) ResourceLimiter { + return &compositeLimiter{ + limiters: limiters, + } +} + +func (cl *compositeLimiter) Limit(wsh *WorkspaceHistory) (Bandwidth, error) { + var errs []error + for _, limiter := range cl.limiters { + limit, err := limiter.Limit(wsh) + if err != nil { + errs = append(errs, err) + continue + } + + return limit, nil + } + + allerr := make([]string, len(errs)) + for i, err := range errs { + allerr[i] = err.Error() + } + return 0, xerrors.Errorf("no limiter was able to provide a limit", strings.Join(allerr, ", ")) } type CFSController interface { diff --git a/components/ws-daemon/pkg/cpulimit/dispatch.go b/components/ws-daemon/pkg/cpulimit/dispatch.go index 0a7c07cb0ca1f3..3359e861efe9b2 100644 --- a/components/ws-daemon/pkg/cpulimit/dispatch.go +++ b/components/ws-daemon/pkg/cpulimit/dispatch.go @@ -29,6 +29,8 @@ import ( type Config struct { Enabled bool `json:"enabled"` TotalBandwidth resource.Quantity `json:"totalBandwidth"` + Limit resource.Quantity `json:"limit"` + BurstLimit resource.Quantity `json:"burstLimit"` ControlPeriod util.Duration `json:"controlPeriod"` CGroupBasePath string `json:"cgroupBasePath"` @@ -65,8 +67,8 @@ func NewDispatchListener(cfg *Config, prom prometheus.Registerer) *DispatchListe if cfg.Enabled { dist := NewDistributor(d.source, d.sink, - AnnotationLimiter(kubernetes.WorkspaceCpuLimitAnnotation), - AnnotationLimiter(kubernetes.WorkspaceCpuBurstLimitAnnotation), + CompositeLimiter(AnnotationLimiter(kubernetes.WorkspaceCpuMinLimitAnnotation), FixedLimiter(BandwidthFromQuantity(d.Config.Limit))), + CompositeLimiter(AnnotationLimiter(kubernetes.WorkspaceCpuBurstLimitAnnotation), FixedLimiter(BandwidthFromQuantity(d.Config.BurstLimit))), BandwidthFromQuantity(d.Config.TotalBandwidth), ) go dist.Run(context.Background(), time.Duration(d.Config.ControlPeriod)) diff --git a/components/ws-daemon/pkg/cpulimit/limiter_test.go b/components/ws-daemon/pkg/cpulimit/limiter_test.go index a493a4704e07ef..357120ce4913ba 100644 --- a/components/ws-daemon/pkg/cpulimit/limiter_test.go +++ b/components/ws-daemon/pkg/cpulimit/limiter_test.go @@ -37,15 +37,18 @@ func TestBucketLimiter(t *testing.T) { for _, test := range tests { t.Run(test.Desc, func(t *testing.T) { - //limiter := cpulimit.BucketLimiter(test.Buckets) - // ws := &cpulimit.WorkspaceHistory { - - // } + limiter := cpulimit.BucketLimiter(test.Buckets) + ws := &cpulimit.WorkspaceHistory{ + LastUpdate: &cpulimit.Workspace{ + Usage: test.BudgetSpent, + }, + UsageT0: 0, + } - // limit,_ := limiter.Limit(test.BudgetSpent) - // if limit != test.ExpectedLimit { - // t.Errorf("unexpected limit %d: expected %d", limit, test.ExpectedLimit) - // } + limit, _ := limiter.Limit(ws) + if limit != test.ExpectedLimit { + t.Errorf("unexpected limit %d: expected %d", limit, test.ExpectedLimit) + } }) } } diff --git a/components/ws-manager-api/core.proto b/components/ws-manager-api/core.proto index 93428c85f5ae1b..fce47e7dd26e62 100644 --- a/components/ws-manager-api/core.proto +++ b/components/ws-manager-api/core.proto @@ -597,6 +597,9 @@ enum WorkspaceFeatureFlag { // PROTECTED_SECRETS feature flag for enable secrets support PROTECTED_SECRETS = 8; + + // WORKSPACE_CLASS_LIMITING feature flag for enabling resuorce limiting based on workspace class + WORKSPACE_CLASS_LIMITING = 9; } // GitSpec configures the Git available within the workspace diff --git a/components/ws-manager-api/go/core.pb.go b/components/ws-manager-api/go/core.pb.go index e9970e94d4a765..c8559aaf474c58 100644 --- a/components/ws-manager-api/go/core.pb.go +++ b/components/ws-manager-api/go/core.pb.go @@ -318,6 +318,8 @@ const ( WorkspaceFeatureFlag_PERSISTENT_VOLUME_CLAIM WorkspaceFeatureFlag = 7 // PROTECTED_SECRETS feature flag for enable secrets support WorkspaceFeatureFlag_PROTECTED_SECRETS WorkspaceFeatureFlag = 8 + // WORKSPACE_CLASS_LIMITING feature flag for enabling resuorce limiting based on workspace class + WorkspaceFeatureFlag_WORKSPACE_CLASS_LIMITING WorkspaceFeatureFlag = 9 ) // Enum value maps for WorkspaceFeatureFlag. @@ -327,12 +329,14 @@ var ( 4: "FULL_WORKSPACE_BACKUP", 7: "PERSISTENT_VOLUME_CLAIM", 8: "PROTECTED_SECRETS", + 9: "WORKSPACE_CLASS_LIMITING", } WorkspaceFeatureFlag_value = map[string]int32{ - "NOOP": 0, - "FULL_WORKSPACE_BACKUP": 4, - "PERSISTENT_VOLUME_CLAIM": 7, - "PROTECTED_SECRETS": 8, + "NOOP": 0, + "FULL_WORKSPACE_BACKUP": 4, + "PERSISTENT_VOLUME_CLAIM": 7, + "PROTECTED_SECRETS": 8, + "WORKSPACE_CLASS_LIMITING": 9, } ) @@ -3646,95 +3650,97 @@ var file_core_proto_rawDesc = []byte{ 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x0b, 0x0a, - 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x8d, 0x01, 0x0a, 0x14, 0x57, + 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, 0x2a, 0xab, 0x01, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4f, 0x50, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, - 0x45, 0x44, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x53, 0x10, 0x08, 0x22, 0x04, 0x08, 0x01, - 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x22, 0x04, - 0x08, 0x05, 0x10, 0x05, 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, 0x0e, 0x0a, 0x0a, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, - 0x04, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x32, 0xe7, 0x08, 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, + 0x45, 0x44, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x53, 0x10, 0x08, 0x12, 0x1c, 0x0a, 0x18, + 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x5f, + 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, + 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x22, 0x04, 0x08, 0x05, + 0x10, 0x05, 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, + 0x0e, 0x0a, 0x0a, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x04, 0x22, + 0x04, 0x08, 0x03, 0x10, 0x03, 0x32, 0xe7, 0x08, 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, 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, 0x12, - 0x61, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x22, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x73, - 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, 0x4b, - 0x65, 0x79, 0x12, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x53, 0x48, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, - 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 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, + 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, 0x12, 0x61, 0x0a, + 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x22, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x73, 0x6d, 0x61, + 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x49, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, 0x4b, 0x65, 0x79, + 0x12, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x53, 0x48, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0f, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1d, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 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 e41d832eb37b62..e940fd43074664 100644 --- a/components/ws-manager-api/typescript/src/core_pb.d.ts +++ b/components/ws-manager-api/typescript/src/core_pb.d.ts @@ -1261,6 +1261,7 @@ export enum WorkspaceFeatureFlag { FULL_WORKSPACE_BACKUP = 4, PERSISTENT_VOLUME_CLAIM = 7, PROTECTED_SECRETS = 8, + WORKSPACE_CLASS_LIMITING = 9, } export enum WorkspaceType { diff --git a/components/ws-manager-api/typescript/src/core_pb.js b/components/ws-manager-api/typescript/src/core_pb.js index 8327d346504f76..60cfaa36bf8acc 100644 --- a/components/ws-manager-api/typescript/src/core_pb.js +++ b/components/ws-manager-api/typescript/src/core_pb.js @@ -9805,7 +9805,8 @@ proto.wsman.WorkspaceFeatureFlag = { NOOP: 0, FULL_WORKSPACE_BACKUP: 4, PERSISTENT_VOLUME_CLAIM: 7, - PROTECTED_SECRETS: 8 + PROTECTED_SECRETS: 8, + WORKSPACE_CLASS_LIMITING: 9 }; /** diff --git a/components/ws-manager/pkg/manager/create.go b/components/ws-manager/pkg/manager/create.go index ab0fd1dc6ed7a4..c89d29a5a21cd8 100644 --- a/components/ws-manager/pkg/manager/create.go +++ b/components/ws-manager/pkg/manager/create.go @@ -382,17 +382,6 @@ func (m *Manager) createDefiniteWorkspacePod(startContext *startWorkspaceContext annotations[customTimeoutAnnotation] = req.Spec.Timeout } - limits := startContext.Class.Container.Limits - if limits != nil && limits.CPU != nil { - if limits.CPU.MinLimit != "" { - annotations[kubernetes.WorkspaceCpuLimitAnnotation] = limits.CPU.MinLimit - } - - if limits.CPU.BurstLimit != "" { - annotations[kubernetes.WorkspaceCpuBurstLimitAnnotation] = limits.CPU.BurstLimit - } - } - for k, v := range req.Metadata.Annotations { annotations[workspaceAnnotationPrefix+k] = v } @@ -619,6 +608,17 @@ func (m *Manager) createDefiniteWorkspacePod(startContext *startWorkspaceContext c.Env[i] = env } } + case api.WorkspaceFeatureFlag_WORKSPACE_CLASS_LIMITING: + limits := startContext.Class.Container.Limits + if limits != nil && limits.CPU != nil { + if limits.CPU.MinLimit != "" { + annotations[kubernetes.WorkspaceCpuMinLimitAnnotation] = limits.CPU.MinLimit + } + + if limits.CPU.BurstLimit != "" { + annotations[kubernetes.WorkspaceCpuBurstLimitAnnotation] = limits.CPU.BurstLimit + } + } default: return nil, xerrors.Errorf("unknown feature flag: %v", feature) diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_admission.golden b/components/ws-manager/pkg/manager/testdata/cdwp_admission.golden index 6ef56a58d75c0d..a027e58fb38ded 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_admission.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_admission.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_everyone", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_affinity.golden b/components/ws-manager/pkg/manager/testdata/cdwp_affinity.golden index 0ce864250ae865..9f975348315489 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_affinity.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_affinity.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_class.golden b/components/ws-manager/pkg/manager/testdata/cdwp_class.golden index f6e65eddf23739..2506cc507753a9 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_class.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_class.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "1200m", - "gitpod.io/cpuLimit": "900m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_class_notfound.golden b/components/ws-manager/pkg/manager/testdata/cdwp_class_notfound.golden index 30e53e81d83ee6..8872fa39919d14 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_class_notfound.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_class_notfound.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_customcerts.golden b/components/ws-manager/pkg/manager/testdata/cdwp_customcerts.golden index 2d3d4a35130b07..1fb4ba0486e960 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_customcerts.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_customcerts.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_debug_workspace_pod.golden b/components/ws-manager/pkg/manager/testdata/cdwp_debug_workspace_pod.golden index 6d632162a21b8d..1403b4da635895 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_debug_workspace_pod.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_debug_workspace_pod.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_empty_resource_req.golden b/components/ws-manager/pkg/manager/testdata/cdwp_empty_resource_req.golden index 33d039b1c5c4d3..1b41aee6942712 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_empty_resource_req.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_empty_resource_req.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "1200m", - "gitpod.io/cpuLimit": "900m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_envvars.golden b/components/ws-manager/pkg/manager/testdata/cdwp_envvars.golden index 360e05d589f3b3..f37f927793629e 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_envvars.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_envvars.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_fullworkspacebackup.golden b/components/ws-manager/pkg/manager/testdata/cdwp_fullworkspacebackup.golden index eabc307bb0628d..d2e754e3104069 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_fullworkspacebackup.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_fullworkspacebackup.golden @@ -23,8 +23,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_imagebuild.golden b/components/ws-manager/pkg/manager/testdata/cdwp_imagebuild.golden index ffb5f867fe0d11..ba16d217c2ff84 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_imagebuild.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_imagebuild.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "foobar", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_imagebuild_template.golden b/components/ws-manager/pkg/manager/testdata/cdwp_imagebuild_template.golden index ffb5f867fe0d11..ba16d217c2ff84 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_imagebuild_template.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_imagebuild_template.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "foobar", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild.golden b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild.golden index da64df6b8e4782..ba3ec9293e47ec 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "foobar", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template.golden b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template.golden index da64df6b8e4782..ba3ec9293e47ec 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "foobar", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template_override_resources.golden b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template_override_resources.golden index 49a8ded500628d..8c5195db0d1477 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template_override_resources.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template_override_resources.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "foobar", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_probe.golden b/components/ws-manager/pkg/manager/testdata/cdwp_probe.golden index 1f3b6dadbbce9d..dd3caf55e812dd 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_probe.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_probe.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "foobar", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_readinessprobe.golden b/components/ws-manager/pkg/manager/testdata/cdwp_readinessprobe.golden index 3c1ca1c8e86a76..9d81426fc605b4 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_readinessprobe.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_readinessprobe.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_secrets.golden b/components/ws-manager/pkg/manager/testdata/cdwp_secrets.golden index 1578f44959d5aa..e88b28e62ff15e 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_secrets.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_secrets.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_sshkeys.golden b/components/ws-manager/pkg/manager/testdata/cdwp_sshkeys.golden index 568f84b9438623..7bbbe7e6286de0 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_sshkeys.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_sshkeys.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod.io/sshPublicKeys": "Cl9zc2gtZWQyNTUxOSBBQUFBQzNOemFDMWxaREkxTlRFNUFBQUFJSG0yK2tKSy93dWwxVkd3OXJmQ21kY0dqSjBXbUdiQmpDNXA1OTA4VUdnWiBnaXRwb2RAdW5rbm93bgqvAWVjZHNhLXNoYTItbmlzdHAyNTYgQUFBQUUyVmpaSE5oTFhOb1lUSXRibWx6ZEhBeU5UWUFBQUFJYm1semRIQXlOVFlBQUFCQkJNL0Eva3JhV2pXeTI4blZmc1Y0R2EyRjROQUFWT0dwL1YzazNVOThuT3QyVVNZd3U3RXRTcUVPN1BDUFErK3pOSmR1aFk1SjBmYm42TzA0K25LdmR0OD0gZ2l0cG9kQHVua25vd24=", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_tasks.golden b/components/ws-manager/pkg/manager/testdata/cdwp_tasks.golden index 83affef612540f..953fb8c3ce8d0b 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_tasks.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_tasks.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_template.golden b/components/ws-manager/pkg/manager/testdata/cdwp_template.golden index 307f6e60800deb..c0311497025b35 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_template.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_template.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_timeout.golden b/components/ws-manager/pkg/manager/testdata/cdwp_timeout.golden index 979dd896064536..a51122931e8029 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_timeout.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_timeout.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/customTimeout": "35m20s", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_userns.golden b/components/ws-manager/pkg/manager/testdata/cdwp_userns.golden index e1bcb27c227391..9cd02604de21fc 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_userns.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_userns.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_withaffinity_regular.golden b/components/ws-manager/pkg/manager/testdata/cdwp_withaffinity_regular.golden index 307f6e60800deb..c0311497025b35 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_withaffinity_regular.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_withaffinity_regular.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "test", diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_withaffinityheadless.golden b/components/ws-manager/pkg/manager/testdata/cdwp_withaffinityheadless.golden index ffb5f867fe0d11..ba16d217c2ff84 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_withaffinityheadless.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_withaffinityheadless.golden @@ -22,8 +22,6 @@ "cluster-autoscaler.kubernetes.io/safe-to-evict": "false", "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", "gitpod.io/attemptingToCreate": "true", - "gitpod.io/cpuBurstLimit": "900m", - "gitpod.io/cpuLimit": "300m", "gitpod/admission": "admit_owner_only", "gitpod/contentInitializer": "GmcKZXdvcmtzcGFjZXMvY3J5cHRpYy1pZC1nb2VzLWhlcmcvZmQ2MjgwNGItNGNhYi0xMWU5LTg0M2EtNGU2NDUzNzMwNDhlLnRhckBnaXRwb2QtZGV2LXVzZXItY2hyaXN0ZXN0aW5n", "gitpod/id": "foobar", diff --git a/components/ws-manager/pkg/manager/testdata/cpwp_no_pvc.json b/components/ws-manager/pkg/manager/testdata/cpwp_no_pvc.json index b0a4c7451ea0d8..ccfc55caa3b6e8 100644 --- a/components/ws-manager/pkg/manager/testdata/cpwp_no_pvc.json +++ b/components/ws-manager/pkg/manager/testdata/cpwp_no_pvc.json @@ -4,7 +4,7 @@ "resourceRequests": {"cpu": "900m"}, "resourceLimits": { "cpu": { - "low": "900m", + "min": "900m", "burst": "1200m" } } diff --git a/install/installer/pkg/components/ws-daemon/configmap.go b/install/installer/pkg/components/ws-daemon/configmap.go index 3a8d5f2994ac0d..9b7f18b4a22eff 100644 --- a/install/installer/pkg/components/ws-daemon/configmap.go +++ b/install/installer/pkg/components/ws-daemon/configmap.go @@ -58,6 +58,8 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { } cpuLimitConfig.Enabled = ucfg.Workspace.CPULimits.Enabled + cpuLimitConfig.BurstLimit = ucfg.Workspace.CPULimits.BurstLimit + cpuLimitConfig.Limit = ucfg.Workspace.CPULimits.Limit cpuLimitConfig.TotalBandwidth = ucfg.Workspace.CPULimits.NodeCPUBandwidth ioLimitConfig.WriteBWPerSecond = ucfg.Workspace.IOLimits.WriteBWPerSecond diff --git a/install/installer/pkg/config/v1/experimental/experimental.go b/install/installer/pkg/config/v1/experimental/experimental.go index b268c9f36b576d..55377eea84be6f 100644 --- a/install/installer/pkg/config/v1/experimental/experimental.go +++ b/install/installer/pkg/config/v1/experimental/experimental.go @@ -61,6 +61,8 @@ type WorkspaceConfig struct { CPULimits struct { Enabled bool `json:"enabled"` NodeCPUBandwidth resource.Quantity `json:"nodeBandwidth"` + Limit resource.Quantity `json:"limit"` + BurstLimit resource.Quantity `json:"burstLimit"` } IOLimits struct { WriteBWPerSecond resource.Quantity `json:"writeBandwidthPerSecond"`