Skip to content

Commit 9f786b5

Browse files
Google APIscopybara-github
authored andcommitted
feat: added custom tolerations and labels support for Attached Clusters
feat: mark GKE-on-AWS and GKE-on-Azure protos as being deprecated to discourage any new usage as these services turn down docs: A comment for field `tags` in message `.google.cloud.gkemulticloud.v1.AttachedCluster` is changed docs: A comment for field `throughput` in message `.google.cloud.gkemulticloud.v1.AwsVolumeTemplate` is changed docs: A comment for field `requested_cancellation` in message `.google.cloud.gkemulticloud.v1.OperationMetadata` is changed PiperOrigin-RevId: 839306772
1 parent 5362d27 commit 9f786b5

File tree

8 files changed

+348
-33
lines changed

8 files changed

+348
-33
lines changed

google/cloud/gkemulticloud/v1/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ load(
354354

355355
csharp_proto_library(
356356
name = "gkemulticloud_csharp_proto",
357-
extra_opts = [],
358357
deps = [":gkemulticloud_proto"],
359358
)
360359

google/cloud/gkemulticloud/v1/attached_resources.proto

Lines changed: 96 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
2020
import "google/api/resource.proto";
2121
import "google/cloud/gkemulticloud/v1/common_resources.proto";
2222
import "google/protobuf/timestamp.proto";
23+
import "google/type/date.proto";
2324

2425
option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1";
2526
option go_package = "cloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpb";
@@ -170,15 +171,16 @@ message AttachedCluster {
170171
SecurityPostureConfig security_posture_config = 26
171172
[(google.api.field_behavior) = OPTIONAL];
172173

173-
// Optional. Input only. Tag keys/values directly bound to this resource.
174+
// Optional. Input only. Tag keys and values directly bound to this resource.
174175
//
175-
// Tag key must be specified in the format <tag namespace>/<tag key name>
176+
// The tag key must be specified in the format
177+
// `<tag namespace>/<tag key name>,`
176178
// where the tag namespace is the ID of the organization or name of the
177-
// project that the tag key is defined in.
178-
// The short name of a tag key or value can have a maximum length of 256
179-
// characters. The permitted character set for the short name includes UTF-8
180-
// encoded Unicode characters except single quotes ('), double quotes ("),
181-
// backslashes (\), and forward slashes (/).
179+
// project that the tag key is defined in. The short name of a tag key or
180+
// value can have a maximum length of 256 characters. The permitted character
181+
// set for the short name includes UTF-8 encoded Unicode characters except
182+
// single quotation marks (`'`), double quotation marks (`"`), backslashes
183+
// (`\`), and forward slashes (`/`).
182184
//
183185
// See
184186
// [Tags](https://cloud.google.com/resource-manager/docs/tags/tags-overview)
@@ -187,6 +189,11 @@ message AttachedCluster {
187189
(google.api.field_behavior) = OPTIONAL,
188190
(google.api.field_behavior) = INPUT_ONLY
189191
];
192+
193+
// Optional. Kubernetes configurations for auto-installed components on the
194+
// cluster.
195+
SystemComponentsConfig system_components_config = 28
196+
[(google.api.field_behavior) = OPTIONAL];
190197
}
191198

192199
// Configuration related to the cluster RBAC settings.
@@ -266,6 +273,25 @@ message AttachedServerConfig {
266273
message AttachedPlatformVersionInfo {
267274
// Platform version name.
268275
string version = 1;
276+
277+
// Optional. True if the version is available for attachedcluster creation. If
278+
// a version is enabled, it can be used to attach new clusters.
279+
bool enabled = 3 [(google.api.field_behavior) = OPTIONAL];
280+
281+
// Optional. True if this cluster version belongs to a minor version that has
282+
// reached its end of life and is no longer in scope to receive security and
283+
// bug fixes.
284+
bool end_of_life = 4 [(google.api.field_behavior) = OPTIONAL];
285+
286+
// Optional. The estimated date (in Pacific Time) when this cluster version
287+
// will reach its end of life. Or if this version is no longer supported (the
288+
// `end_of_life` field is true), this is the actual date (in Pacific time)
289+
// when the version reached its end of life.
290+
google.type.Date end_of_life_date = 5
291+
[(google.api.field_behavior) = OPTIONAL];
292+
293+
// Optional. The date (in Pacific Time) when the cluster version was released.
294+
google.type.Date release_date = 6 [(google.api.field_behavior) = OPTIONAL];
269295
}
270296

271297
// AttachedClusterError describes errors found on attached clusters.
@@ -294,3 +320,66 @@ message KubernetesSecret {
294320
// Namespace in which the kubernetes secret is stored.
295321
string namespace = 2;
296322
}
323+
324+
// SystemComponentsConfig defines the fields for customizing configurations for
325+
// auto-installed components.
326+
message SystemComponentsConfig {
327+
// Sets custom tolerations for pods created by auto-installed components.
328+
repeated Toleration tolerations = 1;
329+
330+
// Sets custom labels for pods created by auto-installed components.
331+
repeated Label labels = 2;
332+
}
333+
334+
// Toleration defines the fields for tolerations for pods created by
335+
// auto-installed components.
336+
message Toleration {
337+
// KeyOperator represents a key's relationship to the value e.g. 'Equal'.
338+
enum KeyOperator {
339+
// Operator is not specified.
340+
KEY_OPERATOR_UNSPECIFIED = 0;
341+
342+
// Operator maps to 'Equal'.
343+
KEY_OPERATOR_EQUAL = 1;
344+
345+
// Operator maps to 'Exists'.
346+
KEY_OPERATOR_EXISTS = 2;
347+
}
348+
349+
// Effect indicates the taint effect to match e.g. 'NoSchedule'.
350+
enum Effect {
351+
// Effect is not specified.
352+
EFFECT_UNSPECIFIED = 0;
353+
354+
// Effect maps to 'NoSchedule'.
355+
EFFECT_NO_SCHEDULE = 1;
356+
357+
// Effect maps to 'PreferNoSchedule'.
358+
EFFECT_PREFER_NO_SCHEDULE = 2;
359+
360+
// Effect maps to 'NoExecute'.
361+
EFFECT_NO_EXECUTE = 3;
362+
}
363+
364+
// Key is the taint key that the toleration applies to.
365+
string key = 1;
366+
367+
// Value is the taint value that the toleration applies to.
368+
string value = 2;
369+
370+
// KeyOperator represents a key's relationship to the value e.g. 'Exist'.
371+
KeyOperator key_operator = 3;
372+
373+
// Effect indicates the taint effect to match e.g. 'NoSchedule'
374+
Effect effect = 4;
375+
}
376+
377+
// Label defines the additional fields for labels for pods created by
378+
// auto-installed components.
379+
message Label {
380+
// This is the key of the label.
381+
string key = 1;
382+
383+
// This is the value of the label.
384+
string value = 2;
385+
}

google/cloud/gkemulticloud/v1/attached_service.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,9 @@ message GenerateAttachedClusterAgentTokenRequest {
490490
}
491491

492492
message GenerateAttachedClusterAgentTokenResponse {
493-
string access_token = 1;
493+
string access_token = 1 [json_name = "access_token"];
494494

495-
int32 expires_in = 2;
495+
int32 expires_in = 2 [json_name = "expires_in"];
496496

497-
string token_type = 3;
497+
string token_type = 3 [json_name = "token_type"];
498498
}

0 commit comments

Comments
 (0)