@@ -50,7 +50,7 @@ type Fraction struct {
50
50
```
51
51
52
52
53
- * Update the ` HTTPRequestMirrorFilter ` struct to include a ` MirrorPercent ` field of type ` int32 ` , and a ` MirrorFraction ` field of type ` Fraction ` :
53
+ * Update the ` HTTPRequestMirrorFilter ` struct to include a ` Percent ` field of type ` int32 ` , and a ` Fraction ` field of type ` Fraction ` :
54
54
55
55
56
56
``` go
@@ -81,39 +81,39 @@ type HTTPRequestMirrorFilter struct {
81
81
// Support: Implementation-specific for any other resource
82
82
BackendRef BackendObjectReference ` json:"backendRef"`
83
83
84
- // MirrorPercent represents the percentage of requests that should be
84
+ // Percent represents the percentage of requests that should be
85
85
// mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
86
86
// requests) and its maximum value is 100 (indicating 100% of requests).
87
87
//
88
- // If both MirrorPercent and MirrorFraction are specified, MirrorFraction
89
- // will take priority. If MirrorPercent is unspecified, it will have a
90
- // default value of 100. If MirrorFraction is unspecified, it will have
91
- // a default value of 100/100. This means that if neither field is
92
- // specified, 100% of requests will be mirrored.
88
+ // If both Percent and Fraction are specified, Fraction will take
89
+ // priority. If Percent is unspecified, it will have a default value of
90
+ // 100. If Fraction is unspecified, it will have a default value of
91
+ // 100/100. This means that if neither field is specified, 100% of
92
+ // requests will be mirrored.
93
93
//
94
94
// +optional
95
95
// +kubebuilder:default=100
96
96
// +kubebuilder:validation:Minimum=0
97
97
// +kubebuilder:validation:Maximum=100
98
- MirrorPercent int32 ` json:"mirrorPercent ,omitempty"`
98
+ Percent int32 ` json:"percent ,omitempty"`
99
99
100
- // MirrorFraction represents the fraction of requests that should be
100
+ // Fraction represents the fraction of requests that should be
101
101
// mirrored to BackendRef.
102
102
//
103
- // If both MirrorPercent and MirrorFraction are specified, MirrorFraction
104
- // will take priority. If MirrorPercent is unspecified, it will have a
105
- // default value of 100. If MirrorFraction is unspecified, it will have
106
- // a default value of 100/100. This means that if neither field is
107
- // specified, 100% of requests will be mirrored.
103
+ // If both Percent and Fraction are specified, Fraction will take
104
+ // priority. If Percent is unspecified, it will have a default value of
105
+ // 100. If Fraction is unspecified, it will have a default value of
106
+ // 100/100. This means that if neither field is specified, 100% of
107
+ // requests will be mirrored.
108
108
//
109
109
// +optional
110
- MirrorFraction Fraction ` json:"mirrorFraction ,omitempty"`
110
+ Fraction Fraction ` json:"fraction ,omitempty"`
111
111
}
112
112
```
113
113
114
114
## Example
115
115
116
- An example with MirrorPercent :
116
+ An example with Percent :
117
117
118
118
119
119
```
@@ -138,11 +138,11 @@ spec:
138
138
backendRef:
139
139
name: foo-v2
140
140
port: 8080
141
- mirrorPercent : 42
141
+ percent : 42
142
142
```
143
143
This would result in 42% of requests going to ` foo-v1 ` to be mirrored to ` foo-v2 ` .
144
144
145
- An example with MirrorFraction :
145
+ An example with Fraction :
146
146
147
147
148
148
```
@@ -167,7 +167,7 @@ spec:
167
167
backendRef:
168
168
name: foo-v2
169
169
port: 8080
170
- mirrorFraction :
170
+ fraction :
171
171
numerator: 5
172
172
denominator: 1000
173
173
```
0 commit comments