From d196fae71cf009ed8c99dc8653aeb488e7a50e18 Mon Sep 17 00:00:00 2001 From: S-mishina Date: Sun, 15 Oct 2023 19:25:33 +0900 Subject: [PATCH] support WarmupDurationSecs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: S-mishina Delete unwanted descriptions Signed-off-by: S-mishina Add kustomize/base/flagger/crd.yaml WarmupDurationSecs field  Signed-off-by: S-mishina fix warmupDurationSecs description Signed-off-by: S-mishina --- artifacts/flagger/crd.yaml | 3 +++ charts/flagger/crds/crd.yaml | 3 +++ kustomize/base/flagger/crd.yaml | 3 +++ pkg/apis/istio/v1alpha3/destination_rule.go | 9 +++++++++ 4 files changed, 18 insertions(+) diff --git a/artifacts/flagger/crd.yaml b/artifacts/flagger/crd.yaml index d95bfc246..c4824bbb3 100644 --- a/artifacts/flagger/crd.yaml +++ b/artifacts/flagger/crd.yaml @@ -806,6 +806,9 @@ spec: - PASSTHROUGH - LEAST_REQUEST type: string + warmupDurationSecs: + description: Represents the warmup duration of Service. + type: string outlierDetection: description: Settings controlling eviction of unhealthy hosts from the load balancing pool. type: object diff --git a/charts/flagger/crds/crd.yaml b/charts/flagger/crds/crd.yaml index d95bfc246..c4824bbb3 100644 --- a/charts/flagger/crds/crd.yaml +++ b/charts/flagger/crds/crd.yaml @@ -806,6 +806,9 @@ spec: - PASSTHROUGH - LEAST_REQUEST type: string + warmupDurationSecs: + description: Represents the warmup duration of Service. + type: string outlierDetection: description: Settings controlling eviction of unhealthy hosts from the load balancing pool. type: object diff --git a/kustomize/base/flagger/crd.yaml b/kustomize/base/flagger/crd.yaml index d95bfc246..c4824bbb3 100644 --- a/kustomize/base/flagger/crd.yaml +++ b/kustomize/base/flagger/crd.yaml @@ -806,6 +806,9 @@ spec: - PASSTHROUGH - LEAST_REQUEST type: string + warmupDurationSecs: + description: Represents the warmup duration of Service. + type: string outlierDetection: description: Settings controlling eviction of unhealthy hosts from the load balancing pool. type: object diff --git a/pkg/apis/istio/v1alpha3/destination_rule.go b/pkg/apis/istio/v1alpha3/destination_rule.go index e9e9a761b..16c390f60 100644 --- a/pkg/apis/istio/v1alpha3/destination_rule.go +++ b/pkg/apis/istio/v1alpha3/destination_rule.go @@ -255,6 +255,15 @@ type LoadBalancerSettings struct { // Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed // between this object and the object one in MeshConfig LocalityLbSetting *LocalityLbSetting `json:"localityLbSetting,omitempty"` + // Represents the warmup duration of Service. If set, the newly created endpoint of service + // remains in warmup mode starting from its creation time for the duration of this window and + // Istio progressively increases amount of traffic for that endpoint instead of sending proportional amount of traffic. + // This should be enabled for services that require warm up time to serve full production load with reasonable latency. + // Please note that this is most effective when few new endpoints come up like scale event in Kubernetes. When all the + // endpoints are relatively new like new deployment, this is not very effective as all endpoints end up getting same + // amount of requests. + // Currently this is only supported for ROUND_ROBIN and LEAST_REQUEST load balancers. + WarmupDurationSecs string `json:"warmupDurationSecs,omitempty"` } // Locality-weighted load balancing allows administrators to control the