Skip to content

Commit 9a294bf

Browse files
Google APIscopybara-github
authored andcommitted
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: 498249600
1 parent 3b5011d commit 9a294bf

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

google/container/v1/cluster_service.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,11 @@ message Cluster {
17811781
// Node pool configs that apply to all auto-provisioned node pools
17821782
// in autopilot clusters and node auto-provisioning enabled clusters.
17831783
NodePoolAutoConfig node_pool_auto_config = 136;
1784+
1785+
// This checksum is computed by the server based on the value of cluster
1786+
// fields, and may be sent on update requests to ensure the client has an
1787+
// up-to-date value before proceeding.
1788+
string etag = 139;
17841789
}
17851790

17861791
// Node pool configs that apply to all auto-provisioned node pools
@@ -1979,6 +1984,11 @@ message ClusterUpdate {
19791984
// The desired config of Gateway API on this cluster.
19801985
GatewayAPIConfig desired_gateway_api_config = 114;
19811986

1987+
// The current etag of the cluster.
1988+
// If an etag is provided and does not match the current etag of the cluster,
1989+
// update will be blocked and an ABORTED error will be returned.
1990+
string etag = 115;
1991+
19821992
// The desired node pool logging configuration defaults for the cluster.
19831993
NodePoolLoggingConfig desired_node_pool_logging_config = 116;
19841994

@@ -2321,6 +2331,11 @@ message UpdateNodePoolRequest {
23212331
// Enable or disable gvnic on the node pool.
23222332
VirtualNIC gvnic = 29;
23232333

2334+
// The current etag of the node pool.
2335+
// If an etag is provided and does not match the current etag of the node
2336+
// pool, update will be blocked and an ABORTED error will be returned.
2337+
string etag = 30;
2338+
23242339
// Enable or disable NCCL fast socket for the node pool.
23252340
FastSocket fast_socket = 31;
23262341

@@ -3129,6 +3144,11 @@ message NodePool {
31293144
// Output only. [Output only] Update info contains relevant information during a node
31303145
// pool update.
31313146
UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY];
3147+
3148+
// This checksum is computed by the server based on the value of node pool
3149+
// fields, and may be sent on update requests to ensure the client has an
3150+
// up-to-date value before proceeding.
3151+
string etag = 110;
31323152
}
31333153

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

0 commit comments

Comments
 (0)