Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8012,6 +8012,13 @@ spec:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: |-
Interval between consecutive health checks for a host that is currently
marked as unhealthy. As soon as the host is marked as healthy again Envoy
shifts back to using the standard 'interval'.
If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: |-
Number of consecutive unhealthy checks before considering a host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8012,6 +8012,13 @@ spec:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: |-
Interval between consecutive health checks for a host that is currently
marked as unhealthy. As soon as the host is marked as healthy again Envoy
shifts back to using the standard 'interval'.
If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: |-
Number of consecutive unhealthy checks before considering a host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8012,6 +8012,13 @@ spec:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: |-
Interval between consecutive health checks for a host that is currently
marked as unhealthy. As soon as the host is marked as healthy again Envoy
shifts back to using the standard 'interval'.
If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: |-
Number of consecutive unhealthy checks before considering a host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2604,6 +2604,13 @@ spec:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: |-
Interval between consecutive health checks for a host that is currently
marked as unhealthy. As soon as the host is marked as healthy again Envoy
shifts back to using the standard 'interval'.
If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: |-
Number of consecutive unhealthy checks before considering a host
Expand Down
7 changes: 7 additions & 0 deletions deployments/charts/kuma/crds/kuma.io_meshhealthchecks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ spec:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: |-
Interval between consecutive health checks for a host that is currently
marked as unhealthy. As soon as the host is marked as healthy again Envoy
shifts back to using the standard 'interval'.
If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: |-
Number of consecutive unhealthy checks before considering a host
Expand Down
12 changes: 12 additions & 0 deletions docs/generated/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8582,6 +8582,18 @@ components:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: >-
Interval between consecutive health checks for a host
that is currently

marked as unhealthy. As soon as the host is marked as
healthy again Envoy

shifts back to using the standard 'interval'.

If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: >-
Number of consecutive unhealthy checks before
Expand Down
7 changes: 7 additions & 0 deletions docs/generated/raw/crds/kuma.io_meshhealthchecks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ spec:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: |-
Interval between consecutive health checks for a host that is currently
marked as unhealthy. As soon as the host is marked as healthy again Envoy
shifts back to using the standard 'interval'.
If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: |-
Number of consecutive unhealthy checks before considering a host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ type Conf struct {
// Interval between consecutive health checks.
// If not specified then the default value is 1m
Interval *k8s.Duration `json:"interval,omitempty"`
// Interval between consecutive health checks for a host that is currently
// marked as unhealthy. As soon as the host is marked as healthy again Envoy
// shifts back to using the standard 'interval'.
// If not specified then the value of 'interval' is used.
UnhealthyInterval *k8s.Duration `json:"unhealthyInterval,omitempty"`
// Maximum time to wait for a health check response.
// If not specified then the default value is 15s
Timeout *k8s.Duration `json:"timeout,omitempty"`
Expand Down
7 changes: 7 additions & 0 deletions pkg/plugins/policies/meshhealthcheck/api/v1alpha1/rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,13 @@ components:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: |-
Interval between consecutive health checks for a host that is currently
marked as unhealthy. As soon as the host is marked as healthy again Envoy
shifts back to using the standard 'interval'.
If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: |-
Number of consecutive unhealthy checks before considering a host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func validateDefault(conf Conf) validators.ValidationError {
var verr validators.ValidationError
path := validators.RootedAt("default")
verr.Add(validators.ValidateDurationGreaterThanZeroOrNil(path.Field("interval"), conf.Interval))
verr.Add(validators.ValidateDurationGreaterThanZeroOrNil(path.Field("unhealthyInterval"), conf.UnhealthyInterval))
verr.Add(validators.ValidateDurationGreaterThanZeroOrNil(path.Field("timeout"), conf.Timeout))
verr.Add(validators.ValidateValueGreaterThanZeroOrNil(path.Field("unhealthyThreshold"), conf.UnhealthyThreshold))
verr.Add(validators.ValidateValueGreaterThanZeroOrNil(path.Field("healthyThreshold"), conf.HealthyThreshold))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ to:
kuma.io/display-name: web-backend
default:
interval: -10s
unhealthyInterval: -7s
timeout: -2s
initialJitter: -5s
intervalJitter: -6s
Expand All @@ -203,6 +204,8 @@ to:
violations:
- field: spec.to[0].default.interval
message: must be greater than zero when defined
- field: spec.to[0].default.unhealthyInterval
message: must be greater than zero when defined
- field: spec.to[0].default.timeout
message: must be greater than zero when defined
- field: spec.to[0].default.initialJitter
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ spec:
Maximum time to wait for a health check response.
If not specified then the default value is 15s
type: string
unhealthyInterval:
description: |-
Interval between consecutive health checks for a host that is currently
marked as unhealthy. As soon as the host is marked as healthy again Envoy
shifts back to using the standard 'interval'.
If not specified then the value of 'interval' is used.
type: string
unhealthyThreshold:
description: |-
Number of consecutive unhealthy checks before considering a host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ var _ = Describe("MeshHealthCheck", func() {
Conf: []any{
api.Conf{
Interval: test.ParseDuration("10s"),
UnhealthyInterval: test.ParseDuration("17s"),
Timeout: test.ParseDuration("2s"),
UnhealthyThreshold: pointer.To[int32](3),
HealthyThreshold: pointer.To[int32](1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ healthChecks:
noTrafficInterval: 16s
reuseConnection: true
timeout: 2s
unhealthyInterval: 17s
unhealthyThreshold: 3
name: kri_msvc_default___echo-http_80
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ healthChecks:
noTrafficInterval: 16s
reuseConnection: true
timeout: 2s
unhealthyInterval: 17s
unhealthyThreshold: 3
name: kri_msvc_default___echo-http_80-_0_
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ func buildHealthCheck(conf api.Conf) *envoy_core.HealthCheck {
HealthyThreshold: util_proto.UInt32(uint32(healthyThreshold)),
}

if conf.UnhealthyInterval != nil {
hc.UnhealthyInterval = util_proto.Duration(conf.UnhealthyInterval.Duration)
}
if conf.InitialJitter != nil {
hc.InitialJitter = util_proto.Duration(conf.InitialJitter.Duration)
}
Expand Down