github.com/google/cloudprober@v0.11.3/rds/gcp/proto/config.proto (about)

     1  // Configuration proto for GCP provider.
     2  // Example config:
     3  // {
     4  //   project: 'test-project-id'
     5  //
     6  //   # GCE instances
     7  //   gce_instances {}
     8  //
     9  //   # RTC variables from the config lame-duck-targets, re-evaluated every 10s.
    10  //   rtc_variables {
    11  //     rtc_config {
    12  //       name: "lame-duck-targets"
    13  //     }
    14  //   }
    15  //
    16  //   # Pub/Sub messages from the topic lame-duck-targets.
    17  //   pubsub_messages {
    18  //     subscription {
    19  //       name: "lame-duck-targets-{{.hostname}}"
    20  //       topic_name: "lame-duck-targets"
    21  //     }
    22  //   }
    23  // }
    24  syntax = "proto2";
    25  
    26  package cloudprober.rds.gcp;
    27  
    28  option go_package = "github.com/google/cloudprober/rds/gcp/proto";
    29  
    30  message GCEInstances {
    31    // Optional zone filter regex to limit discovery to the specific zones
    32    // For example, zone_filter: "us-east1-*" will limit instances discovery to
    33    // only to the zones in the "us-east1" region.
    34    optional string zone_filter = 1;
    35  
    36    // How often resources should be refreshed.
    37    optional int32 re_eval_sec = 98 [default = 300];  // default 5 min
    38  }
    39  
    40  message ForwardingRules {
    41    // Optionl region filter regex to limit discovery to specific regions, e.g.
    42    // "region_filter:europe-*"
    43    optional string region_filter = 1;
    44  
    45    // How often resources should be refreshed.
    46    optional int32 re_eval_sec = 98 [default = 300];  // default 5 min
    47  }
    48  
    49  // Runtime configurator variables.
    50  message RTCVariables {
    51    message RTCConfig {
    52      required string name = 1;
    53  
    54      // How often RTC variables should be evaluated/expanded.
    55      optional int32 re_eval_sec = 2 [default = 10];  // default 10 sec
    56    }
    57  
    58    repeated RTCConfig rtc_config = 1;
    59  }
    60  
    61  // Runtime configurator variables.
    62  message PubSubMessages {
    63    message Subscription {
    64      // Subscription name. If it doesn't exist already, we try to create one.
    65      required string name = 1;
    66  
    67      // Topic name. This is used to create the subscription if it doesn't exist
    68      // already.
    69      optional string topic_name = 2;
    70  
    71      // If subscription already exists, how far back to seek back on restart.
    72      // Note that duplicate data is fine as we filter by publish time.
    73      optional int32 seek_back_duration_sec = 3 [default = 3600];
    74    }
    75  
    76    repeated Subscription subscription = 1;
    77  
    78    // Only for testing.
    79    optional string api_endpoint = 2;
    80  }
    81  
    82  // GCP provider config.
    83  message ProviderConfig {
    84    // GCP projects. If running on GCE, it defaults to the local project.
    85    repeated string project = 1;
    86  
    87    // GCE instances discovery options. This field should be declared for the GCE
    88    // instances discovery to be enabled.
    89    optional GCEInstances gce_instances = 2;
    90  
    91    // Forwarding rules discovery options. This field should be declared for the
    92    // forwarding rules discovery to be enabled.
    93    // Note that RDS supports only regional forwarding rules.
    94    optional ForwardingRules forwarding_rules = 3;
    95  
    96    // RTC variables discovery options.
    97    optional RTCVariables rtc_variables = 4;
    98  
    99    // PubSub messages discovery options.
   100    optional PubSubMessages pubsub_messages = 5;
   101  
   102    // Compute API version.
   103    optional string api_version = 99 [default = "v1"];
   104  }