-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kuma-api: add proto definition for HealthCheck
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
syntax = "proto3"; | ||
|
||
package kuma.mesh.v1alpha1; | ||
|
||
option go_package = "v1alpha1"; | ||
|
||
import "mesh/v1alpha1/selector.proto"; | ||
|
||
import "google/protobuf/duration.proto"; | ||
import "google/protobuf/wrappers.proto"; | ||
|
||
import "validate/validate.proto"; | ||
|
||
// HealthCheck defines configuration for health checking. | ||
message HealthCheck { | ||
|
||
// List of selectors to match dataplanes that should be configured to do health checks. | ||
repeated Selector sources = 1 [ (validate.rules).repeated .min_items = 1 ]; | ||
|
||
// List of selectors to match services that need to be health checked. | ||
repeated Selector destinations = 2 | ||
[ (validate.rules).repeated .min_items = 1 ]; | ||
|
||
// Conf defines configuration for various types of health checking. | ||
message Conf { | ||
|
||
// Active defines configuration for active health checking. | ||
message Active { | ||
|
||
// Interval between consecutive health checks. | ||
google.protobuf.Duration interval = 1 [(validate.rules).duration = {gt {}}]; | ||
|
||
// Maximum time to wait for a health check response. | ||
google.protobuf.Duration timeout = 2 [(validate.rules).duration = {gt {}}]; | ||
|
||
// Number of consecutive unhealthy checks before considering a host unhealthy. | ||
google.protobuf.UInt32Value unhealthy_threshold = 3 [(validate.rules).uint32 = {gt: 0}]; | ||
|
||
// Number of consecutive healthy checks before considering a host healthy. | ||
google.protobuf.UInt32Value healthy_threshold = 4 [(validate.rules).uint32 = {gt: 0}]; | ||
} | ||
|
||
// Passive defines configuration for passive health checking. | ||
message Passive { | ||
|
||
// Number of consecutive failed requests before considering a host unhealthy. | ||
google.protobuf.UInt32Value unhealthy_threshold = 1 [(validate.rules).uint32 = {gt: 0}]; | ||
|
||
// Interval a host should be considred unhealthy after reaching unhealthy threshold. | ||
google.protobuf.Duration penalty_interval = 2 [(validate.rules).duration = {gt {}}]; | ||
} | ||
|
||
// Configuration for active health checking. | ||
Active active_checks = 1; | ||
|
||
// Configuration for passive health checking. | ||
Passive passive_checks = 2; | ||
} | ||
|
||
// Configuration for various types of health checking. | ||
Conf conf = 3; | ||
} |