1
0
Fork 0

Merge branch v3.0 into master

This commit is contained in:
Fernandez Ludovic 2024-04-23 13:25:25 +02:00
commit 9d8fd24730
119 changed files with 16917 additions and 500 deletions

View file

@ -645,6 +645,10 @@ func createCircuitBreakerMiddleware(circuitBreaker *traefikv1alpha1.CircuitBreak
}
}
if circuitBreaker.ResponseCode != 0 {
cb.ResponseCode = circuitBreaker.ResponseCode
}
return cb, nil
}

View file

@ -88,6 +88,8 @@ type CircuitBreaker struct {
FallbackDuration *intstr.IntOrString `json:"fallbackDuration,omitempty" toml:"fallbackDuration,omitempty" yaml:"fallbackDuration,omitempty" export:"true"`
// RecoveryDuration is the duration for which the circuit breaker will try to recover (as soon as it is in recovering state).
RecoveryDuration *intstr.IntOrString `json:"recoveryDuration,omitempty" toml:"recoveryDuration,omitempty" yaml:"recoveryDuration,omitempty" export:"true"`
// ResponseCode is the status code that the circuit breaker will return while it is in the open state.
ResponseCode int `json:"responseCode,omitempty" toml:"responseCode,omitempty" yaml:"responseCode,omitempty" export:"true"`
}
// +k8s:deepcopy-gen=true