@@ -65,9 +65,10 @@ type HealthCheckConfiguration struct {
65
65
// +optional
66
66
HealthCheckPath * string `json:"healthCheckPath,omitempty"`
67
67
68
- // healthCheckPort The port to use to connect with the target.
68
+ // healthCheckPort The port the load balancer uses when performing health checks on targets.
69
+ // The default is to use the port on which each target receives traffic from the load balancer.
69
70
// +optional
70
- HealthCheckPort * int32 `json:"healthCheckPort,omitempty"`
71
+ HealthCheckPort * string `json:"healthCheckPort,omitempty"`
71
72
72
73
// healthCheckProtocol The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.
73
74
// +optional
@@ -116,6 +117,18 @@ const (
116
117
TargetGroupHealthCheckProtocolTCP TargetGroupHealthCheckProtocol = "tcp"
117
118
)
118
119
120
+ // +kubebuilder:validation:Enum=HTTP;HTTPS;TCP;TLS;UDP;TCP_UDP
121
+ type Protocol string
122
+
123
+ const (
124
+ ProtocolHTTP Protocol = "HTTP"
125
+ ProtocolHTTPS Protocol = "HTTPS"
126
+ ProtocolTCP Protocol = "TCP"
127
+ ProtocolTLS Protocol = "TLS"
128
+ ProtocolUDP Protocol = "UDP"
129
+ ProtocolTCP_UDP Protocol = "TCP_UDP"
130
+ )
131
+
119
132
// +kubebuilder:validation:Enum=http1;http2;grpc
120
133
type ProtocolVersion string
121
134
@@ -125,12 +138,23 @@ const (
125
138
ProtocolVersionGRPC ProtocolVersion = "grpc"
126
139
)
127
140
141
+ // +kubebuilder:validation:Enum=none;prefer-route-specific;prefer-default
142
+ type MergeMode string
143
+
144
+ const (
145
+ MergeModeNone MergeMode = "none"
146
+ MergeModePreferRouteSpecific MergeMode = "prefer-route-specific"
147
+ MergeModePreferDefault MergeMode = "prefer-default"
148
+ )
149
+
128
150
// TargetGroupConfigurationSpec defines the TargetGroup properties for a route.
129
151
type TargetGroupConfigurationSpec struct {
130
152
131
153
// targetReference the kubernetes object to attach the Target Group settings to.
132
154
TargetReference Reference `json:"targetReference"`
133
155
156
+ // mergeMode the mode to use for merging the identified per-route configuration and default configuration.
157
+
134
158
// defaultRouteConfiguration fallback configuration applied to all routes, unless overridden by route-specific configurations.
135
159
// +optional
136
160
DefaultConfiguration TargetGroupProps `json:"defaultConfiguration,omitempty"`
@@ -141,19 +165,23 @@ type TargetGroupConfigurationSpec struct {
141
165
}
142
166
143
167
// +kubebuilder:validation:Pattern="^(HTTPRoute|TLSRoute|TCPRoute|UDPRoute|GRPCRoute)?:([^:]+)?:([^:]+)?$"
144
- type RouteName string
168
+ type RouteIdentifier string
145
169
146
170
// RouteConfiguration defines the per route configuration
147
171
type RouteConfiguration struct {
148
- // name the name of the route, it should be in the form of ROUTE:NAMESPACE:NAME
149
- Name RouteName `json:"name "`
172
+ // name the identifier of the route, it should be in the form of ROUTE:NAMESPACE:NAME
173
+ Identifier RouteIdentifier `json:"identifier "`
150
174
151
175
// targetGroupProps the target group specific properties
152
176
TargetGroupProps TargetGroupProps `json:"targetGroupProps"`
153
177
}
154
178
155
179
// TargetGroupProps defines the target group properties
156
180
type TargetGroupProps struct {
181
+ // targetGroupName specifies the name to assign to the Target Group. If not defined, then one is generated.
182
+ // +optional
183
+ TargetGroupName string `json:"targetGroupName,omitempty"`
184
+
157
185
// ipAddressType specifies whether the target group is of type IPv4 or IPv6. If unspecified, it will be automatically inferred.
158
186
// +optional
159
187
IPAddressType * TargetGroupIPAddressType `json:"ipAddressType,omitempty"`
@@ -174,10 +202,20 @@ type TargetGroupProps struct {
174
202
// +optional
175
203
TargetType * TargetType `json:"targetType,omitempty"`
176
204
205
+ // Protocol [Application / Network Load Balancer] the protocol for the target group.
206
+ // If unspecified, it will be automatically inferred.
207
+ // +optional
208
+ Protocol * Protocol `json:"protocol,omitempty"`
209
+
177
210
// protocolVersion [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC , HTTP1 and HTTP2
178
211
// +optional
179
212
ProtocolVersion * ProtocolVersion `json:"protocolVersion,omitempty"`
180
213
214
+ // EnableMultiCluster [Application / Network LoadBalancer]
215
+ // Allows for multiple Clusters / Services to use the generated TargetGroup ARN
216
+ // +optional
217
+ EnableMultiCluster bool `json:"enableMultiCluster,omitempty"`
218
+
181
219
// vpcID is the VPC of the TargetGroup. If unspecified, it will be automatically inferred.
182
220
// +optional
183
221
VpcID * string `json:"vpcID,omitempty"`
@@ -231,6 +269,10 @@ type TargetGroupConfiguration struct {
231
269
Status TargetGroupConfigurationStatus `json:"status,omitempty"`
232
270
}
233
271
272
+ func (tgConfig * TargetGroupConfiguration ) GetTargetGroupConfigForRoute (name , namespace , kind string ) * TargetGroupProps {
273
+ return & tgConfig .Spec .DefaultConfiguration
274
+ }
275
+
234
276
// +kubebuilder:object:root=true
235
277
236
278
// TargetGroupConfigurationList contains a list of TargetGroupConfiguration
0 commit comments