-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathconfig.proto
More file actions
146 lines (117 loc) · 5.71 KB
/
config.proto
File metadata and controls
146 lines (117 loc) · 5.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
syntax = "proto2";
package cloudprober.probes.grpc;
import "github.com/cloudprober/cloudprober/common/oauth/proto/config.proto";
import "github.com/cloudprober/cloudprober/common/tlsconfig/proto/config.proto";
option go_package = "github.com/cloudprober/cloudprober/probes/grpc/proto";
message GenericRequest {
// Protoset contains descriptor source protos generated from the *.proto
// files. You can use protoc to generate protoset files:
// protoc --proto_path=. --descriptor_set_out=myservice.protoset \
// --include_imports my/custom/server/service.proto
optional string protoset_file = 1;
// Note first 3 methods are valid only if descriptor source is not set.
oneof request_type {
// List services using reflection
bool list_services = 2;
// List service methods using reflection.
string list_service_methods = 3;
// Describe service method using reflection.
string describe_service_method = 4;
// Call service method. For this to succeed, you should either provide the
// protoset file or the server should support gRPC reflection.
// https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
string call_service_method = 5;
}
// Request data (in JSON format) for the call_service_method request.
optional string body = 6;
// Request body from file. This field is similar to the body field above, but
// value is read from a file.
optional string body_file = 7;
// Substitute env variables in body file. It will expand environment
// variables if you refer to them as ${VARIABLE} or $VARIABLE in the file.
optional bool body_file_substitute_env = 8;
}
// Next tag: 14
message ProbeConf {
// Port for gRPC requests (Corresponding target field: port)
// Default is 443, but if this field is not set and target has a port, either
// discovered (e.g., k8s services, ingresses), or configured (e.g. endpoint,
// file targets), we use target's port.
optional int32 port = 6;
// Optional oauth config. For GOOGLE_DEFAULT_CREDENTIALS, use:
// oauth_config: { bearer_token { gce_service_account: "default" } }
optional oauth.Config oauth_config = 1;
// ALTS is a gRPC security method supported by some Google services.
// If enabled, peers, with the help of a handshaker service (e.g. metadata
// server of GCE instances), use credentials attached to the service accounts
// to authenticate each other. See
// https://cloud.google.com/security/encryption-in-transit/#service_integrity_encryption
// for more details.
message ALTSConfig {
// If provided, ALTS verifies that peer is using one of the given service
// accounts.
repeated string target_service_account = 1;
// Handshaker service address. Default is to use the local metadata server.
// For most of the ALTS use cases, default address should be okay.
optional string handshaker_service_address = 2;
}
// If alts_config is provided, gRPC client uses ALTS for authentication and
// encryption. For default alts configs, use:
// alts_config: {}
optional ALTSConfig alts_config = 2;
// If TLSConfig is specified, it's used for authentication.
// Note that only one of ALTSConfig and TLSConfig can be enabled at a time.
optional tlsconfig.TLSConfig tls_config = 9;
// if insecure_transport is set to true, TLS will not be used.
optional bool insecure_transport = 12;
enum MethodType {
ECHO = 1;
READ = 2;
WRITE = 3;
HEALTH_CHECK = 4; // gRPC healthcheck service.
GENERIC = 5; // Generic gRPC request.
}
optional MethodType method = 3 [default = ECHO];
// Blob size for ECHO, READ, and WRITE methods.
optional int32 blob_size = 4 [default = 1024];
// For HEALTH_CHECK, name of the service to health check.
optional string health_check_service = 10;
// For HEALTH_CHECK, ignore status. By default, HEALTH_CHECK test passes
// only if response-status is SERVING. Setting the following option makes
// HEALTH_CHECK pass regardless of the response-status.
optional bool health_check_ignore_status = 11;
// Request definition for the GENERIC method.
optional GenericRequest request = 14;
// Number of connections to use. Default is 2 for ECHO, READ and WRITE
// methods for backward compatibility. For HEALTH_CHECK and GENERIC, default
// is 1.
optional int32 num_conns = 5;
// If disable_reuse_conn is set to true, connections will not be reused. This
// is useful when you service is behind a loadbalancer and you want to hit
// different instances every probe cycle.
optional bool disable_reuse_conn = 15;
// Default load balancing config in JSON format. This config only matters
// if we are using client side load balancing (less common) and LB resolver
// doesn't provide a service config[1](most advanced load balancers, like
// xds, do). This field is useful if you have a DNS based LB setup where DNS
// resolution simply returns a list of IPs (e.g. k8s headless service[2]).
//
// [1]: https://github.com/grpc/grpc/blob/master/doc/service_config.md
// [2]: https://kubernetes.io/docs/concepts/services-networking/service/#headless-services
//
// Example:
// default_lb_config: "[{ \"round_robin\": {} }]"
optional string default_lb_config = 16;
// If connect_timeout is not specified, reuse probe timeout. Note that this
// timeout will have an impact only if it is less than the probe timeout.
optional int32 connect_timeout_msec = 7;
// URI scheme allows gRPC to use different resolvers
// Example URI scheme: "google-c2p:///"
// See https://github.com/grpc/grpc/blob/master/doc/naming.md for more details
optional string uri_scheme = 8 [default = "dns:///"];
message Header {
optional string name = 1;
optional string value = 2;
}
repeated Header headers = 13;
}