Skip to content

Commit 65e1270

Browse files
feat: [container] Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters (#4154)
* feat: add update support for accelerator config feat: add support for disabling pod IP cidr overprovision. This feature requires special allowlisting for the projects. PiperOrigin-RevId: 522103275 Source-Link: googleapis/googleapis@9f6f02b Source-Link: googleapis/googleapis-gen@47ee16c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiNDdlZTE2YzEwNWFkZTYxMGI2OGJmZmMyOGIwYzIyNDNlYmEwOGE0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add support for disabling pod IP cidr overprovision This feature requires special allowlisting for the projects. PiperOrigin-RevId: 522103451 Source-Link: googleapis/googleapis@013b597 Source-Link: googleapis/googleapis-gen@2fe6962 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiMmZlNjk2MmY5YzhlNzcwMzk2ZGNmYzg4ZTEwNGU1ZDcxM2MyZTY2ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters Users can append more pod ranges by name to an existing cluster at the cluster level. When users or Node Auto-provisioning create new node pools, GKE will select the most available pod range and assign it to the node pool. These pod ranges can be removed once no node pool is using it. PiperOrigin-RevId: 522620905 Source-Link: googleapis/googleapis@0b7078e Source-Link: googleapis/googleapis-gen@13d50d1 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiMTNkNTBkMWY1NjU0OTdhNjU0MzI3ZmNiODFjNzk1OWM1YzFmMDU4YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters Users can append more pod ranges by name to an existing cluster at the cluster level. When users or Node Auto-provisioning create new node pools, GKE will select the most available pod range and assign it to the node pool. These pod ranges can be removed once no node pool is using it. PiperOrigin-RevId: 522620935 Source-Link: googleapis/googleapis@2ddfcb8 Source-Link: googleapis/googleapis-gen@8c7eccd Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiOGM3ZWNjZDA5N2I3OTg5ZDcyY2FlOTU1ZmFmNWVkOGUzZmRjYmM3NSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 8feed0b commit 65e1270

5 files changed

Lines changed: 1652 additions & 0 deletions

File tree

packages/google-container/protos/google/container/v1/cluster_service.proto

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,20 @@ message NodeNetworkConfig {
891891

892892
// Network bandwidth tier configuration.
893893
optional NetworkPerformanceConfig network_performance_config = 11;
894+
895+
// [PRIVATE FIELD]
896+
// Pod CIDR size overprovisioning config for the nodepool.
897+
//
898+
// Pod CIDR size per node depends on max_pods_per_node. By default, the value
899+
// of max_pods_per_node is rounded off to next power of 2 and we then double
900+
// that to get the size of pod CIDR block per node.
901+
// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
902+
//
903+
// This config can disable the doubling of IPs (we still round off to next
904+
// power of 2)
905+
// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
906+
// overprovisioning is disabled.
907+
PodCIDROverprovisionConfig pod_cidr_overprovision_config = 13;
894908
}
895909

896910
// A set of Shielded Instance options.
@@ -1334,6 +1348,14 @@ message BinaryAuthorization {
13341348
EvaluationMode evaluation_mode = 2;
13351349
}
13361350

1351+
// [PRIVATE FIELD]
1352+
// Config for pod CIDR size overprovisioning.
1353+
message PodCIDROverprovisionConfig {
1354+
// Whether Pod CIDR overprovisioning is disabled.
1355+
// Note: Pod CIDR overprovisioning is enabled by default.
1356+
bool disable = 1;
1357+
}
1358+
13371359
// Configuration for controlling how IPs are allocated in the cluster.
13381360
message IPAllocationPolicy {
13391361
// Whether alias IPs will be used for pod IPs in the cluster.
@@ -1458,6 +1480,20 @@ message IPAllocationPolicy {
14581480
// The ipv6 access type (internal or external) when create_subnetwork is true
14591481
IPv6AccessType ipv6_access_type = 17;
14601482

1483+
// [PRIVATE FIELD]
1484+
// Pod CIDR size overprovisioning config for the cluster.
1485+
//
1486+
// Pod CIDR size per node depends on max_pods_per_node. By default, the value
1487+
// of max_pods_per_node is doubled and then rounded off to next power of 2 to
1488+
// get the size of pod CIDR block per node.
1489+
// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
1490+
//
1491+
// This config can disable the doubling of IPs (we still round off to next
1492+
// power of 2)
1493+
// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
1494+
// overprovisioning is disabled.
1495+
PodCIDROverprovisionConfig pod_cidr_overprovision_config = 21;
1496+
14611497
// Output only. [Output only] The subnet's IPv6 CIDR block used by nodes and
14621498
// pods.
14631499
string subnet_ipv6_cidr_block = 22
@@ -1466,6 +1502,13 @@ message IPAllocationPolicy {
14661502
// Output only. [Output only] The services IPv6 CIDR block for the cluster.
14671503
string services_ipv6_cidr_block = 23
14681504
[(google.api.field_behavior) = OUTPUT_ONLY];
1505+
1506+
// Output only. [Output only] The additional pod ranges that are added to the
1507+
// cluster. These pod ranges can be used by new node pools to allocate pod IPs
1508+
// automatically. Once the range is removed it will not show up in
1509+
// IPAllocationPolicy.
1510+
AdditionalPodRangesConfig additional_pod_ranges_config = 24
1511+
[(google.api.field_behavior) = OUTPUT_ONLY];
14691512
}
14701513

14711514
// A Google Kubernetes Engine cluster.
@@ -2026,8 +2069,21 @@ message ClusterUpdate {
20262069
// If a stack type is provided and does not match the current stack type of
20272070
// the cluster, update will attempt to change the stack type to the new type.
20282071
StackType desired_stack_type = 119;
2072+
2073+
// The additional pod ranges to be added to the cluster. These pod ranges
2074+
// can be used by node pools to allocate pod IPs.
2075+
AdditionalPodRangesConfig additional_pod_ranges_config = 120;
2076+
2077+
// The additional pod ranges that are to be removed from the cluster.
2078+
// The pod ranges specified here must have been specified earlier in the
2079+
// 'additional_pod_ranges_config' argument.
2080+
AdditionalPodRangesConfig removed_additional_pod_ranges_config = 121;
20292081
}
20302082

2083+
// AdditionalPodRangesConfig is the configuration for additional pod secondary
2084+
// ranges supporting the ClusterUpdate message.
2085+
message AdditionalPodRangesConfig {}
2086+
20312087
// This operation resource represents operations that may have happened or are
20322088
// happening on the cluster. All fields are output only.
20332089
message Operation {

packages/google-container/protos/google/container/v1beta1/cluster_service.proto

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,20 @@ message NodeNetworkConfig {
892892

893893
// Network bandwidth tier configuration.
894894
optional NetworkPerformanceConfig network_performance_config = 11;
895+
896+
// [PRIVATE FIELD]
897+
// Pod CIDR size overprovisioning config for the nodepool.
898+
//
899+
// Pod CIDR size per node depends on max_pods_per_node. By default, the value
900+
// of max_pods_per_node is rounded off to next power of 2 and we then double
901+
// that to get the size of pod CIDR block per node.
902+
// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
903+
//
904+
// This config can disable the doubling of IPs (we still round off to next
905+
// power of 2)
906+
// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
907+
// overprovisioning is disabled.
908+
PodCIDROverprovisionConfig pod_cidr_overprovision_config = 13;
895909
}
896910

897911
// A set of Shielded Instance options.
@@ -1367,6 +1381,14 @@ message NetworkPolicy {
13671381
bool enabled = 2;
13681382
}
13691383

1384+
// [PRIVATE FIELD]
1385+
// Config for pod CIDR size overprovisioning.
1386+
message PodCIDROverprovisionConfig {
1387+
// Whether Pod CIDR overprovisioning is disabled.
1388+
// Note: Pod CIDR overprovisioning is enabled by default.
1389+
bool disable = 1;
1390+
}
1391+
13701392
// Configuration for controlling how IPs are allocated in the cluster.
13711393
message IPAllocationPolicy {
13721394
// Possible values for IP stack type
@@ -1530,6 +1552,20 @@ message IPAllocationPolicy {
15301552
// The ipv6 access type (internal or external) when create_subnetwork is true
15311553
IPv6AccessType ipv6_access_type = 17;
15321554

1555+
// [PRIVATE FIELD]
1556+
// Pod CIDR size overprovisioning config for the cluster.
1557+
//
1558+
// Pod CIDR size per node depends on max_pods_per_node. By default, the value
1559+
// of max_pods_per_node is doubled and then rounded off to next power of 2 to
1560+
// get the size of pod CIDR block per node.
1561+
// Example: max_pods_per_node of 30 would result in 64 IPs (/26).
1562+
//
1563+
// This config can disable the doubling of IPs (we still round off to next
1564+
// power of 2)
1565+
// Example: max_pods_per_node of 30 will result in 32 IPs (/27) when
1566+
// overprovisioning is disabled.
1567+
PodCIDROverprovisionConfig pod_cidr_overprovision_config = 21;
1568+
15331569
// Output only. [Output only] The subnet's IPv6 CIDR block used by nodes and
15341570
// pods.
15351571
string subnet_ipv6_cidr_block = 22
@@ -1538,6 +1574,13 @@ message IPAllocationPolicy {
15381574
// Output only. [Output only] The services IPv6 CIDR block for the cluster.
15391575
string services_ipv6_cidr_block = 23
15401576
[(google.api.field_behavior) = OUTPUT_ONLY];
1577+
1578+
// Output only. [Output only] The additional pod ranges that are added to the
1579+
// cluster. These pod ranges can be used by new node pools to allocate pod IPs
1580+
// automatically. Once the range is removed it will not show up in
1581+
// IPAllocationPolicy.
1582+
AdditionalPodRangesConfig additional_pod_ranges_config = 24
1583+
[(google.api.field_behavior) = OUTPUT_ONLY];
15411584
}
15421585

15431586
// Configuration for Binary Authorization.
@@ -2277,8 +2320,21 @@ message ClusterUpdate {
22772320
// If a stack type is provided and does not match the current stack type of
22782321
// the cluster, update will attempt to change the stack type to the new type.
22792322
StackType desired_stack_type = 119;
2323+
2324+
// The additional pod ranges to be added to the cluster. These pod ranges
2325+
// can be used by node pools to allocate pod IPs.
2326+
AdditionalPodRangesConfig additional_pod_ranges_config = 120;
2327+
2328+
// The additional pod ranges that are to be removed from the cluster.
2329+
// The pod ranges specified here must have been specified earlier in the
2330+
// 'additional_pod_ranges_config' argument.
2331+
AdditionalPodRangesConfig removed_additional_pod_ranges_config = 121;
22802332
}
22812333

2334+
// AdditionalPodRangesConfig is the configuration for additional pod secondary
2335+
// ranges supporting the ClusterUpdate message.
2336+
message AdditionalPodRangesConfig {}
2337+
22822338
// This operation resource represents operations that may have happened or are
22832339
// happening on the cluster. All fields are output only.
22842340
message Operation {

0 commit comments

Comments
 (0)