Skip to content

Commit 961d1ee

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add field for enabled Beta K8s APIs in proto
--- feat: add etags for cluster and node pool update operations Clients may now optionally specify the previously read etag for a cluster or node pool during update requests. The etag is regenerated every time the object is updated. If an etag is provided, it will be checked against the current etag, and the request will be rejected on mismatch. This is particularly useful for allowing two clients to concurrently update a repeated field without overwriting each other. PiperOrigin-RevId: 500787735
1 parent 517c248 commit 961d1ee

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

google/container/v1beta1/cluster_service.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,11 @@ message Cluster {
19611961

19621962
// Enable/Disable Protect API features for the cluster.
19631963
optional ProtectConfig protect_config = 137;
1964+
1965+
// This checksum is computed by the server based on the value of cluster
1966+
// fields, and may be sent on update requests to ensure the client has an
1967+
// up-to-date value before proceeding.
1968+
string etag = 139;
19641969
}
19651970

19661971
// WorkloadConfig defines the flags to enable or disable the
@@ -2234,6 +2239,11 @@ message ClusterUpdate {
22342239
// The desired config of Gateway API on this cluster.
22352240
GatewayAPIConfig desired_gateway_api_config = 114;
22362241

2242+
// The current etag of the cluster.
2243+
// If an etag is provided and does not match the current etag of the cluster,
2244+
// update will be blocked and an ABORTED error will be returned.
2245+
string etag = 115;
2246+
22372247
// The desired node pool logging configuration defaults for the cluster.
22382248
NodePoolLoggingConfig desired_node_pool_logging_config = 116;
22392249

@@ -2612,6 +2622,11 @@ message UpdateNodePoolRequest {
26122622
// Enable or disable gvnic on the node pool.
26132623
VirtualNIC gvnic = 29;
26142624

2625+
// The current etag of the node pool.
2626+
// If an etag is provided and does not match the current etag of the node
2627+
// pool, update will be blocked and an ABORTED error will be returned.
2628+
string etag = 30;
2629+
26152630
// Enable or disable NCCL fast socket for the node pool.
26162631
FastSocket fast_socket = 31;
26172632

@@ -3609,6 +3624,11 @@ message NodePool {
36093624
// Output only. [Output only] Update info contains relevant information during a node
36103625
// pool update.
36113626
UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY];
3627+
3628+
// This checksum is computed by the server based on the value of node pool
3629+
// fields, and may be sent on update requests to ensure the client has an
3630+
// up-to-date value before proceeding.
3631+
string etag = 110;
36123632
}
36133633

36143634
// NodeManagement defines the set of node management services turned on for the

0 commit comments

Comments
 (0)