Skip to content

Commit cba8bd7

Browse files
committed
BUILD/MEDIUM: deps: update client-native to v6.2.18
The Equal and Diff methods of the client-native models are now generated by go-method-gen and take GoMethodGenOptions instead of the removed models.Options; the Equalizer plumbing in utils, store and the v3 TCP CR followed. The generated Diff no longer treats nil as equal to an empty struct pointer. Empty TuneOptions/TuneSslOptions injected by the controller are not persisted in the config file, so they kept re-appearing as a diff and caused a reload on every sync; both sides are now normalized to nil when empty before diffing. The regenerated v3 CRDs only gain new fields, nothing is removed.
1 parent fe96bc1 commit cba8bd7

16 files changed

Lines changed: 353 additions & 45 deletions

crs/api/ingress/v3/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
// +genclient
2424
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
25-
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.4"
25+
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.18"
2626

2727
// Backend is a specification for a Backend resource
2828
type Backend struct {

crs/api/ingress/v3/defaults.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
// +genclient
2424
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
25-
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.4"
25+
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.18"
2626

2727
// Defaults is a specification for a Defaults resource
2828
type Defaults struct {

crs/api/ingress/v3/frontend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
// +genclient
2424
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
25-
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.4"
25+
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.18"
2626

2727
// Frontend is a specification for a Frontend resource
2828
type Frontend struct {

crs/api/ingress/v3/global.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
// +genclient
2424
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
25-
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.4"
25+
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.18"
2626
// +kubebuilder:validation:XValidation:rule="!has(self.spec.default_path)", message="spec.config.default_path is set by ingress controller internally"
2727
// +kubebuilder:validation:XValidation:rule="!has(self.spec.master__dash__worker)", message="spec.config.master-worker is set by ingress controller internally"
2828
// +kubebuilder:validation:XValidation:rule="!has(self.spec.pidfile)", message="spec.config.pidfile is set by ingress controller internally"

crs/api/ingress/v3/tcp.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ package v3
1818
import (
1919
"github.com/go-openapi/swag/jsonutils"
2020
"github.com/haproxytech/client-native/v6/models"
21+
"github.com/haproxytech/go-method-gen/pkg/eqdiff"
2122
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2223
)
2324

2425
// +genclient
2526
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
26-
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.4"
27+
// +kubebuilder:metadata:annotations="haproxy.org/client-native=v6.2.18"
2728

2829
// TCP is a specification for a TCP resource
2930
type TCP struct {
@@ -100,7 +101,7 @@ func (s *TCPService) UnmarshalBinary(b []byte) error {
100101
return nil
101102
}
102103

103-
func (a TCPModel) Equal(b TCPModel, opt ...models.Options) bool {
104+
func (a TCPModel) Equal(b TCPModel, opt ...eqdiff.GoMethodGenOptions) bool {
104105
if a.Name != b.Name {
105106
return false
106107
}
@@ -134,6 +135,6 @@ func (a TCPModel) Equal(b TCPModel, opt ...models.Options) bool {
134135
return true
135136
}
136137

137-
func (s TCPService) Equal(b TCPService, opt ...models.Options) bool {
138+
func (s TCPService) Equal(b TCPService, opt ...eqdiff.GoMethodGenOptions) bool {
138139
return s.Name == b.Name && s.Port == b.Port
139140
}

crs/definition/ingress.v3.haproxy.org_backends.yaml

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
haproxy.org/client-native: v6.2.4
6+
haproxy.org/client-native: v6.2.18
77
name: backends.ingress.v3.haproxy.org
88
spec:
99
group: ingress.v3.haproxy.org
@@ -1300,6 +1300,17 @@ spec:
13001300
It follows the HAProxy size format and is expressed in bytes.
13011301
format: int64
13021302
type: integer
1303+
lua_args:
1304+
description: Optional arguments passed to the Lua filter constructor.
1305+
items:
1306+
type: string
1307+
type: array
1308+
lua_name:
1309+
description: |-
1310+
Name of the Lua filter as registered by core.register_filter(), used in the 'filter lua.<name>' directive.
1311+
Pattern: ^[^\s]+$
1312+
pattern: ^[^\s]+$
1313+
type: string
13031314
metadata:
13041315
x-kubernetes-preserve-unknown-fields: true
13051316
min_size:
@@ -1345,7 +1356,7 @@ spec:
13451356
description: |-
13461357
type
13471358
Required: true
1348-
Enum: ["bwlim-in","bwlim-out","cache","compression","fcgi-app","spoe","trace"]
1359+
Enum: ["bwlim-in","bwlim-out","cache","compression","fcgi-app","spoe","trace","lua"]
13491360
enum:
13501361
- bwlim-in
13511362
- bwlim-out
@@ -1354,6 +1365,7 @@ spec:
13541365
- fcgi-app
13551366
- spoe
13561367
- trace
1368+
- lua
13571369
type: string
13581370
required:
13591371
- type
@@ -1407,6 +1419,54 @@ spec:
14071419
- cond_test
14081420
type: object
14091421
type: array
1422+
forwarded:
1423+
description: forwarded
1424+
properties:
1425+
by:
1426+
description: Adds the by parameter using the local address.
1427+
type: boolean
1428+
by_expr:
1429+
description: Adds the by parameter using the specified log-format expression.
1430+
type: string
1431+
by_port:
1432+
description: Adds the by parameter port using the local port.
1433+
type: boolean
1434+
by_port_expr:
1435+
description: Adds the by parameter port using the specified log-format expression.
1436+
type: string
1437+
enabled:
1438+
description: |-
1439+
Enables or disables insertion of the HTTP Forwarded header field.
1440+
Required: true
1441+
Enum: ["enabled","disabled"]
1442+
enum:
1443+
- enabled
1444+
- disabled
1445+
type: string
1446+
for:
1447+
description: Adds the for parameter using the client address.
1448+
type: boolean
1449+
for_expr:
1450+
description: Adds the for parameter using the specified log-format expression.
1451+
type: string
1452+
for_port:
1453+
description: Adds the for parameter port using the client port.
1454+
type: boolean
1455+
for_port_expr:
1456+
description: Adds the for parameter port using the specified log-format expression.
1457+
type: string
1458+
host:
1459+
description: Adds the host parameter using the request authority.
1460+
type: boolean
1461+
host_expr:
1462+
description: Adds the host parameter using the specified log-format expression.
1463+
type: string
1464+
proto:
1465+
description: Adds the proto parameter using the incoming request protocol.
1466+
type: boolean
1467+
required:
1468+
- enabled
1469+
type: object
14101470
forwardfor:
14111471
description: forwardfor
14121472
properties:
@@ -2957,7 +3017,7 @@ spec:
29573017
- safe
29583018
type: string
29593019
http_send_name_header:
2960-
description: http send name header
3020+
description: The header string to use to send the server name
29613021
type: string
29623022
httpchk_params:
29633023
description: httpchk params
@@ -3349,7 +3409,7 @@ spec:
33493409
ServerSwitchingRule Server Switching Rule
33503410
33513411
HAProxy server switching rule configuration (corresponds to use-server directive)
3352-
Example: {"cond":"if","cond_test":"{ req_ssl_sni -i www.example.com }","target_server":"www"}
3412+
Example: {"cond":"if","cond_test":"{ req.ssl_sni -i www.example.com }","target_server":"www"}
33533413
33543414
swagger:model server_switching_rule
33553415
properties:

crs/definition/ingress.v3.haproxy.org_defaults.yaml

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
haproxy.org/client-native: v6.2.4
6+
haproxy.org/client-native: v6.2.18
77
name: defaults.ingress.v3.haproxy.org
88
spec:
99
group: ingress.v3.haproxy.org
@@ -1338,6 +1338,60 @@ spec:
13381338
Pattern: ^[^\s]+$
13391339
pattern: ^[^\s]+$
13401340
type: string
1341+
forwarded:
1342+
description: forwarded
1343+
properties:
1344+
by:
1345+
description: Adds the by parameter using the local address.
1346+
type: boolean
1347+
by_expr:
1348+
description: Adds the by parameter using the specified log-format
1349+
expression.
1350+
type: string
1351+
by_port:
1352+
description: Adds the by parameter port using the local port.
1353+
type: boolean
1354+
by_port_expr:
1355+
description: Adds the by parameter port using the specified log-format
1356+
expression.
1357+
type: string
1358+
enabled:
1359+
description: |-
1360+
Enables or disables insertion of the HTTP Forwarded header field.
1361+
Required: true
1362+
Enum: ["enabled","disabled"]
1363+
enum:
1364+
- enabled
1365+
- disabled
1366+
type: string
1367+
for:
1368+
description: Adds the for parameter using the client address.
1369+
type: boolean
1370+
for_expr:
1371+
description: Adds the for parameter using the specified log-format
1372+
expression.
1373+
type: string
1374+
for_port:
1375+
description: Adds the for parameter port using the client port.
1376+
type: boolean
1377+
for_port_expr:
1378+
description: Adds the for parameter port using the specified log-format
1379+
expression.
1380+
type: string
1381+
host:
1382+
description: Adds the host parameter using the request authority.
1383+
type: boolean
1384+
host_expr:
1385+
description: Adds the host parameter using the specified log-format
1386+
expression.
1387+
type: string
1388+
proto:
1389+
description: Adds the proto parameter using the incoming request
1390+
protocol.
1391+
type: boolean
1392+
required:
1393+
- enabled
1394+
type: object
13411395
forwardfor:
13421396
description: forwardfor
13431397
properties:
@@ -2896,7 +2950,7 @@ spec:
28962950
- safe
28972951
type: string
28982952
http_send_name_header:
2899-
description: http send name header
2953+
description: Add the server name to a request
29002954
type: string
29012955
http_use_proxy_header:
29022956
description: |-
@@ -3127,7 +3181,8 @@ spec:
31273181
- disabled
31283182
type: string
31293183
max_keep_alive_queue:
3130-
description: max keep alive queue
3184+
description: Maximum server queue size for maintaining keep-alive
3185+
connections
31313186
format: int64
31323187
type: integer
31333188
maxconn:
@@ -3316,7 +3371,8 @@ spec:
33163371
format: int64
33173372
type: integer
33183373
retry_on:
3319-
description: retry on
3374+
description: Specify when to attempt to automatically retry a failed
3375+
request
33203376
type: string
33213377
server_fin_timeout:
33223378
description: |-

0 commit comments

Comments
 (0)