@@ -244,7 +244,7 @@ type ClientTLS struct {
244244 Key string `json:"client_key,omitempty" yaml:"client_key,omitempty"`
245245}
246246
247- // UpstreamActiveHealthCheck defines the active kind of upstream health check.
247+ // UpstreamActiveHealthCheck defines the active upstream health check configuration .
248248// +k8s:deepcopy-gen=true
249249type UpstreamActiveHealthCheck struct {
250250 Type string `json:"type,omitempty" yaml:"type,omitempty"`
@@ -259,33 +259,35 @@ type UpstreamActiveHealthCheck struct {
259259 Unhealthy UpstreamActiveHealthCheckUnhealthy `json:"unhealthy,omitempty" yaml:"unhealthy,omitempty"`
260260}
261261
262- // UpstreamPassiveHealthCheck defines the passive kind of upstream health check.
262+ // UpstreamPassiveHealthCheck defines the passive health check configuration for an upstream.
263+ // Passive health checks rely on analyzing live traffic to determine the health status of upstream nodes.
263264// +k8s:deepcopy-gen=true
264265type UpstreamPassiveHealthCheck struct {
265- Type string `json:"type,omitempty" yaml:"type,omitempty"`
266- Healthy UpstreamPassiveHealthCheckHealthy `json:"healthy,omitempty" yaml:"healthy,omitempty"`
266+ // Type is the passive health check type. For example: `http`.
267+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
268+ // Healthy defines the conditions under which an upstream node is considered healthy.
269+ Healthy UpstreamPassiveHealthCheckHealthy `json:"healthy,omitempty" yaml:"healthy,omitempty"`
270+ // Unhealthy defines the conditions under which an upstream node is considered unhealthy.
267271 Unhealthy UpstreamPassiveHealthCheckUnhealthy `json:"unhealthy,omitempty" yaml:"unhealthy,omitempty"`
268272}
269273
270- // UpstreamActiveHealthCheckHealthy defines the conditions to judge whether
271- // an upstream node is healthy with the active manner.
274+ // UpstreamActiveHealthCheckHealthy defines the conditions used to actively determine whether an upstream node is healthy.
272275// +k8s:deepcopy-gen=true
273276type UpstreamActiveHealthCheckHealthy struct {
274277 UpstreamPassiveHealthCheckHealthy `json:",inline" yaml:",inline"`
275278
279+ // Interval defines the time interval for checking targets, in seconds.
276280 Interval int `json:"interval,omitempty" yaml:"interval,omitempty"`
277281}
278282
279- // UpstreamPassiveHealthCheckHealthy defines the conditions to judge whether
280- // an upstream node is healthy with the passive manner.
283+ // UpstreamPassiveHealthCheckHealthy defines the conditions used to passively determine whether an upstream node is healthy.
281284// +k8s:deepcopy-gen=true
282285type UpstreamPassiveHealthCheckHealthy struct {
283286 HTTPStatuses []int `json:"http_statuses,omitempty" yaml:"http_statuses,omitempty"`
284287 Successes int `json:"successes,omitempty" yaml:"successes,omitempty"`
285288}
286289
287- // UpstreamPassiveHealthCheckUnhealthy defines the conditions to judge whether
288- // an upstream node is unhealthy with the passive manager.
290+ // UpstreamPassiveHealthCheckUnhealthy defines the conditions used to passively determine whether an upstream node is unhealthy.
289291// +k8s:deepcopy-gen=true
290292type UpstreamPassiveHealthCheckUnhealthy struct {
291293 HTTPStatuses []int `json:"http_statuses,omitempty" yaml:"http_statuses,omitempty"`
@@ -294,12 +296,12 @@ type UpstreamPassiveHealthCheckUnhealthy struct {
294296 Timeouts int `json:"timeouts,omitempty" yaml:"timeouts,omitempty"`
295297}
296298
297- // UpstreamActiveHealthCheckUnhealthy defines the conditions to judge whether
298- // an upstream node is unhealthy with the active manager.
299+ // UpstreamActiveHealthCheckHealthy defines the conditions used to actively determine whether an upstream node is unhealthy.
299300// +k8s:deepcopy-gen=true
300301type UpstreamActiveHealthCheckUnhealthy struct {
301302 UpstreamPassiveHealthCheckUnhealthy `json:",inline" yaml:",inline"`
302303
304+ // Interval defines the time interval for checking targets, in seconds.
303305 Interval int `json:"interval,omitempty" yaml:"interval,omitempty"`
304306}
305307
@@ -315,21 +317,38 @@ type TrafficSplitConfigRule struct {
315317 WeightedUpstreams []TrafficSplitConfigRuleWeightedUpstream `json:"weighted_upstreams"`
316318}
317319
318- // TrafficSplitConfigRuleWeightedUpstream is the weighted upstream config in
319- // the traffic split plugin rule.
320+ // TrafficSplitConfigRuleWeightedUpstream defines a weighted backend in a traffic split rule.
321+ // This is used by the APISIX traffic-split plugin to distribute traffic
322+ // across multiple upstreams based on weight.
320323// +k8s:deepcopy-gen=true
321324type TrafficSplitConfigRuleWeightedUpstream struct {
322- UpstreamID string `json:"upstream_id,omitempty"`
323- Upstream * Upstream `json:"upstream,omitempty"`
324- Weight int `json:"weight"`
325+ // UpstreamID is the identifier of a pre-defined upstream.
326+ UpstreamID string `json:"upstream_id,omitempty"`
327+
328+ // Upstream specifies upstream configuration.
329+ // If provided, it overrides UpstreamID.
330+ Upstream * Upstream `json:"upstream,omitempty"`
331+
332+ // Weight defines the percentage of traffic routed to this upstream.
333+ // The final routing decision is based on relative weights.
334+ Weight int `json:"weight"`
325335}
326336
337+ // TLSClass defines the client TLS configuration for mutual TLS (mTLS) authentication.
327338// +k8s:deepcopy-gen=true
328339type TLSClass struct {
329- ClientCERT string `json:"client_cert,omitempty"`
340+ // ClientCERT is the PEM-encoded client certificate.
341+ ClientCERT string `json:"client_cert,omitempty"`
342+
343+ // ClientCERTID is the reference ID to a stored client certificate.
330344 ClientCERTID string `json:"client_cert_id,omitempty"`
331- ClientKey string `json:"client_key,omitempty"`
332- Verify * bool `json:"verify,omitempty"`
345+
346+ // ClientKey is the PEM-encoded private key for the client certificate.
347+ ClientKey string `json:"client_key,omitempty"`
348+
349+ // Verify indicates whether the server's certificate should be verified.
350+ // If false, TLS verification is skipped.
351+ Verify * bool `json:"verify,omitempty"`
333352}
334353
335354// +k8s:deepcopy-gen=true
0 commit comments