Skip to content

Commit 4273180

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: 526025502
1 parent 395f68f commit 4273180

1 file changed

Lines changed: 108 additions & 28 deletions

File tree

google/container/v1/cluster_service.proto

Lines changed: 108 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,58 +2108,125 @@ message Operation {
21082108
ABORTING = 4;
21092109
}
21102110

2111-
// Operation type.
2111+
// Operation type categorizes the operation.
21122112
enum Type {
21132113
// Not set.
21142114
TYPE_UNSPECIFIED = 0;
21152115

2116-
// Cluster create.
2116+
// The cluster is being created. The cluster should be assumed to be
2117+
// unusable until the operation finishes.
2118+
//
2119+
// In the event of the operation failing, the cluster will enter the [ERROR
2120+
// state][Cluster.Status.ERROR] and eventually be deleted.
21172121
CREATE_CLUSTER = 1;
21182122

2119-
// Cluster delete.
2123+
// The cluster is being deleted. The cluster should be assumed to be
2124+
// unusable as soon as this operation starts.
2125+
//
2126+
// In the event of the operation failing, the cluster will enter the [ERROR
2127+
// state][Cluster.Status.ERROR] and the deletion will be automatically
2128+
// retried until completed.
21202129
DELETE_CLUSTER = 2;
21212130

2122-
// A master upgrade.
2131+
// The [cluster
2132+
// version][google.container.v1.ClusterUpdate.desired_master_version] is
2133+
// being updated. Note that this includes "upgrades" to the same version,
2134+
// which are simply a recreation. This also includes
2135+
// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically).
2136+
// For more details, see [documentation on cluster
2137+
// upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades).
21232138
UPGRADE_MASTER = 3;
21242139

2125-
// A node upgrade.
2140+
// A node pool is being updated. Despite calling this an "upgrade", this
2141+
// includes most forms of updates to node pools. This also includes
2142+
// [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades).
2143+
//
2144+
// This operation sets the
2145+
// [progress][google.container.v1.Operation.progress] field and may be
2146+
// [canceled][google.container.v1.ClusterManager.CancelOperation].
2147+
//
2148+
// The upgrade strategy depends on [node pool
2149+
// configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies).
2150+
// The nodes are generally still usable during this operation.
21262151
UPGRADE_NODES = 4;
21272152

2128-
// Cluster repair.
2153+
// A problem has been detected with the control plane and is being repaired.
2154+
// This operation type is initiated by GKE. For more details, see
2155+
// [documentation on
2156+
// repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
21292157
REPAIR_CLUSTER = 5;
21302158

2131-
// Cluster update.
2159+
// The cluster is being updated. This is a broad category of operations and
2160+
// includes operations that only change metadata as well as those that must
2161+
// recreate the entire cluster. If the control plane must be recreated, this
2162+
// will cause temporary downtime for zonal clusters.
2163+
//
2164+
// Some features require recreating the nodes as well. Those will be
2165+
// recreated as separate operations and the update may not be completely
2166+
// functional until the node pools recreations finish. Node recreations will
2167+
// generally follow [maintenance
2168+
// policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions).
2169+
//
2170+
// Some GKE-initiated operations use this type. This includes certain types
2171+
// of auto-upgrades and incident mitigations.
21322172
UPDATE_CLUSTER = 6;
21332173

2134-
// Node pool create.
2174+
// A node pool is being created. The node pool should be assumed to be
2175+
// unusable until this operation finishes. In the event of an error, the
2176+
// node pool may be partially created.
2177+
//
2178+
// If enabled, [node
2179+
// autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning)
2180+
// may have automatically initiated such operations.
21352181
CREATE_NODE_POOL = 7;
21362182

2137-
// Node pool delete.
2183+
// The node pool is being deleted. The node pool should be assumed to be
2184+
// unusable as soon as this operation starts.
21382185
DELETE_NODE_POOL = 8;
21392186

2140-
// Set node pool management.
2187+
// The node pool's [manamagent][google.container.v1.NodePool.management]
2188+
// field is being updated. These operations only update metadata and may be
2189+
// concurrent with most other operations.
21412190
SET_NODE_POOL_MANAGEMENT = 9;
21422191

2143-
// Automatic node pool repair.
2192+
// A problem has been detected with nodes and [they are being
2193+
// repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair).
2194+
// This operation type is initiated by GKE, typically automatically. This
2195+
// operation may be concurrent with other operations and there may be
2196+
// multiple repairs occurring on the same node pool.
21442197
AUTO_REPAIR_NODES = 10;
21452198

2146-
// Automatic node upgrade.
2147-
AUTO_UPGRADE_NODES = 11;
2199+
// Unused. Automatic node upgrade uses
2200+
// [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES].
2201+
AUTO_UPGRADE_NODES = 11 [deprecated = true];
21482202

2149-
// Set labels.
2150-
SET_LABELS = 12;
2203+
// Unused. Updating labels uses
2204+
// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
2205+
SET_LABELS = 12 [deprecated = true];
21512206

2152-
// Set/generate master auth materials
2153-
SET_MASTER_AUTH = 13;
2207+
// Unused. Updating master auth uses
2208+
// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
2209+
SET_MASTER_AUTH = 13 [deprecated = true];
21542210

2155-
// Set node pool size.
2211+
// The node pool is being resized. With the exception of resizing to or from
2212+
// size zero, the node pool is generally usable during this operation.
21562213
SET_NODE_POOL_SIZE = 14;
21572214

2158-
// Updates network policy for a cluster.
2159-
SET_NETWORK_POLICY = 15;
2160-
2161-
// Set the maintenance policy.
2162-
SET_MAINTENANCE_POLICY = 16;
2215+
// Unused. Updating network policy uses
2216+
// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
2217+
SET_NETWORK_POLICY = 15 [deprecated = true];
2218+
2219+
// Unused. Updating maintenance policy uses
2220+
// [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER].
2221+
SET_MAINTENANCE_POLICY = 16 [deprecated = true];
2222+
2223+
// The control plane is being resized. This operation type is initiated by
2224+
// GKE. These operations are often performed preemptively to ensure that the
2225+
// control plane has sufficient resources and is not typically an indication
2226+
// of issues. For more details, see
2227+
// [documentation on
2228+
// resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).
2229+
RESIZE_CLUSTER = 18;
21632230
}
21642231

21652232
// The server-assigned ID for the operation.
@@ -2184,10 +2251,23 @@ message Operation {
21842251
string status_message = 5
21852252
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
21862253

2187-
// Server-defined URL for the resource.
2254+
// Server-defined URI for the operation. Example:
2255+
// `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.
21882256
string self_link = 6;
21892257

2190-
// Server-defined URL for the target of the operation.
2258+
// Server-defined URI for the target of the operation. The format of this is a
2259+
// URI to the resource being modified (such as a cluster, node pool, or node).
2260+
// For node pool repairs, there may be multiple nodes being repaired, but only
2261+
// one will be the target.
2262+
//
2263+
// Examples:
2264+
//
2265+
// -
2266+
// `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster`
2267+
// -
2268+
// `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np`
2269+
// -
2270+
// `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`
21912271
string target_link = 7;
21922272

21932273
// [Output only] The name of the Google Compute Engine
@@ -4218,12 +4298,12 @@ message DatabaseEncryption {
42184298
DECRYPTED = 2;
42194299
}
42204300

4221-
// Denotes the state of etcd encryption.
4222-
State state = 2;
4223-
42244301
// Name of CloudKMS key to use for the encryption of secrets in etcd.
42254302
// Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key
42264303
string key_name = 1;
4304+
4305+
// The desired state of etcd encryption.
4306+
State state = 2;
42274307
}
42284308

42294309
// ListUsableSubnetworksRequest requests the list of usable subnetworks

0 commit comments

Comments
 (0)