membership.proto 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.gkehub.v1alpha2;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/longrunning/operations.proto";
  21. import "google/protobuf/field_mask.proto";
  22. import "google/protobuf/timestamp.proto";
  23. option csharp_namespace = "Google.Cloud.GkeHub.V1Alpha2";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/gkehub/v1alpha2;gkehub";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "MembershipProto";
  27. option java_package = "com.google.cloud.gkehub.v1alpha2";
  28. option php_namespace = "Google\\Cloud\\GkeHub\\V1alpha2";
  29. option ruby_package = "Google::Cloud::GkeHub::V1alpha2";
  30. // GKE Hub CRUD API for the Membership resource.
  31. // The Membership service is currently only available in the global location.
  32. service GkeHub {
  33. option (google.api.default_host) = "gkehub.googleapis.com";
  34. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  35. // Lists Memberships in a given project and location.
  36. rpc ListMemberships(ListMembershipsRequest) returns (ListMembershipsResponse) {
  37. option (google.api.http) = {
  38. get: "/v1alpha2/{parent=projects/*/locations/*}/memberships"
  39. };
  40. option (google.api.method_signature) = "parent";
  41. }
  42. // Gets the details of a Membership.
  43. rpc GetMembership(GetMembershipRequest) returns (Membership) {
  44. option (google.api.http) = {
  45. get: "/v1alpha2/{name=projects/*/locations/*/memberships/*}"
  46. };
  47. option (google.api.method_signature) = "name";
  48. }
  49. // Adds a new Membership.
  50. rpc CreateMembership(CreateMembershipRequest) returns (google.longrunning.Operation) {
  51. option (google.api.http) = {
  52. post: "/v1alpha2/{parent=projects/*/locations/*}/memberships"
  53. body: "resource"
  54. };
  55. option (google.api.method_signature) = "parent,resource,membership_id";
  56. option (google.longrunning.operation_info) = {
  57. response_type: "Membership"
  58. metadata_type: "OperationMetadata"
  59. };
  60. }
  61. // Removes a Membership.
  62. rpc DeleteMembership(DeleteMembershipRequest) returns (google.longrunning.Operation) {
  63. option (google.api.http) = {
  64. delete: "/v1alpha2/{name=projects/*/locations/*/memberships/*}"
  65. };
  66. option (google.api.method_signature) = "name";
  67. option (google.longrunning.operation_info) = {
  68. response_type: "google.protobuf.Empty"
  69. metadata_type: "OperationMetadata"
  70. };
  71. }
  72. // Updates an existing Membership.
  73. rpc UpdateMembership(UpdateMembershipRequest) returns (google.longrunning.Operation) {
  74. option (google.api.http) = {
  75. patch: "/v1alpha2/{name=projects/*/locations/*/memberships/*}"
  76. body: "resource"
  77. };
  78. option (google.api.method_signature) = "name,resource,update_mask";
  79. option (google.longrunning.operation_info) = {
  80. response_type: "Membership"
  81. metadata_type: "OperationMetadata"
  82. };
  83. }
  84. // Generates the manifest for deployment of the GKE connect agent.
  85. rpc GenerateConnectManifest(GenerateConnectManifestRequest) returns (GenerateConnectManifestResponse) {
  86. option (google.api.http) = {
  87. get: "/v1alpha2/{name=projects/*/locations/*/memberships/*}:generateConnectManifest"
  88. };
  89. }
  90. // Initializes the Hub in this project, which includes creating the default
  91. // Hub Service Account and the Hub Workload Identity Pool. Initialization is
  92. // optional, and happens automatically when the first Membership is created.
  93. //
  94. // InitializeHub should be called when the first Membership cannot be
  95. // registered without these resources. A common example is granting the Hub
  96. // Service Account access to another project, which requires the account to
  97. // exist first.
  98. rpc InitializeHub(InitializeHubRequest) returns (InitializeHubResponse) {
  99. option (google.api.http) = {
  100. post: "/v1alpha2/{project=projects/*/locations/global/memberships}:initializeHub"
  101. body: "*"
  102. };
  103. }
  104. }
  105. // Membership contains information about a member cluster.
  106. message Membership {
  107. option (google.api.resource) = {
  108. type: "gkehub.googleapis.com/Membership"
  109. pattern: "projects/{project}/locations/{location}/memberships/{membership}"
  110. };
  111. // Specifies the infrastructure type of a Membership. Infrastructure type is
  112. // used by Hub to control infrastructure-specific behavior, including pricing.
  113. //
  114. // Each GKE distribution (on-GCP, on-Prem, on-X,...) will set this field
  115. // automatically, but Attached Clusters customers should specify a type
  116. // during registration.
  117. enum InfrastructureType {
  118. // No type was specified. Some Hub functionality may require a type be
  119. // specified, and will not support Memberships with this value.
  120. INFRASTRUCTURE_TYPE_UNSPECIFIED = 0;
  121. // Private infrastructure that is owned or operated by customer. This
  122. // includes GKE distributions such as GKE-OnPrem and GKE-OnBareMetal.
  123. ON_PREM = 1;
  124. // Public cloud infrastructure.
  125. MULTI_CLOUD = 2;
  126. }
  127. // Output only. The full, unique name of this Membership resource in the format
  128. // `projects/*/locations/*/memberships/{membership_id}`, set during creation.
  129. //
  130. // `membership_id` must be a valid RFC 1123 compliant DNS label:
  131. //
  132. // 1. At most 63 characters in length
  133. // 2. It must consist of lower case alphanumeric characters or `-`
  134. // 3. It must start and end with an alphanumeric character
  135. //
  136. // Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`,
  137. // with a maximum length of 63 characters.
  138. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  139. // Optional. GCP labels for this membership.
  140. map<string, string> labels = 2 [(google.api.field_behavior) = OPTIONAL];
  141. // Output only. Description of this membership, limited to 63 characters.
  142. // Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*`
  143. //
  144. // This field is present for legacy purposes.
  145. string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  146. // Type of resource represented by this Membership
  147. oneof type {
  148. // Optional. Endpoint information to reach this member.
  149. MembershipEndpoint endpoint = 4 [(google.api.field_behavior) = OPTIONAL];
  150. }
  151. // Output only. State of the Membership resource.
  152. MembershipState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  153. // Output only. When the Membership was created.
  154. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  155. // Output only. When the Membership was last updated.
  156. google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  157. // Output only. When the Membership was deleted.
  158. google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  159. // Optional. An externally-generated and managed ID for this Membership. This ID may
  160. // be modified after creation, but this is not recommended. For GKE clusters,
  161. // external_id is managed by the Hub API and updates will be ignored.
  162. //
  163. // The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*`
  164. //
  165. // If this Membership represents a Kubernetes cluster, this value should be
  166. // set to the UID of the `kube-system` namespace object.
  167. string external_id = 9 [(google.api.field_behavior) = OPTIONAL];
  168. // Optional. How to identify workloads from this Membership.
  169. // See the documentation on Workload Identity for more details:
  170. // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
  171. Authority authority = 10 [(google.api.field_behavior) = OPTIONAL];
  172. // Output only. For clusters using Connect, the timestamp of the most recent connection
  173. // established with Google Cloud. This time is updated every several minutes,
  174. // not continuously. For clusters that do not use GKE Connect, or that have
  175. // never connected successfully, this field will be unset.
  176. google.protobuf.Timestamp last_connection_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  177. // Output only. Google-generated UUID for this resource. This is unique across all
  178. // Membership resources. If a Membership resource is deleted and another
  179. // resource with the same name is created, it gets a different unique_id.
  180. string unique_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  181. // Optional. The infrastructure type this Membership is running on.
  182. InfrastructureType infrastructure_type = 13 [(google.api.field_behavior) = OPTIONAL];
  183. }
  184. // MembershipEndpoint contains information needed to contact a Kubernetes API,
  185. // endpoint and any additional Kubernetes metadata.
  186. message MembershipEndpoint {
  187. // Optional. GKE-specific information. Only present if this Membership is a GKE cluster.
  188. GkeCluster gke_cluster = 1 [(google.api.field_behavior) = OPTIONAL];
  189. // Output only. Useful Kubernetes-specific metadata.
  190. KubernetesMetadata kubernetes_metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  191. // Optional. The in-cluster Kubernetes Resources that should be applied for a correctly
  192. // registered cluster, in the steady state. These resources:
  193. //
  194. // * Ensure that the cluster is exclusively registered to one and only one
  195. // Hub Membership.
  196. // * Propagate Workload Pool Information available in the Membership
  197. // Authority field.
  198. // * Ensure proper initial configuration of default Hub Features.
  199. KubernetesResource kubernetes_resource = 3 [(google.api.field_behavior) = OPTIONAL];
  200. }
  201. // KubernetesResource contains the YAML manifests and configuration for
  202. // Membership Kubernetes resources in the cluster. After CreateMembership or
  203. // UpdateMembership, these resources should be re-applied in the cluster.
  204. message KubernetesResource {
  205. // Input only. The YAML representation of the Membership CR. This field is ignored for GKE
  206. // clusters where Hub can read the CR directly.
  207. //
  208. // Callers should provide the CR that is currently present in the cluster
  209. // during Create or Update, or leave this field empty if none exists. The CR
  210. // manifest is used to validate the cluster has not been registered with
  211. // another Membership.
  212. string membership_cr_manifest = 1 [(google.api.field_behavior) = INPUT_ONLY];
  213. // Output only. Additional Kubernetes resources that need to be applied to the cluster
  214. // after Membership creation, and after every update.
  215. //
  216. // This field is only populated in the Membership returned from a successful
  217. // long-running operation from CreateMembership or UpdateMembership. It is not
  218. // populated during normal GetMembership or ListMemberships requests. To get
  219. // the resource manifest after the initial registration, the caller should
  220. // make a UpdateMembership call with an empty field mask.
  221. repeated ResourceManifest membership_resources = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  222. // Output only. The Kubernetes resources for installing the GKE Connect agent.
  223. //
  224. // This field is only populated in the Membership returned from a successful
  225. // long-running operation from CreateMembership or UpdateMembership. It is not
  226. // populated during normal GetMembership or ListMemberships requests. To get
  227. // the resource manifest after the initial registration, the caller should
  228. // make a UpdateMembership call with an empty field mask.
  229. repeated ResourceManifest connect_resources = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  230. // Optional. Options for Kubernetes resource generation.
  231. ResourceOptions resource_options = 5 [(google.api.field_behavior) = OPTIONAL];
  232. }
  233. // ResourceOptions represent options for Kubernetes resource generation.
  234. message ResourceOptions {
  235. // Optional. The Connect agent version to use for connect_resources. Defaults to the
  236. // latest GKE Connect version. The version must be a currently supported
  237. // version, obsolete versions will be rejected.
  238. string connect_version = 1 [(google.api.field_behavior) = OPTIONAL];
  239. // Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for
  240. // CustomResourceDefinition resources.
  241. // This option should be set for clusters with Kubernetes apiserver versions
  242. // <1.16.
  243. bool v1beta1_crd = 2 [(google.api.field_behavior) = OPTIONAL];
  244. }
  245. // GkeCluster contains information specific to GKE clusters.
  246. message GkeCluster {
  247. // Immutable. Self-link of the GCP resource for the GKE cluster. For example:
  248. //
  249. // //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster
  250. //
  251. // Zonal clusters are also supported.
  252. string resource_link = 1 [(google.api.field_behavior) = IMMUTABLE];
  253. }
  254. // KubernetesMetadata provides informational metadata for Memberships
  255. // that are created from Kubernetes Endpoints (currently, these are equivalent
  256. // to Kubernetes clusters).
  257. message KubernetesMetadata {
  258. // Output only. Kubernetes API server version string as reported by '/version'.
  259. string kubernetes_api_server_version = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  260. // Output only. Node providerID as reported by the first node in the list of nodes on
  261. // the Kubernetes endpoint. On Kubernetes platforms that support zero-node
  262. // clusters (like GKE-on-GCP), the node_count will be zero and the
  263. // node_provider_id will be empty.
  264. string node_provider_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  265. // Output only. Node count as reported by Kubernetes nodes resources.
  266. int32 node_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  267. // Output only. vCPU count as reported by Kubernetes nodes resources.
  268. int32 vcpu_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  269. // Output only. The total memory capacity as reported by the sum of all Kubernetes nodes
  270. // resources, defined in MB.
  271. int32 memory_mb = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  272. // Output only. The time at which these details were last updated. This update_time is
  273. // different from the Membership-level update_time since EndpointDetails are
  274. // updated internally for API consumers.
  275. google.protobuf.Timestamp update_time = 100 [(google.api.field_behavior) = OUTPUT_ONLY];
  276. }
  277. // Authority encodes how Google will recognize identities from this Membership.
  278. // See the workload identity documentation for more details:
  279. // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
  280. message Authority {
  281. // Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and
  282. // be a valid URL with length <2000 characters.
  283. //
  284. // If set, then Google will allow valid OIDC tokens from this issuer to
  285. // authenticate within the workload_identity_pool. OIDC discovery will be
  286. // performed on this URI to validate tokens from the issuer, unless
  287. // `oidc_jwks` is set.
  288. //
  289. // Clearing `issuer` disables Workload Identity. `issuer` cannot be directly
  290. // modified; it must be cleared (and Workload Identity disabled) before using
  291. // a new issuer (and re-enabling Workload Identity).
  292. string issuer = 1 [(google.api.field_behavior) = OPTIONAL];
  293. // Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517).
  294. //
  295. // When this field is set, OIDC discovery will NOT be performed on `issuer`,
  296. // and instead OIDC tokens will be validated using this field.
  297. bytes oidc_jwks = 5 [(google.api.field_behavior) = OPTIONAL];
  298. // Output only. An identity provider that reflects the `issuer` in the workload identity
  299. // pool.
  300. string identity_provider = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  301. // Output only. The name of the workload identity pool in which `issuer` will be
  302. // recognized.
  303. //
  304. // There is a single Workload Identity Pool per Hub that is shared
  305. // between all Memberships that belong to that Hub. For a Hub hosted in
  306. // {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`,
  307. // although this is subject to change in newer versions of this API.
  308. string workload_identity_pool = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  309. }
  310. // MembershipState describes the state of a Membership resource.
  311. message MembershipState {
  312. // Code describes the state of a Membership resource.
  313. enum Code {
  314. // The code is not set.
  315. CODE_UNSPECIFIED = 0;
  316. // The cluster is being registered.
  317. CREATING = 1;
  318. // The cluster is registered.
  319. READY = 2;
  320. // The cluster is being unregistered.
  321. DELETING = 3;
  322. // The Membership is being updated.
  323. UPDATING = 4;
  324. // The Membership is being updated by the Hub Service.
  325. SERVICE_UPDATING = 5;
  326. }
  327. // Output only. The current state of the Membership resource.
  328. Code code = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  329. }
  330. // Request message for `GkeHub.ListMemberships` method.
  331. message ListMembershipsRequest {
  332. // Required. The parent (project and location) where the Memberships will be listed.
  333. // Specified in the format `projects/*/locations/*`.
  334. string parent = 1 [
  335. (google.api.field_behavior) = REQUIRED,
  336. (google.api.resource_reference) = {
  337. child_type: "gkehub.googleapis.com/Membership"
  338. }
  339. ];
  340. // Optional. When requesting a 'page' of resources, `page_size` specifies number of
  341. // resources to return. If unspecified or set to 0, all resources will
  342. // be returned.
  343. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  344. // Optional. Token returned by previous call to `ListMemberships` which
  345. // specifies the position in the list from where to continue listing the
  346. // resources.
  347. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  348. // Optional. Lists Memberships that match the filter expression, following the syntax
  349. // outlined in https://google.aip.dev/160.
  350. //
  351. // Examples:
  352. //
  353. // - Name is `bar` in project `foo-proj` and location `global`:
  354. //
  355. // name = "projects/foo-proj/locations/global/membership/bar"
  356. //
  357. // - Memberships that have a label called `foo`:
  358. //
  359. // labels.foo:*
  360. //
  361. // - Memberships that have a label called `foo` whose value is `bar`:
  362. //
  363. // labels.foo = bar
  364. //
  365. // - Memberships in the CREATING state:
  366. //
  367. // state = CREATING
  368. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  369. // Optional. One or more fields to compare and use to sort the output.
  370. // See https://google.aip.dev/132#ordering.
  371. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  372. }
  373. // Response message for the `GkeHub.ListMemberships` method.
  374. message ListMembershipsResponse {
  375. // The list of matching Memberships.
  376. repeated Membership resources = 1;
  377. // A token to request the next page of resources from the
  378. // `ListMemberships` method. The value of an empty string means that
  379. // there are no more resources to return.
  380. string next_page_token = 2;
  381. // List of locations that could not be reached while fetching this list.
  382. repeated string unreachable = 3;
  383. }
  384. // Request message for `GkeHub.GetMembership` method.
  385. message GetMembershipRequest {
  386. // Required. The Membership resource name in the format
  387. // `projects/*/locations/*/memberships/*`.
  388. string name = 1 [
  389. (google.api.field_behavior) = REQUIRED,
  390. (google.api.resource_reference) = {
  391. type: "gkehub.googleapis.com/Membership"
  392. }
  393. ];
  394. }
  395. // Request message for the `GkeHub.CreateMembership` method.
  396. message CreateMembershipRequest {
  397. // Required. The parent (project and location) where the Memberships will be created.
  398. // Specified in the format `projects/*/locations/*`.
  399. string parent = 1 [
  400. (google.api.field_behavior) = REQUIRED,
  401. (google.api.resource_reference) = {
  402. child_type: "gkehub.googleapis.com/Membership"
  403. }
  404. ];
  405. // Required. Client chosen ID for the membership. `membership_id` must be a valid RFC
  406. // 1123 compliant DNS label:
  407. //
  408. // 1. At most 63 characters in length
  409. // 2. It must consist of lower case alphanumeric characters or `-`
  410. // 3. It must start and end with an alphanumeric character
  411. //
  412. // Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`,
  413. // with a maximum length of 63 characters.
  414. string membership_id = 2 [(google.api.field_behavior) = REQUIRED];
  415. // Required. The membership to create.
  416. Membership resource = 3 [(google.api.field_behavior) = REQUIRED];
  417. }
  418. // Request message for `GkeHub.DeleteMembership` method.
  419. message DeleteMembershipRequest {
  420. // Required. The Membership resource name in the format
  421. // `projects/*/locations/*/memberships/*`.
  422. string name = 1 [
  423. (google.api.field_behavior) = REQUIRED,
  424. (google.api.resource_reference) = {
  425. type: "gkehub.googleapis.com/Membership"
  426. }
  427. ];
  428. }
  429. // Request message for `GkeHub.UpdateMembership` method.
  430. message UpdateMembershipRequest {
  431. // Required. The Membership resource name in the format
  432. // `projects/*/locations/*/memberships/*`.
  433. string name = 1 [(google.api.field_behavior) = REQUIRED];
  434. // Required. Mask of fields to update.
  435. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  436. // Required. Only fields specified in update_mask are updated.
  437. // If you specify a field in the update_mask but don't specify its value here
  438. // that field will be deleted.
  439. // If you are updating a map field, set the value of a key to null or empty
  440. // string to delete the key from the map. It's not possible to update a key's
  441. // value to the empty string.
  442. Membership resource = 3 [(google.api.field_behavior) = REQUIRED];
  443. }
  444. // Request message for `GkeHub.GenerateConnectManifest`
  445. // method.
  446. // .
  447. message GenerateConnectManifestRequest {
  448. // Required. The Membership resource name the Agent will associate with, in the format
  449. // `projects/*/locations/*/memberships/*`.
  450. string name = 1 [(google.api.field_behavior) = REQUIRED];
  451. // Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`.
  452. //
  453. // The Connect Agent is authorized automatically when run in the default
  454. // namespace. Otherwise, explicit authorization must be granted with an
  455. // additional IAM binding.
  456. string namespace = 2 [(google.api.field_behavior) = OPTIONAL];
  457. // Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com
  458. // requires the use of a proxy. Format must be in the form
  459. // `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
  460. // supported by the proxy. This will direct the connect agent's outbound
  461. // traffic through a HTTP(S) proxy.
  462. bytes proxy = 3 [(google.api.field_behavior) = OPTIONAL];
  463. // Optional. The Connect agent version to use. Defaults to the most current version.
  464. string version = 4 [(google.api.field_behavior) = OPTIONAL];
  465. // Optional. If true, generate the resources for upgrade only. Some resources
  466. // generated only for installation (e.g. secrets) will be excluded.
  467. bool is_upgrade = 5 [(google.api.field_behavior) = OPTIONAL];
  468. // Optional. The registry to fetch the connect agent image from. Defaults to
  469. // gcr.io/gkeconnect.
  470. string registry = 6 [(google.api.field_behavior) = OPTIONAL];
  471. // Optional. The image pull secret content for the registry, if not public.
  472. bytes image_pull_secret_content = 7 [(google.api.field_behavior) = OPTIONAL];
  473. }
  474. // GenerateConnectManifestResponse contains manifest information for
  475. // installing/upgrading a Connect agent.
  476. message GenerateConnectManifestResponse {
  477. // The ordered list of Kubernetes resources that need to be applied to the
  478. // cluster for GKE Connect agent installation/upgrade.
  479. repeated ConnectAgentResource manifest = 1;
  480. }
  481. // ConnectAgentResource represents a Kubernetes resource manifest for Connect
  482. // Agent deployment.
  483. message ConnectAgentResource {
  484. // Kubernetes type of the resource.
  485. TypeMeta type = 1;
  486. // YAML manifest of the resource.
  487. string manifest = 2;
  488. }
  489. // ResourceManifest represents a single Kubernetes resource to be applied to
  490. // the cluster.
  491. message ResourceManifest {
  492. // YAML manifest of the resource.
  493. string manifest = 1;
  494. // Whether the resource provided in the manifest is `cluster_scoped`.
  495. // If unset, the manifest is assumed to be namespace scoped.
  496. //
  497. // This field is used for REST mapping when applying the resource in a
  498. // cluster.
  499. bool cluster_scoped = 2;
  500. }
  501. // TypeMeta is the type information needed for content unmarshalling of
  502. // Kubernetes resources in the manifest.
  503. message TypeMeta {
  504. // Kind of the resource (e.g. Deployment).
  505. string kind = 1;
  506. // APIVersion of the resource (e.g. v1).
  507. string api_version = 2;
  508. }
  509. // Request message for the InitializeHub method.
  510. message InitializeHubRequest {
  511. // Required. The Hub to initialize, in the format
  512. // `projects/*/locations/*/memberships/*`.
  513. string project = 1 [(google.api.field_behavior) = REQUIRED];
  514. }
  515. // Response message for the InitializeHub method.
  516. message InitializeHubResponse {
  517. // Name of the Hub default service identity, in the format:
  518. //
  519. // service-<project-number>@gcp-sa-gkehub.iam.gserviceaccount.com
  520. //
  521. // The service account has `roles/gkehub.serviceAgent` in the Hub project.
  522. string service_identity = 1;
  523. // The Workload Identity Pool used for Workload Identity-enabled clusters
  524. // registered with this Hub. Format: `<project-id>.hub.id.goog`
  525. string workload_identity_pool = 2;
  526. }
  527. // Represents the metadata of the long-running operation.
  528. message OperationMetadata {
  529. // Output only. The time the operation was created.
  530. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  531. // Output only. The time the operation finished running.
  532. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  533. // Output only. Server-defined resource path for the target of the operation.
  534. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  535. // Output only. Name of the verb executed by the operation.
  536. string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  537. // Output only. Human-readable status of the operation, if any.
  538. string status_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  539. // Output only. Identifies whether the user has requested cancellation
  540. // of the operation. Operations that have successfully been cancelled
  541. // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  542. // corresponding to `Code.CANCELLED`.
  543. bool cancel_requested = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  544. // Output only. API version used to start the operation.
  545. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  546. }