github.com/google/cloudprober@v0.11.3/targets/proto/targets.proto (about)

     1  // Provides all configuration necessary to list targets for a cloudprober probe.
     2  syntax = "proto2";
     3  
     4  package cloudprober.targets;
     5  
     6  import "github.com/google/cloudprober/rds/client/proto/config.proto";
     7  import "github.com/google/cloudprober/rds/proto/rds.proto";
     8  import "github.com/google/cloudprober/targets/file/proto/config.proto";
     9  import "github.com/google/cloudprober/targets/gce/proto/config.proto";
    10  import "github.com/google/cloudprober/targets/lameduck/proto/config.proto";
    11  
    12  option go_package = "github.com/google/cloudprober/targets/proto";
    13  
    14  message RDSTargets {
    15    // RDS server options, for example:
    16    // rds_server_options {
    17    //   server_address: "rds-server.xyz:9314"
    18    //   oauth_config: {
    19    //     ...
    20    //   }
    21    // }
    22    optional rds.ClientConf.ServerOptions rds_server_options = 1;
    23  
    24    // Resource path specifies the resources to return. Resources paths have the
    25    // following format:
    26    // <resource_provider>://<resource_type>/<additional_params>
    27    //
    28    // Examples:
    29    // For GCE instances in projectA: "gcp://gce_instances/<projectA>"
    30    // Kubernetes Pods : "k8s://pods"
    31    optional string resource_path = 2;
    32  
    33    // Filters to filter resources by.
    34    repeated rds.Filter filter = 3;
    35  
    36    // IP config to specify the IP address to pick for a resource.
    37    optional rds.IPConfig ip_config = 4;
    38  }
    39  
    40  message TargetsDef {
    41    oneof type {
    42      // Static host names, for example:
    43      // host_name: "www.google.com,8.8.8.8,en.wikipedia.org"
    44      string host_names = 1;
    45  
    46      // Shared targets are accessed through their names.
    47      // Example:
    48      // shared_targets {
    49      //   name:"backend-vms"
    50      //   targets {
    51      //     rds_targets {
    52      //       ..
    53      //     }
    54      //   }
    55      // }
    56      //
    57      // probe {
    58      //   targets {
    59      //     shared_targets: "backend-vms"
    60      //   }
    61      // }
    62      string shared_targets = 5;
    63  
    64      // GCE targets: instances and forwarding_rules, for example:
    65      // gce_targets {
    66      //   instances {}
    67      // }
    68      gce.TargetsConf gce_targets = 2;
    69  
    70      // ResourceDiscovery service based targets.
    71      // Example:
    72      // rds_targets {
    73      //   resource_path: "gcp://gce_instances/{{.project}}"
    74      //   filter {
    75      //     key: "name"
    76      //     value: ".*backend.*"
    77      //   }
    78      // }
    79      RDSTargets rds_targets = 3;
    80  
    81      // File based targets.
    82      // Example:
    83      // file_targets {
    84      //   file_path: "/var/run/cloudprober/vips.textpb"
    85      // }
    86      file.TargetsConf file_targets = 4;
    87  
    88      // Empty targets to meet the probe definition requirement where there are
    89      // actually no targets, for example in case of some external probes.
    90      DummyTargets dummy_targets = 20;
    91    }
    92  
    93    // Regex to apply on the targets.
    94    optional string regex = 21;
    95  
    96    // Exclude lameducks. Lameduck targets can be set through RTC (realtime
    97    // configurator) service. This functionality works only if lame_duck_options
    98    // are specified.
    99    optional bool exclude_lameducks = 22 [default = true];
   100  
   101    // Extensions allow users to to add new targets types (for example, a targets
   102    // type that utilizes a custom protocol) in a systematic manner.
   103    extensions 200 to max;
   104  }
   105  
   106  // DummyTargets represent empty targets, which are useful for external
   107  // probes that do not have any "proper" targets.  Such as ilbprober.
   108  message DummyTargets {}
   109  
   110  // Global targets options. These options are independent of the per-probe
   111  // targets which are defined by the "Targets" type above.
   112  //
   113  // Currently these options are used only for GCE targets to control things like
   114  // how often to re-evaluate the targets and whether to check for lame ducks or
   115  // not.
   116  message GlobalTargetsOptions {
   117    // RDS server address
   118    // Deprecated: This option is now deprecated, please use rds_server_options
   119    // instead.
   120    optional string rds_server_address = 3 [deprecated = true];
   121  
   122    // RDS server options, for example:
   123    // rds_server_options {
   124    //   server_address: "rds-server.xyz:9314"
   125    //   oauth_config: {
   126    //     ...
   127    //   }
   128    // }
   129    optional rds.ClientConf.ServerOptions rds_server_options = 4;
   130  
   131    // GCE targets options.
   132    optional gce.GlobalOptions global_gce_targets_options = 1;
   133  
   134    // Lame duck options. If provided, targets module checks for the lame duck
   135    // targets and removes them from the targets list.
   136    optional lameduck.Options lame_duck_options = 2;
   137  }