Fix default value of Healthcheck for ExternalName services

This commit is contained in:
Kevin Pollet 2024-06-04 09:32:04 +02:00 committed by GitHub
parent 7fc56454ea
commit b452f37e08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 628 additions and 211 deletions

View file

@ -99,45 +99,65 @@ spec:
traffic to.
properties:
healthCheck:
description: Healthcheck defines health checks for the
service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be
sent to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for
the health check endpoint.
type: string
port:
description: Port defines the server URL port for
the health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme
for the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -961,44 +981,65 @@ spec:
More info: https://doc.traefik.io/traefik/v3.0/middlewares/http/errorpages/#service
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname in
the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status code
of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -2377,44 +2418,65 @@ spec:
description: Mirroring defines the Mirroring service configuration.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent to
the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname in the
Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the health
check endpoint.
type: string
port:
description: Port defines the server URL port for the health
check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for the
health check endpoint.
type: string
status:
description: Status defines the expected HTTP status code
of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -2436,44 +2498,65 @@ spec:
description: MirrorService holds the mirror configuration.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -2710,44 +2793,65 @@ spec:
traffic to.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.

View file

@ -99,45 +99,65 @@ spec:
traffic to.
properties:
healthCheck:
description: Healthcheck defines health checks for the
service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be
sent to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for
the health check endpoint.
type: string
port:
description: Port defines the server URL port for
the health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme
for the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.

View file

@ -257,44 +257,65 @@ spec:
More info: https://doc.traefik.io/traefik/v3.0/middlewares/http/errorpages/#service
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname in
the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status code
of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.

View file

@ -48,44 +48,65 @@ spec:
description: Mirroring defines the Mirroring service configuration.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent to
the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname in the
Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the health
check endpoint.
type: string
port:
description: Port defines the server URL port for the health
check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for the
health check endpoint.
type: string
status:
description: Status defines the expected HTTP status code
of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -107,44 +128,65 @@ spec:
description: MirrorService holds the mirror configuration.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -381,44 +423,65 @@ spec:
traffic to.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.

View file

@ -99,45 +99,65 @@ spec:
traffic to.
properties:
healthCheck:
description: Healthcheck defines health checks for the
service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be
sent to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for
the health check endpoint.
type: string
port:
description: Port defines the server URL port for
the health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme
for the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -961,44 +981,65 @@ spec:
More info: https://doc.traefik.io/traefik/v3.0/middlewares/http/errorpages/#service
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname in
the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status code
of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -2377,44 +2418,65 @@ spec:
description: Mirroring defines the Mirroring service configuration.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent to
the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname in the
Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the health
check endpoint.
type: string
port:
description: Port defines the server URL port for the health
check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for the
health check endpoint.
type: string
status:
description: Status defines the expected HTTP status code
of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -2436,44 +2498,65 @@ spec:
description: MirrorService holds the mirror configuration.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.
@ -2710,44 +2793,65 @@ spec:
traffic to.
properties:
healthCheck:
description: Healthcheck defines health checks for the service.
description: Healthcheck defines health checks for ExternalName
services.
properties:
followRedirects:
description: |-
FollowRedirects defines whether redirects should be followed during the health check calls.
Default: true
type: boolean
headers:
additionalProperties:
type: string
description: Headers defines custom headers to be sent
to the health check endpoint.
type: object
hostname:
description: Hostname defines the value of hostname
in the Host header of the health check request.
type: string
interval:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
Interval defines the frequency of the health check calls.
Default: 30s
x-kubernetes-int-or-string: true
method:
description: Method defines the healthcheck method.
type: string
mode:
description: |-
Mode defines the health check mode.
If defined to grpc, will use the gRPC health check protocol to probe the server.
Default: http
type: string
path:
description: Path defines the server URL path for the
health check endpoint.
type: string
port:
description: Port defines the server URL port for the
health check endpoint.
type: integer
scheme:
description: Scheme replaces the server URL scheme for
the health check endpoint.
type: string
status:
description: Status defines the expected HTTP status
code of the response to the health check request.
type: integer
timeout:
anyOf:
- type: integer
- type: string
description: |-
Duration is a custom type suitable for parsing duration values.
It supports `time.ParseDuration`-compatible values and suffix-less digits; in
the latter case, seconds are assumed.
format: int64
type: integer
required:
- followRedirects
Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
Default: 5s
x-kubernetes-int-or-string: true
type: object
kind:
description: Kind defines the kind of the Service.

View file

@ -254,7 +254,7 @@ type ServerHealthCheck struct {
Interval ptypes.Duration `json:"interval,omitempty" toml:"interval,omitempty" yaml:"interval,omitempty" export:"true"`
Timeout ptypes.Duration `json:"timeout,omitempty" toml:"timeout,omitempty" yaml:"timeout,omitempty" export:"true"`
Hostname string `json:"hostname,omitempty" toml:"hostname,omitempty" yaml:"hostname,omitempty"`
FollowRedirects *bool `json:"followRedirects" toml:"followRedirects" yaml:"followRedirects" export:"true"`
FollowRedirects *bool `json:"followRedirects,omitempty" toml:"followRedirects,omitempty" yaml:"followRedirects,omitempty" export:"true"`
Headers map[string]string `json:"headers,omitempty" toml:"headers,omitempty" yaml:"headers,omitempty" export:"true"`
}

View file

@ -305,7 +305,36 @@ func (c configBuilder) buildServersLB(namespace string, svc traefikv1alpha1.Load
lb := &dynamic.ServersLoadBalancer{}
lb.SetDefaults()
lb.Servers = servers
lb.HealthCheck = svc.HealthCheck
if svc.HealthCheck != nil {
lb.HealthCheck = &dynamic.ServerHealthCheck{
Scheme: svc.HealthCheck.Scheme,
Path: svc.HealthCheck.Path,
Method: svc.HealthCheck.Method,
Status: svc.HealthCheck.Status,
Port: svc.HealthCheck.Port,
Hostname: svc.HealthCheck.Hostname,
Headers: svc.HealthCheck.Headers,
}
lb.HealthCheck.SetDefaults()
if svc.HealthCheck.FollowRedirects != nil {
lb.HealthCheck.FollowRedirects = svc.HealthCheck.FollowRedirects
}
if svc.HealthCheck.Mode != "http" {
lb.HealthCheck.Mode = svc.HealthCheck.Mode
}
if svc.HealthCheck.Interval != nil {
if err := lb.HealthCheck.Interval.Set(svc.HealthCheck.Interval.String()); err != nil {
return nil, err
}
}
if svc.HealthCheck.Timeout != nil {
if err := lb.HealthCheck.Timeout.Set(svc.HealthCheck.Timeout.String()); err != nil {
return nil, err
}
}
}
conf := svc
lb.PassHostHeader = conf.PassHostHeader

View file

@ -2469,8 +2469,10 @@ func TestLoadIngressRoutes(t *testing.T) {
FlushInterval: ptypes.Duration(100 * time.Millisecond),
},
HealthCheck: &dynamic.ServerHealthCheck{
Path: "/health",
Interval: 15000000000,
Path: "/health",
Timeout: 5000000000,
Interval: 15000000000,
FollowRedirects: Bool(true),
},
},
},
@ -2531,8 +2533,10 @@ func TestLoadIngressRoutes(t *testing.T) {
FlushInterval: ptypes.Duration(100 * time.Millisecond),
},
HealthCheck: &dynamic.ServerHealthCheck{
Path: "/health1",
Interval: 15000000000,
Path: "/health1",
Timeout: 5000000000,
Interval: 15000000000,
FollowRedirects: Bool(true),
},
},
},
@ -2548,8 +2552,10 @@ func TestLoadIngressRoutes(t *testing.T) {
FlushInterval: ptypes.Duration(100 * time.Millisecond),
},
HealthCheck: &dynamic.ServerHealthCheck{
Path: "/health2",
Interval: 20000000000,
Path: "/health2",
Timeout: 5000000000,
Interval: 20000000000,
FollowRedirects: Bool(true),
},
},
},
@ -2589,8 +2595,10 @@ func TestLoadIngressRoutes(t *testing.T) {
FlushInterval: ptypes.Duration(100 * time.Millisecond),
},
HealthCheck: &dynamic.ServerHealthCheck{
Path: "/health1",
Interval: 15000000000,
Path: "/health1",
Timeout: 5000000000,
Interval: 15000000000,
FollowRedirects: Bool(true),
},
},
},

View file

@ -131,8 +131,8 @@ type LoadBalancerSpec struct {
// It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes.
// By default, NodePortLB is false.
NodePortLB bool `json:"nodePortLB,omitempty"`
// Healthcheck defines health checks for the service.
HealthCheck *dynamic.ServerHealthCheck `json:"healthCheck,omitempty"`
// Healthcheck defines health checks for ExternalName services.
HealthCheck *ServerHealthCheck `json:"healthCheck,omitempty"`
}
type ResponseForwarding struct {
@ -144,6 +144,36 @@ type ResponseForwarding struct {
FlushInterval string `json:"flushInterval,omitempty"`
}
type ServerHealthCheck struct {
// Scheme replaces the server URL scheme for the health check endpoint.
Scheme string `json:"scheme,omitempty"`
// Mode defines the health check mode.
// If defined to grpc, will use the gRPC health check protocol to probe the server.
// Default: http
Mode string `json:"mode,omitempty"`
// Path defines the server URL path for the health check endpoint.
Path string `json:"path,omitempty"`
// Method defines the healthcheck method.
Method string `json:"method,omitempty"`
// Status defines the expected HTTP status code of the response to the health check request.
Status int `json:"status,omitempty"`
// Port defines the server URL port for the health check endpoint.
Port int `json:"port,omitempty"`
// Interval defines the frequency of the health check calls.
// Default: 30s
Interval *intstr.IntOrString `json:"interval,omitempty"`
// Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
// Default: 5s
Timeout *intstr.IntOrString `json:"timeout,omitempty"`
// Hostname defines the value of hostname in the Host header of the health check request.
Hostname string `json:"hostname,omitempty"`
// FollowRedirects defines whether redirects should be followed during the health check calls.
// Default: true
FollowRedirects *bool `json:"followRedirects,omitempty"`
// Headers defines custom headers to be sent to the health check endpoint.
Headers map[string]string `json:"headers,omitempty"`
}
// Service defines an upstream HTTP service to proxy traffic to.
type Service struct {
LoadBalancerSpec `json:",inline"`

View file

@ -584,7 +584,7 @@ func (in *LoadBalancerSpec) DeepCopyInto(out *LoadBalancerSpec) {
}
if in.HealthCheck != nil {
in, out := &in.HealthCheck, &out.HealthCheck
*out = new(dynamic.ServerHealthCheck)
*out = new(ServerHealthCheck)
(*in).DeepCopyInto(*out)
}
return
@ -1115,6 +1115,44 @@ func (in *RouteUDP) DeepCopy() *RouteUDP {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServerHealthCheck) DeepCopyInto(out *ServerHealthCheck) {
*out = *in
if in.Interval != nil {
in, out := &in.Interval, &out.Interval
*out = new(intstr.IntOrString)
**out = **in
}
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(intstr.IntOrString)
**out = **in
}
if in.FollowRedirects != nil {
in, out := &in.FollowRedirects, &out.FollowRedirects
*out = new(bool)
**out = **in
}
if in.Headers != nil {
in, out := &in.Headers, &out.Headers
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerHealthCheck.
func (in *ServerHealthCheck) DeepCopy() *ServerHealthCheck {
if in == nil {
return nil
}
out := new(ServerHealthCheck)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServersTransport) DeepCopyInto(out *ServersTransport) {
*out = *in