2023-05-05 13:47:28 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-21 17:31:54 +00:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
2023-05-05 13:47:28 +00:00
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
2023-09-22 16:51:15 +00:00
|
|
|
package hashicorp.consul.catalog.v2beta1;
|
2023-05-05 13:47:28 +00:00
|
|
|
|
|
|
|
import "google/protobuf/duration.proto";
|
2023-09-22 16:51:15 +00:00
|
|
|
import "pbcatalog/v2beta1/selector.proto";
|
2023-09-21 21:18:47 +00:00
|
|
|
import "pbresource/annotations.proto";
|
2023-05-05 13:47:28 +00:00
|
|
|
|
|
|
|
// This resource will belong to a workload or a node and will have an ownership relationship.
|
|
|
|
message HealthStatus {
|
2023-09-21 21:18:47 +00:00
|
|
|
option (hashicorp.consul.resource.spec) = {scope: SCOPE_NAMESPACE};
|
|
|
|
|
2023-05-05 13:47:28 +00:00
|
|
|
// Type is the type of this health check, such as http, tcp, or kubernetes-readiness
|
|
|
|
string type = 1;
|
|
|
|
// Health is the status. This maps to existing health check statuses.
|
|
|
|
Health status = 2;
|
|
|
|
// Description is the description for this status.
|
|
|
|
string description = 3;
|
|
|
|
// Output is the output from running the check that resulted in this status
|
|
|
|
string output = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Health {
|
|
|
|
// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
|
|
|
|
HEALTH_ANY = 0;
|
|
|
|
HEALTH_PASSING = 1;
|
|
|
|
HEALTH_WARNING = 2;
|
|
|
|
HEALTH_CRITICAL = 3;
|
|
|
|
HEALTH_MAINTENANCE = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message HealthChecks {
|
2023-09-21 21:18:47 +00:00
|
|
|
option (hashicorp.consul.resource.spec) = {scope: SCOPE_NAMESPACE};
|
|
|
|
|
2023-05-05 13:47:28 +00:00
|
|
|
WorkloadSelector workloads = 1;
|
|
|
|
repeated HealthCheck health_checks = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message HealthCheck {
|
|
|
|
string name = 1;
|
|
|
|
oneof definition {
|
|
|
|
HTTPCheck http = 2;
|
|
|
|
TCPCheck tcp = 3;
|
|
|
|
UDPCheck udp = 4;
|
|
|
|
GRPCCheck grpc = 5;
|
|
|
|
OSServiceCheck os_service = 6;
|
|
|
|
}
|
|
|
|
google.protobuf.Duration interval = 7;
|
|
|
|
google.protobuf.Duration timeout = 8;
|
|
|
|
google.protobuf.Duration deregister_critical_after = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
message HTTPCheck {
|
|
|
|
string url = 1;
|
|
|
|
map<string, string> header = 2;
|
|
|
|
string method = 3;
|
|
|
|
string body = 4;
|
|
|
|
bool disable_redirects = 5;
|
|
|
|
CheckTLSConfig tls = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TCPCheck {
|
|
|
|
string address = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UDPCheck {
|
|
|
|
string address = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GRPCCheck {
|
|
|
|
string address = 1;
|
|
|
|
CheckTLSConfig tls = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message OSServiceCheck {
|
|
|
|
string address = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CheckTLSConfig {
|
|
|
|
string tls_server_name = 1;
|
|
|
|
bool tls_skip_verify = 2;
|
|
|
|
bool use_tls = 3;
|
|
|
|
}
|