From 66c754112074473eb87111fa17eb81e5bf65682c Mon Sep 17 00:00:00 2001 From: Alexey Kazakov Date: Thu, 1 Aug 2024 11:17:50 -0700 Subject: [PATCH] Add CPU to Autoscaler buffer --- api/v1alpha1/docs/apiref.adoc | 1 + api/v1alpha1/memberoperatorconfig_types.go | 4 ++++ api/v1alpha1/zz_generated.deepcopy.go | 5 +++++ api/v1alpha1/zz_generated.openapi.go | 7 +++++++ 4 files changed, 17 insertions(+) diff --git a/api/v1alpha1/docs/apiref.adoc b/api/v1alpha1/docs/apiref.adoc index 2b9163d4..33d0aec8 100644 --- a/api/v1alpha1/docs/apiref.adoc +++ b/api/v1alpha1/docs/apiref.adoc @@ -129,6 +129,7 @@ Defines all parameters concerned with the autoscaler | Field | Description | Default | Validation | *`deploy`* __boolean__ | Defines the flag that determines whether to deploy the autoscaler buffer + | | | *`bufferMemory`* __string__ | Represents how much memory should be required by the autoscaler buffer + | | +| *`bufferCPU`* __string__ | Represents how much CPU should be required by the autoscaler buffer + | | | *`bufferReplicas`* __integer__ | Represents the number of autoscaler buffer replicas to request + | | |=== diff --git a/api/v1alpha1/memberoperatorconfig_types.go b/api/v1alpha1/memberoperatorconfig_types.go index c8d29145..e59e8c34 100644 --- a/api/v1alpha1/memberoperatorconfig_types.go +++ b/api/v1alpha1/memberoperatorconfig_types.go @@ -63,6 +63,10 @@ type AutoscalerConfig struct { // +optional BufferMemory *string `json:"bufferMemory,omitempty"` + // Represents how much CPU should be required by the autoscaler buffer + // +optional + BufferCPU *string `json:"bufferCPU,omitempty"` + // Represents the number of autoscaler buffer replicas to request // +optional BufferReplicas *int `json:"bufferReplicas,omitempty"` diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 2d4bfa6b..bd658802 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -67,6 +67,11 @@ func (in *AutoscalerConfig) DeepCopyInto(out *AutoscalerConfig) { *out = new(string) **out = **in } + if in.BufferCPU != nil { + in, out := &in.BufferCPU, &out.BufferCPU + *out = new(string) + **out = **in + } if in.BufferReplicas != nil { in, out := &in.BufferReplicas, &out.BufferReplicas *out = new(int) diff --git a/api/v1alpha1/zz_generated.openapi.go b/api/v1alpha1/zz_generated.openapi.go index 664f5ea1..f1d0059f 100644 --- a/api/v1alpha1/zz_generated.openapi.go +++ b/api/v1alpha1/zz_generated.openapi.go @@ -215,6 +215,13 @@ func schema_codeready_toolchain_api_api_v1alpha1_AutoscalerConfig(ref common.Ref Format: "", }, }, + "bufferCPU": { + SchemaProps: spec.SchemaProps{ + Description: "Represents how much CPU should be required by the autoscaler buffer", + Type: []string{"string"}, + Format: "", + }, + }, "bufferReplicas": { SchemaProps: spec.SchemaProps{ Description: "Represents the number of autoscaler buffer replicas to request",