Skip to content

Commit 4b8ab65

Browse files
author
Kate Osborn
committed
Remove default stanza
1 parent 22281e9 commit 4b8ab65

File tree

3 files changed

+65
-98
lines changed

3 files changed

+65
-98
lines changed

apis/v1alpha1/clientsettingspolicy_types.go

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,15 @@ type ClientSettingsPolicySpec struct {
4242
// Support: Gateway
4343
TargetRef gatewayv1alpha2.PolicyTargetReference `json:"targetRef"`
4444

45-
// Default defines default policy configuration for the targeted resource.
45+
// Body defines the client request body settings.
4646
//
4747
// +optional
48-
Default *ClientSettingsPolicyConfig `json:"default,omitempty"`
48+
Body *ClientBody `json:"body,omitempty"`
49+
50+
// KeepAlive defines the keep-alive settings.
51+
//
52+
// +optional
53+
KeepAlive *ClientKeepAlive `json:"keepAlive,omitempty"`
4954
}
5055

5156
// ClientSettingsPolicyStatus defines the current state of ClientSettingsPolicy.
@@ -59,19 +64,6 @@ type ClientSettingsPolicyStatus struct {
5964
Conditions []metav1.Condition `json:"conditions,omitempty"`
6065
}
6166

62-
// ClientSettingsPolicyConfig contains client settings policy configuration.
63-
type ClientSettingsPolicyConfig struct {
64-
// Body defines the client request body settings.
65-
//
66-
// +optional
67-
Body *ClientBody `json:"body,omitempty"`
68-
69-
// KeepAlive defines the keep-alive settings.
70-
//
71-
// +optional
72-
KeepAlive *ClientKeepAlive `json:"keepAlive,omitempty"`
73-
}
74-
7567
// ClientBody contains the settings for the client request body.
7668
type ClientBody struct {
7769
// MaxSize sets the maximum allowed size of the client request body.

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 8 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/gateway.nginx.org_clientsettingspolicies.yaml

Lines changed: 50 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -51,68 +51,63 @@ spec:
5151
spec:
5252
description: Spec defines the desired state of the ClientSettingsPolicy.
5353
properties:
54-
default:
55-
description: Default defines default policy configuration for the
56-
targeted resource.
54+
body:
55+
description: Body defines the client request body settings.
5756
properties:
58-
body:
59-
description: Body defines the client request body settings.
57+
maxSize:
58+
description: |-
59+
MaxSize sets the maximum allowed size of the client request body.
60+
If the size in a request exceeds the configured value,
61+
the 413 (Request Entity Too Large) error is returned to the client.
62+
Setting size to 0 disables checking of client request body size.
63+
Default: 1m.
64+
pattern: ^\d+(k|m|g)?$
65+
type: string
66+
timeout:
67+
description: |-
68+
Timeout defines a timeout for reading client request body. The timeout is set only for a period between
69+
two successive read operations, not for the transmission of the whole request body.
70+
If a client does not transmit anything within this time, the request is terminated with the
71+
408 (Request Time-out) error.
72+
Default: 60s.
73+
pattern: ^\d+(ms|s|m|h|d)?$
74+
type: string
75+
type: object
76+
keepAlive:
77+
description: KeepAlive defines the keep-alive settings.
78+
properties:
79+
requests:
80+
description: |-
81+
Requests sets the maximum number of requests that can be served through one keep-alive connection.
82+
After the maximum number of requests are made, the connection is closed. Closing connections periodically
83+
is necessary to free per-connection memory allocations. Therefore, using too high maximum number of requests
84+
is not recommended as it can lead to excessive memory usage.
85+
Default: 1000.
86+
format: int32
87+
minimum: 0
88+
type: integer
89+
time:
90+
description: |-
91+
Time defines the maximum time during which requests can be processed through one keep-alive connection.
92+
After this time is reached, the connection is closed following the subsequent request processing.
93+
Default: 1h.
94+
pattern: ^\d+(ms|s|m|h|d)?$
95+
type: string
96+
timeout:
97+
description: Timeout defines the keep-alive timeouts for clients.
6098
properties:
61-
maxSize:
62-
description: |-
63-
MaxSize sets the maximum allowed size of the client request body.
64-
If the size in a request exceeds the configured value,
65-
the 413 (Request Entity Too Large) error is returned to the client.
66-
Setting size to 0 disables checking of client request body size.
67-
Default: 1m.
68-
pattern: ^\d+(k|m|g)?$
69-
type: string
70-
timeout:
71-
description: |-
72-
Timeout defines a timeout for reading client request body. The timeout is set only for a period between
73-
two successive read operations, not for the transmission of the whole request body.
74-
If a client does not transmit anything within this time, the request is terminated with the
75-
408 (Request Time-out) error.
76-
Default: 60s.
99+
header:
100+
description: 'Header sets the timeout in the "Keep-Alive:
101+
timeout=time" response header field.'
77102
pattern: ^\d+(ms|s|m|h|d)?$
78103
type: string
79-
type: object
80-
keepAlive:
81-
description: KeepAlive defines the keep-alive settings.
82-
properties:
83-
requests:
84-
description: |-
85-
Requests sets the maximum number of requests that can be served through one keep-alive connection.
86-
After the maximum number of requests are made, the connection is closed. Closing connections periodically
87-
is necessary to free per-connection memory allocations. Therefore, using too high maximum number of requests
88-
is not recommended as it can lead to excessive memory usage.
89-
Default: 1000.
90-
format: int32
91-
minimum: 0
92-
type: integer
93-
time:
104+
server:
94105
description: |-
95-
Time defines the maximum time during which requests can be processed through one keep-alive connection.
96-
After this time is reached, the connection is closed following the subsequent request processing.
97-
Default: 1h.
106+
Server sets the timeout during which a keep-alive client connection will stay open on the server side.
107+
Setting this value to 0 disables keep-alive client connections.
108+
Default: 75s.
98109
pattern: ^\d+(ms|s|m|h|d)?$
99110
type: string
100-
timeout:
101-
description: Timeout defines the keep-alive timeouts for clients.
102-
properties:
103-
header:
104-
description: 'Header sets the timeout in the "Keep-Alive:
105-
timeout=time" response header field.'
106-
pattern: ^\d+(ms|s|m|h|d)?$
107-
type: string
108-
server:
109-
description: |-
110-
Server sets the timeout during which a keep-alive client connection will stay open on the server side.
111-
Setting this value to 0 disables keep-alive client connections.
112-
Default: 75s.
113-
pattern: ^\d+(ms|s|m|h|d)?$
114-
type: string
115-
type: object
116111
type: object
117112
type: object
118113
targetRef:

0 commit comments

Comments
 (0)