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
pull/767/head
Google APIs 2 years ago committed by Copybara-Service
parent 3b5011d865
commit 9a294bf14b
  1. 20
      google/container/v1/cluster_service.proto

@ -1781,6 +1781,11 @@ message Cluster {
// Node pool configs that apply to all auto-provisioned node pools
// in autopilot clusters and node auto-provisioning enabled clusters.
NodePoolAutoConfig node_pool_auto_config = 136;
// This checksum is computed by the server based on the value of cluster
// fields, and may be sent on update requests to ensure the client has an
// up-to-date value before proceeding.
string etag = 139;
}
// Node pool configs that apply to all auto-provisioned node pools
@ -1979,6 +1984,11 @@ message ClusterUpdate {
// The desired config of Gateway API on this cluster.
GatewayAPIConfig desired_gateway_api_config = 114;
// The current etag of the cluster.
// If an etag is provided and does not match the current etag of the cluster,
// update will be blocked and an ABORTED error will be returned.
string etag = 115;
// The desired node pool logging configuration defaults for the cluster.
NodePoolLoggingConfig desired_node_pool_logging_config = 116;
@ -2321,6 +2331,11 @@ message UpdateNodePoolRequest {
// Enable or disable gvnic on the node pool.
VirtualNIC gvnic = 29;
// The current etag of the node pool.
// If an etag is provided and does not match the current etag of the node
// pool, update will be blocked and an ABORTED error will be returned.
string etag = 30;
// Enable or disable NCCL fast socket for the node pool.
FastSocket fast_socket = 31;
@ -3129,6 +3144,11 @@ message NodePool {
// Output only. [Output only] Update info contains relevant information during a node
// pool update.
UpdateInfo update_info = 109 [(google.api.field_behavior) = OUTPUT_ONLY];
// This checksum is computed by the server based on the value of node pool
// fields, and may be sent on update requests to ensure the client has an
// up-to-date value before proceeding.
string etag = 110;
}
// NodeManagement defines the set of node management services turned on for the

Loading…
Cancel
Save