@@ -235,7 +235,7 @@ type ClientTLS struct {
235235 Key string `json:"client_key,omitempty" yaml:"client_key,omitempty"`
236236}
237237
238- // UpstreamActiveHealthCheck defines the active kind of upstream health check.
238+ // UpstreamActiveHealthCheck defines the active upstream health check configuration .
239239// +k8s:deepcopy-gen=true
240240type UpstreamActiveHealthCheck struct {
241241 Type string `json:"type,omitempty" yaml:"type,omitempty"`
@@ -250,33 +250,35 @@ type UpstreamActiveHealthCheck struct {
250250 Unhealthy UpstreamActiveHealthCheckUnhealthy `json:"unhealthy,omitempty" yaml:"unhealthy,omitempty"`
251251}
252252
253- // UpstreamPassiveHealthCheck defines the passive kind of upstream health check.
253+ // UpstreamPassiveHealthCheck defines the passive health check configuration for an upstream.
254+ // Passive health checks rely on analyzing live traffic to determine the health status of upstream nodes.
254255// +k8s:deepcopy-gen=true
255256type UpstreamPassiveHealthCheck struct {
256- Type string `json:"type,omitempty" yaml:"type,omitempty"`
257- Healthy UpstreamPassiveHealthCheckHealthy `json:"healthy,omitempty" yaml:"healthy,omitempty"`
257+ // Type is the passive health check type. For example: `http`.
258+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
259+ // Healthy defines the conditions under which an upstream node is considered healthy.
260+ Healthy UpstreamPassiveHealthCheckHealthy `json:"healthy,omitempty" yaml:"healthy,omitempty"`
261+ // Unhealthy defines the conditions under which an upstream node is considered unhealthy.
258262 Unhealthy UpstreamPassiveHealthCheckUnhealthy `json:"unhealthy,omitempty" yaml:"unhealthy,omitempty"`
259263}
260264
261- // UpstreamActiveHealthCheckHealthy defines the conditions to judge whether
262- // an upstream node is healthy with the active manner.
265+ // UpstreamActiveHealthCheckHealthy defines the conditions used to actively determine whether an upstream node is healthy.
263266// +k8s:deepcopy-gen=true
264267type UpstreamActiveHealthCheckHealthy struct {
265268 UpstreamPassiveHealthCheckHealthy `json:",inline" yaml:",inline"`
266269
270+ // Interval defines the time interval for checking targets, in seconds.
267271 Interval int `json:"interval,omitempty" yaml:"interval,omitempty"`
268272}
269273
270- // UpstreamPassiveHealthCheckHealthy defines the conditions to judge whether
271- // an upstream node is healthy with the passive manner.
274+ // UpstreamPassiveHealthCheckHealthy defines the conditions used to passively determine whether an upstream node is healthy.
272275// +k8s:deepcopy-gen=true
273276type UpstreamPassiveHealthCheckHealthy struct {
274277 HTTPStatuses []int `json:"http_statuses,omitempty" yaml:"http_statuses,omitempty"`
275278 Successes int `json:"successes,omitempty" yaml:"successes,omitempty"`
276279}
277280
278- // UpstreamPassiveHealthCheckUnhealthy defines the conditions to judge whether
279- // an upstream node is unhealthy with the passive manager.
281+ // UpstreamPassiveHealthCheckUnhealthy defines the conditions used to passively determine whether an upstream node is unhealthy.
280282// +k8s:deepcopy-gen=true
281283type UpstreamPassiveHealthCheckUnhealthy struct {
282284 HTTPStatuses []int `json:"http_statuses,omitempty" yaml:"http_statuses,omitempty"`
@@ -285,12 +287,12 @@ type UpstreamPassiveHealthCheckUnhealthy struct {
285287 Timeouts int `json:"timeouts,omitempty" yaml:"timeouts,omitempty"`
286288}
287289
288- // UpstreamActiveHealthCheckUnhealthy defines the conditions to judge whether
289- // an upstream node is unhealthy with the active manager.
290+ // UpstreamActiveHealthCheckHealthy defines the conditions used to actively determine whether an upstream node is unhealthy.
290291// +k8s:deepcopy-gen=true
291292type UpstreamActiveHealthCheckUnhealthy struct {
292293 UpstreamPassiveHealthCheckUnhealthy `json:",inline" yaml:",inline"`
293294
295+ // Interval defines the time interval for checking targets, in seconds.
294296 Interval int `json:"interval,omitempty" yaml:"interval,omitempty"`
295297}
296298
@@ -306,21 +308,38 @@ type TrafficSplitConfigRule struct {
306308 WeightedUpstreams []TrafficSplitConfigRuleWeightedUpstream `json:"weighted_upstreams"`
307309}
308310
309- // TrafficSplitConfigRuleWeightedUpstream is the weighted upstream config in
310- // the traffic split plugin rule.
311+ // TrafficSplitConfigRuleWeightedUpstream defines a weighted backend in a traffic split rule.
312+ // This is used by the APISIX traffic-split plugin to distribute traffic
313+ // across multiple upstreams based on weight.
311314// +k8s:deepcopy-gen=true
312315type TrafficSplitConfigRuleWeightedUpstream struct {
313- UpstreamID string `json:"upstream_id,omitempty"`
314- Upstream * Upstream `json:"upstream,omitempty"`
315- Weight int `json:"weight"`
316+ // UpstreamID is the identifier of a pre-defined upstream.
317+ UpstreamID string `json:"upstream_id,omitempty"`
318+
319+ // Upstream specifies an inline upstream configuration.
320+ // If provided, it overrides UpstreamID.
321+ Upstream * Upstream `json:"upstream,omitempty"`
322+
323+ // Weight defines the percentage of traffic routed to this upstream.
324+ // The final routing decision is based on relative weights.
325+ Weight int `json:"weight"`
316326}
317327
328+ // TLSClass defines the client TLS configuration for mutual TLS (mTLS) authentication.
318329// +k8s:deepcopy-gen=true
319330type TLSClass struct {
320- ClientCERT string `json:"client_cert,omitempty"`
331+ // ClientCERT is the PEM-encoded client certificate.
332+ ClientCERT string `json:"client_cert,omitempty"`
333+
334+ // ClientCERTID is the reference ID to a stored client certificate.
321335 ClientCERTID string `json:"client_cert_id,omitempty"`
322- ClientKey string `json:"client_key,omitempty"`
323- Verify * bool `json:"verify,omitempty"`
336+
337+ // ClientKey is the PEM-encoded private key for the client certificate.
338+ ClientKey string `json:"client_key,omitempty"`
339+
340+ // Verify indicates whether the server's certificate should be verified.
341+ // If false, TLS verification is skipped.
342+ Verify * bool `json:"verify,omitempty"`
324343}
325344
326345// +k8s:deepcopy-gen=true
0 commit comments