@@ -49,11 +49,21 @@ type NginxProxySpec struct {
49
49
//
50
50
// +optional
51
51
Logging * NginxLogging `json:"logging,omitempty"`
52
+ // NginxPlus specifies NGINX Plus additional settings.
53
+ //
54
+ // +optional
55
+ NginxPlus * NginxPlus `json:"nginxPlus,omitempty"`
52
56
// DisableHTTP2 defines if http2 should be disabled for all servers.
53
57
// Default is false, meaning http2 will be enabled for all servers.
58
+ DisableHTTP2 bool `json:"disableHTTP2,omitempty"`
59
+ }
60
+
61
+ // NginxPlus specifies NGINX Plus additional settings. These will only be applied if NGINX Plus is being used.
62
+ type NginxPlus struct {
63
+ // AllowedAddresses specifies IPAddresses or CIDR blocks to the allow list for accessing the NGINX Plus API.
54
64
//
55
65
// +optional
56
- DisableHTTP2 bool `json:"disableHTTP2 ,omitempty"`
66
+ AllowedAddresses [] NginxPlusAllowAddress `json:"allowedAddresses ,omitempty"`
57
67
}
58
68
59
69
// Telemetry specifies the OpenTelemetry configuration.
@@ -149,7 +159,7 @@ type RewriteClientIP struct {
149
159
// +listType=map
150
160
// +listMapKey=type
151
161
// +kubebuilder:validation:MaxItems=16
152
- TrustedAddresses []Address `json:"trustedAddresses,omitempty"`
162
+ TrustedAddresses []RewriteClientIPAddress `json:"trustedAddresses,omitempty"`
153
163
}
154
164
155
165
// RewriteClientIPModeType defines how NGINX Gateway Fabric will determine the client's original IP address.
@@ -183,28 +193,49 @@ const (
183
193
IPv6 IPFamilyType = "ipv6"
184
194
)
185
195
186
- // Address is a struct that specifies address type and value.
187
- type Address struct {
196
+ // RewriteClientIPAddress specifies the address type and value for a RewriteClientIP address .
197
+ type RewriteClientIPAddress struct {
188
198
// Type specifies the type of address.
189
- Type AddressType `json:"type"`
199
+ Type RewriteClientIPAddressType `json:"type"`
190
200
191
201
// Value specifies the address value.
192
202
Value string `json:"value"`
193
203
}
194
204
195
- // AddressType specifies the type of address.
205
+ // RewriteClientIPAddressType specifies the type of address.
196
206
// +kubebuilder:validation:Enum=CIDR;IPAddress;Hostname
197
- type AddressType string
207
+ type RewriteClientIPAddressType string
198
208
199
209
const (
200
- // CIDRAddressType specifies that the address is a CIDR block.
201
- CIDRAddressType AddressType = "CIDR"
210
+ // RewriteClientIPCIDRAddressType specifies that the address is a CIDR block.
211
+ RewriteClientIPCIDRAddressType RewriteClientIPAddressType = "CIDR"
212
+
213
+ // RewriteClientIPIPAddressType specifies that the address is an IP address.
214
+ RewriteClientIPIPAddressType RewriteClientIPAddressType = "IPAddress"
215
+
216
+ // RewriteClientIPHostnameAddressType specifies that the address is a Hostname.
217
+ RewriteClientIPHostnameAddressType RewriteClientIPAddressType = "Hostname"
218
+ )
202
219
203
- // IPAddressType specifies that the address is an IP address.
204
- IPAddressType AddressType = "IPAddress"
220
+ // NginxPlusAllowAddress specifies the address type and value for an NginxPlus allow address.
221
+ type NginxPlusAllowAddress struct {
222
+ // Type specifies the type of address.
223
+ Type NginxPlusAllowAddressType `json:"type"`
224
+
225
+ // Value specifies the address value.
226
+ Value string `json:"value"`
227
+ }
228
+
229
+ // NginxPlusAllowAddressType specifies the type of address.
230
+ // +kubebuilder:validation:Enum=CIDR;IPAddress
231
+ type NginxPlusAllowAddressType string
232
+
233
+ const (
234
+ // NginxPlusAllowCIDRAddressType specifies that the address is a CIDR block.
235
+ NginxPlusAllowCIDRAddressType NginxPlusAllowAddressType = "CIDR"
205
236
206
- // HostnameAddressType specifies that the address is a Hostname .
207
- HostnameAddressType AddressType = "Hostname "
237
+ // NginxPlusAllowIPAddressType specifies that the address is an IP address .
238
+ NginxPlusAllowIPAddressType NginxPlusAllowAddressType = "IPAddress "
208
239
)
209
240
210
241
// NginxLogging defines logging related settings for NGINX.
0 commit comments