-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathconfig.proto
93 lines (85 loc) · 2.34 KB
/
config.proto
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
// Configuration proto for Kubernetes provider.
//
// Example provider config:
// {
// pods {}
// }
//
// In probe config:
// probe {
// targets{
// rds_targets {
// resource_path: "k8s://pods"
// filter {
// key: "namespace"
// value: "default"
// }
// filter {
// key: "name"
// value: "cloudprober.*"
// }
// }
// }
// }
syntax = "proto2";
package cloudprober.rds.file;
import "github.com/cloudprober/cloudprober/targets/endpoint/proto/endpoint.proto";
option go_package = "github.com/cloudprober/cloudprober/internal/rds/file/proto";
// File provider config.
message ProviderConfig {
// File that contains resources in either textproto or json format. File can
// be local, on GCS, on S3, or any HTTP(S) URL.
// e.g.:
// - /tmp/resources.textpb
// - gs://my-bucket/resources.json
// - s3://my-bucket/resources.json
// - https://my-public-bucket.s3.amazonaws.com/resources.json
//
// Example in textproto format:
//
// resource {
// name: "switch-xx-01"
// ip: "10.11.112.3"
// port: 8080
// labels {
// key: "device_type"
// value: "switch"
// }
// }
// resource {
// name: "switch-yy-01"
// ip: "10.16.110.12"
// port: 8080
// }
repeated string file_path = 1;
enum Format {
UNSPECIFIED = 0; // Determine format using file extension/
TEXTPB = 1; // Text proto format (.textpb).
JSON = 2; // JSON proto format (.json).
YAML = 3; // YAML proto format (.yaml).
}
optional Format format = 2;
// If specified, file will be re-read at the given interval.
optional int32 re_eval_sec = 3;
// Whenever possible, we reload a file only if it has been modified since the
// last load. If following option is set, mod time check is disabled.
// Note that mod-time check doesn't work for GCS.
optional bool disable_modified_time_check = 4;
}
message FileResources {
// resource format is based on the cloudprober.targets.Endpoint protobuf. You
// can specify endpoints in the following formats: TextPB, JSON, or YAML.
//
// Example in textproto format:
//
// resource {
// name: "web-01"
// url: "https://cloudprober.org"
// }
// resource {
// name: "web-02"
// ip: "10.1.2.3"
// port: 8080
// }
repeated .cloudprober.targets.Endpoint resource = 1;
}