Skip to content

Commit 83fd1f9

Browse files
Google APIscopybara-github
authored andcommitted
docs: Operation.Type is now documented in detail
docs: Operation.self_link and Operation.target_link given examples feat: Cluster resizes will now have their own operation type (RESIZE_CLUSTER) instead of reusing REPAIR_CLUSTER; they will start using this in the near future PiperOrigin-RevId: 526970355
1 parent ab4ba82 commit 83fd1f9

1 file changed

Lines changed: 109 additions & 28 deletions

File tree

google/container/v1beta1/cluster_service.proto

Lines changed: 109 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,58 +2359,126 @@ message Operation {
23592359
ABORTING = 4;
23602360
}
23612361

2362-
// Operation type.
2362+
// Operation type categorizes the operation.
23632363
enum Type {
23642364
// Not set.
23652365
TYPE_UNSPECIFIED = 0;
23662366

2367-
// Cluster create.
2367+
// The cluster is being created. The cluster should be assumed to be
2368+
// unusable until the operation finishes.
2369+
//
2370+
// In the event of the operation failing, the cluster will enter the [ERROR
2371+
// state][Cluster.Status.ERROR] and eventually be deleted.
23682372
CREATE_CLUSTER = 1;
23692373

2370-
// Cluster delete.
2374+
// The cluster is being deleted. The cluster should be assumed to be
2375+
// unusable as soon as this operation starts.
2376+
//
2377+
// In the event of the operation failing, the cluster will enter the [ERROR
2378+
// state][Cluster.Status.ERROR] and the deletion will be automatically
2379+
// retried until completed.
23712380
DELETE_CLUSTER = 2;
23722381

2373-
// A master upgrade.
2382+
// The [cluster
2383+
// version][google.container.v1beta1.ClusterUpdate.desired_master_version]
2384+
// is being updated. Note that this includes "upgrades" to the same version,
2385+
// which are simply a recreation. This also includes
2386+
// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically).
2387+
// For more details, see [documentation on cluster
2388+
// upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades).
23742389
UPGRADE_MASTER = 3;
23752390

2376-
// A node upgrade.
2391+
// A node pool is being updated. Despite calling this an "upgrade", this
2392+
// includes most forms of updates to node pools. This also includes
2393+
// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades).
2394+
//
2395+
// This operation sets the
2396+
// [progress][google.container.v1beta1.Operation.progress] field and may be
2397+
// [canceled][google.container.v1beta1.ClusterManager.CancelOperation].
2398+
//
2399+
// The upgrade strategy depends on [node pool
2400+
// configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies).
2401+
// The nodes are generally still usable during this operation.
23772402
UPGRADE_NODES = 4;
23782403

2379-
// Cluster repair.
2404+
// A problem has been detected with the control plane and is being repaired.
2405+
// This operation type is initiated by GKE. For more details, see
2406+
// [documentation on
2407+
// repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
23802408
REPAIR_CLUSTER = 5;
23812409

2382-
// Cluster update.
2410+
// The cluster is being updated. This is a broad category of operations and
2411+
// includes operations that only change metadata as well as those that must
2412+
// recreate the entire cluster. If the control plane must be recreated, this
2413+
// will cause temporary downtime for zonal clusters.
2414+
//
2415+
// Some features require recreating the nodes as well. Those will be
2416+
// recreated as separate operations and the update may not be completely
2417+
// functional until the node pools recreations finish. Node recreations will
2418+
// generally follow [maintenance
2419+
// policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions).
2420+
//
2421+
// Some GKE-initiated operations use this type. This includes certain types
2422+
// of auto-upgrades and incident mitigations.
23832423
UPDATE_CLUSTER = 6;
23842424

2385-
// Node pool create.
2425+
// A node pool is being created. The node pool should be assumed to be
2426+
// unusable until this operation finishes. In the event of an error, the
2427+
// node pool may be partially created.
2428+
//
2429+
// If enabled, [node
2430+
// autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning)
2431+
// may have automatically initiated such operations.
23862432
CREATE_NODE_POOL = 7;
23872433

2388-
// Node pool delete.
2434+
// The node pool is being deleted. The node pool should be assumed to be
2435+
// unusable as soon as this operation starts.
23892436
DELETE_NODE_POOL = 8;
23902437

2391-
// Set node pool management.
2438+
// The node pool's
2439+
// [manamagent][google.container.v1beta1.NodePool.management] field is being
2440+
// updated. These operations only update metadata and may be concurrent with
2441+
// most other operations.
23922442
SET_NODE_POOL_MANAGEMENT = 9;
23932443

2394-
// Automatic node pool repair.
2444+
// A problem has been detected with nodes and [they are being
2445+
// repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair).
2446+
// This operation type is initiated by GKE, typically automatically. This
2447+
// operation may be concurrent with other operations and there may be
2448+
// multiple repairs occurring on the same node pool.
23952449
AUTO_REPAIR_NODES = 10;
23962450

2397-
// Automatic node upgrade.
2398-
AUTO_UPGRADE_NODES = 11;
2451+
// Unused. Automatic node upgrade uses
2452+
// [UPGRADE_NODES][google.container.v1beta1.Operation.Type.UPGRADE_NODES].
2453+
AUTO_UPGRADE_NODES = 11 [deprecated = true];
23992454

2400-
// Set labels.
2401-
SET_LABELS = 12;
2455+
// Unused. Updating labels uses
2456+
// [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER].
2457+
SET_LABELS = 12 [deprecated = true];
24022458

2403-
// Set/generate master auth materials
2404-
SET_MASTER_AUTH = 13;
2459+
// Unused. Updating master auth uses
2460+
// [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER].
2461+
SET_MASTER_AUTH = 13 [deprecated = true];
24052462

2406-
// Set node pool size.
2463+
// The node pool is being resized. With the exception of resizing to or from
2464+
// size zero, the node pool is generally usable during this operation.
24072465
SET_NODE_POOL_SIZE = 14;
24082466

2409-
// Updates network policy for a cluster.
2410-
SET_NETWORK_POLICY = 15;
2411-
2412-
// Set the maintenance policy.
2413-
SET_MAINTENANCE_POLICY = 16;
2467+
// Unused. Updating network policy uses
2468+
// [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER].
2469+
SET_NETWORK_POLICY = 15 [deprecated = true];
2470+
2471+
// Unused. Updating maintenance policy uses
2472+
// [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER].
2473+
SET_MAINTENANCE_POLICY = 16 [deprecated = true];
2474+
2475+
// The control plane is being resized. This operation type is initiated by
2476+
// GKE. These operations are often performed preemptively to ensure that the
2477+
// control plane has sufficient resources and is not typically an indication
2478+
// of issues. For more details, see
2479+
// [documentation on
2480+
// resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
2481+
RESIZE_CLUSTER = 18;
24142482
}
24152483

24162484
// The server-assigned ID for the operation.
@@ -2435,10 +2503,23 @@ message Operation {
24352503
string status_message = 5
24362504
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
24372505

2438-
// Server-defined URL for the resource.
2506+
// Server-defined URI for the operation. Example:
2507+
// `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.
24392508
string self_link = 6;
24402509

2441-
// Server-defined URL for the target of the operation.
2510+
// Server-defined URI for the target of the operation. The format of this is a
2511+
// URI to the resource being modified (such as a cluster, node pool, or node).
2512+
// For node pool repairs, there may be multiple nodes being repaired, but only
2513+
// one will be the target.
2514+
//
2515+
// Examples:
2516+
//
2517+
// -
2518+
// `https://container.googleapis.com/v1beta1/projects/123/locations/us-central1/clusters/my-cluster`
2519+
// -
2520+
// `https://container.googleapis.com/v1beta1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np`
2521+
// -
2522+
// `https://container.googleapis.com/v1beta1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`
24422523
string target_link = 7;
24432524

24442525
// [Output only] The name of the Google Compute Engine
@@ -4683,12 +4764,12 @@ message DatabaseEncryption {
46834764
DECRYPTED = 2;
46844765
}
46854766

4686-
// Denotes the state of etcd encryption.
4687-
State state = 2;
4688-
46894767
// Name of CloudKMS key to use for the encryption of secrets in etcd.
46904768
// Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key
46914769
string key_name = 1;
4770+
4771+
// The desired state of etcd encryption.
4772+
State state = 2;
46924773
}
46934774

46944775
// Configuration for exporting cluster resource usages.

0 commit comments

Comments
 (0)