From 789173bab27a1ffbb58f3f334cb72ebc487ed0b9 Mon Sep 17 00:00:00 2001 From: Arnob Kumar Saha Date: Mon, 6 Jul 2026 13:19:36 +0600 Subject: [PATCH] Add replicas & resources to EnvoySpec/EnvoyValues Allow per-tenant horizontal (envoyDeployment.replicas) and vertical (container.resources) scaling of the service-gateway EnvoyProxy. Signed-off-by: Arnob Kumar Saha --- api/gateway/v1alpha1/gatewayconfig_types.go | 8 ++++++++ api/gateway/v1alpha1/zz_generated.deepcopy.go | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/api/gateway/v1alpha1/gatewayconfig_types.go b/api/gateway/v1alpha1/gatewayconfig_types.go index f5d462aa..535d49c0 100644 --- a/api/gateway/v1alpha1/gatewayconfig_types.go +++ b/api/gateway/v1alpha1/gatewayconfig_types.go @@ -219,6 +219,10 @@ type EnvoySpec struct { Image string `json:"image"` Tag string `json:"tag"` //+optional + Replicas *int32 `json:"replicas,omitempty"` + //+optional + Resources core.ResourceRequirements `json:"resources,omitempty"` + //+optional NodeSelector map[string]string `json:"nodeSelector"` //+optional SecurityContext *core.SecurityContext `json:"securityContext"` @@ -238,6 +242,10 @@ type EnvoyValues struct { Image string `json:"image"` Tag string `json:"tag"` //+optional + Replicas *int32 `json:"replicas,omitempty"` + //+optional + Resources core.ResourceRequirements `json:"resources,omitempty"` + //+optional NodeSelector map[string]string `json:"nodeSelector"` //+optional SecurityContext *core.SecurityContext `json:"securityContext"` diff --git a/api/gateway/v1alpha1/zz_generated.deepcopy.go b/api/gateway/v1alpha1/zz_generated.deepcopy.go index 7905a287..adf43d8d 100644 --- a/api/gateway/v1alpha1/zz_generated.deepcopy.go +++ b/api/gateway/v1alpha1/zz_generated.deepcopy.go @@ -190,6 +190,12 @@ func (in *EnvoyServiceValues) DeepCopy() *EnvoyServiceValues { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EnvoySpec) DeepCopyInto(out *EnvoySpec) { *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.Resources.DeepCopyInto(&out.Resources) if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector *out = make(map[string]string, len(*in)) @@ -218,6 +224,12 @@ func (in *EnvoySpec) DeepCopy() *EnvoySpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EnvoyValues) DeepCopyInto(out *EnvoyValues) { *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.Resources.DeepCopyInto(&out.Resources) if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector *out = make(map[string]string, len(*in))