mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
add api changes for making mirrorPercentage configurable
This commit is contained in:
@@ -528,6 +528,9 @@ spec:
|
||||
mirror:
|
||||
description: Mirror traffic to canary
|
||||
type: boolean
|
||||
mirrorWeight:
|
||||
description: Weight of traffic to be mirrored when
|
||||
type: number
|
||||
match:
|
||||
description: A/B testing match conditions
|
||||
type: array
|
||||
|
||||
@@ -528,6 +528,9 @@ spec:
|
||||
mirror:
|
||||
description: Mirror traffic to canary
|
||||
type: boolean
|
||||
mirrorWeight:
|
||||
description: Weight of traffic to be mirrored when
|
||||
type: number
|
||||
match:
|
||||
description: A/B testing match conditions
|
||||
type: array
|
||||
|
||||
@@ -528,6 +528,9 @@ spec:
|
||||
mirror:
|
||||
description: Mirror traffic to canary
|
||||
type: boolean
|
||||
mirrorWeight:
|
||||
description: Weight of traffic to be mirrored when
|
||||
type: number
|
||||
match:
|
||||
description: A/B testing match conditions
|
||||
type: array
|
||||
|
||||
@@ -175,10 +175,14 @@ type CanaryAnalysis struct {
|
||||
// +optional
|
||||
Iterations int `json:"iterations,omitempty"`
|
||||
|
||||
//Enable traffic mirroring for Blue/Green
|
||||
// Enable traffic mirroring for Blue/Green
|
||||
// +optional
|
||||
Mirror bool `json:"mirror,omitempty"`
|
||||
|
||||
// Percentage of the traffic to be mirrored when mirroring is enabled
|
||||
// +optional
|
||||
MirrorWeight float64 `json:"mirror_weight,omitempty"`
|
||||
|
||||
// Max traffic percentage routed to canary
|
||||
// +optional
|
||||
MaxWeight int `json:"maxWeight,omitempty"`
|
||||
|
||||
@@ -325,6 +325,11 @@ type HTTPRoute struct {
|
||||
// destination.
|
||||
Mirror *Destination `json:"mirror,omitempty"`
|
||||
|
||||
// Percentage of the traffic to be mirrored by the `mirror` field.
|
||||
// If this field is absent, all the traffic (100%) will be mirrored.
|
||||
// Max value is 100.
|
||||
MirrorPercentage *Percent `json:"mirror_percentage"`
|
||||
|
||||
// Cross-Origin Resource Sharing policy (CORS). Refer to
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||
// for further details about cross origin resource sharing.
|
||||
@@ -334,6 +339,11 @@ type HTTPRoute struct {
|
||||
Headers *Headers `json:"headers,omitempty"`
|
||||
}
|
||||
|
||||
// Percent specifies a percentage in the range of [0.0, 100.0].
|
||||
type Percent struct {
|
||||
Value float64 `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Header manipulation rules
|
||||
type Headers struct {
|
||||
// Header manipulation rules to apply before forwarding a request
|
||||
|
||||
@@ -421,6 +421,11 @@ func (in *HTTPRoute) DeepCopyInto(out *HTTPRoute) {
|
||||
*out = new(Destination)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.MirrorPercentage != nil {
|
||||
in, out := &in.MirrorPercentage, &out.MirrorPercentage
|
||||
*out = new(Percent)
|
||||
**out = **in
|
||||
}
|
||||
if in.CorsPolicy != nil {
|
||||
in, out := &in.CorsPolicy, &out.CorsPolicy
|
||||
*out = new(CorsPolicy)
|
||||
@@ -628,6 +633,22 @@ func (in *OutlierDetection) DeepCopy() *OutlierDetection {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Percent) DeepCopyInto(out *Percent) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Percent.
|
||||
func (in *Percent) DeepCopy() *Percent {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Percent)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PortSelector) DeepCopyInto(out *PortSelector) {
|
||||
*out = *in
|
||||
|
||||
Reference in New Issue
Block a user