Skip to content

Commit 9c8f672

Browse files
authored
Update field names to avoid 'stuttering' in names.
1 parent 4768da7 commit 9c8f672

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

geps/gep-3171/index.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type Fraction struct {
5050
```
5151

5252

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`:
5454

5555

5656
```go
@@ -81,39 +81,39 @@ type HTTPRequestMirrorFilter struct {
8181
// Support: Implementation-specific for any other resource
8282
BackendRef BackendObjectReference `json:"backendRef"`
8383

84-
// MirrorPercent represents the percentage of requests that should be
84+
// Percent represents the percentage of requests that should be
8585
// mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
8686
// requests) and its maximum value is 100 (indicating 100% of requests).
8787
//
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.
9393
//
9494
// +optional
9595
// +kubebuilder:default=100
9696
// +kubebuilder:validation:Minimum=0
9797
// +kubebuilder:validation:Maximum=100
98-
MirrorPercent int32 `json:"mirrorPercent,omitempty"`
98+
Percent int32 `json:"percent,omitempty"`
9999

100-
// MirrorFraction represents the fraction of requests that should be
100+
// Fraction represents the fraction of requests that should be
101101
// mirrored to BackendRef.
102102
//
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.
108108
//
109109
// +optional
110-
MirrorFraction Fraction `json:"mirrorFraction,omitempty"`
110+
Fraction Fraction `json:"fraction,omitempty"`
111111
}
112112
```
113113

114114
## Example
115115

116-
An example with MirrorPercent:
116+
An example with Percent:
117117

118118

119119
```
@@ -138,11 +138,11 @@ spec:
138138
backendRef:
139139
name: foo-v2
140140
port: 8080
141-
mirrorPercent: 42
141+
percent: 42
142142
```
143143
This would result in 42% of requests going to `foo-v1` to be mirrored to `foo-v2`.
144144

145-
An example with MirrorFraction:
145+
An example with Fraction:
146146

147147

148148
```
@@ -167,7 +167,7 @@ spec:
167167
backendRef:
168168
name: foo-v2
169169
port: 8080
170-
mirrorFraction:
170+
fraction:
171171
numerator: 5
172172
denominator: 1000
173173
```

0 commit comments

Comments
 (0)