Skip to content

Commit

Permalink
feat: add support for disabling pod IP cidr overprovision (#363)
Browse files Browse the repository at this point in the history
* 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: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDdlZTE2YzEwNWFkZTYxMGI2OGJmZmMyOGIwYzIyNDNlYmEwOGE0NCJ9

* 🦉 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: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZlNjk2MmY5YzhlNzcwMzk2ZGNmYzg4ZTEwNGU1ZDcxM2MyZTY2ZSJ9

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 6, 2023
1 parent 537173a commit be00d17
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
NotificationConfig,
Operation,
OperationProgress,
PodCIDROverprovisionConfig,
PrivateClusterConfig,
PrivateClusterMasterGlobalAccessConfig,
PrivateIPv6GoogleAccess,
Expand Down Expand Up @@ -274,6 +275,7 @@
"NotificationConfig",
"Operation",
"OperationProgress",
"PodCIDROverprovisionConfig",
"PrivateClusterConfig",
"PrivateClusterMasterGlobalAccessConfig",
"RecurringTimeWindow",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
NotificationConfig,
Operation,
OperationProgress,
PodCIDROverprovisionConfig,
PrivateClusterConfig,
PrivateClusterMasterGlobalAccessConfig,
PrivateIPv6GoogleAccess,
Expand Down Expand Up @@ -272,6 +273,7 @@
"NotificationConfig",
"Operation",
"OperationProgress",
"PodCIDROverprovisionConfig",
"PrivateClusterConfig",
"PrivateClusterMasterGlobalAccessConfig",
"PrivateIPv6GoogleAccess",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
NotificationConfig,
Operation,
OperationProgress,
PodCIDROverprovisionConfig,
PrivateClusterConfig,
PrivateClusterMasterGlobalAccessConfig,
PrivateIPv6GoogleAccess,
Expand Down Expand Up @@ -261,6 +262,7 @@
"NotificationConfig",
"Operation",
"OperationProgress",
"PodCIDROverprovisionConfig",
"PrivateClusterConfig",
"PrivateClusterMasterGlobalAccessConfig",
"RecurringTimeWindow",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"LegacyAbac",
"NetworkPolicy",
"BinaryAuthorization",
"PodCIDROverprovisionConfig",
"IPAllocationPolicy",
"Cluster",
"NodePoolAutoConfig",
Expand Down Expand Up @@ -896,6 +897,20 @@ class NodeNetworkConfig(proto.Message):
Network bandwidth tier configuration.
This field is a member of `oneof`_ ``_network_performance_config``.
pod_cidr_overprovision_config (google.cloud.container_v1.types.PodCIDROverprovisionConfig):
[PRIVATE FIELD] Pod CIDR size overprovisioning config for
the nodepool.
Pod CIDR size per node depends on max_pods_per_node. By
default, the value of max_pods_per_node is rounded off to
next power of 2 and we then double that to get the size of
pod CIDR block per node. Example: max_pods_per_node of 30
would result in 64 IPs (/26).
This config can disable the doubling of IPs (we still round
off to next power of 2) Example: max_pods_per_node of 30
will result in 32 IPs (/27) when overprovisioning is
disabled.
"""

class NetworkPerformanceConfig(proto.Message):
Expand Down Expand Up @@ -954,6 +969,11 @@ class Tier(proto.Enum):
optional=True,
message=NetworkPerformanceConfig,
)
pod_cidr_overprovision_config: "PodCIDROverprovisionConfig" = proto.Field(
proto.MESSAGE,
number=13,
message="PodCIDROverprovisionConfig",
)


class ShieldedInstanceConfig(proto.Message):
Expand Down Expand Up @@ -1847,6 +1867,22 @@ class EvaluationMode(proto.Enum):
)


class PodCIDROverprovisionConfig(proto.Message):
r"""[PRIVATE FIELD] Config for pod CIDR size overprovisioning.
Attributes:
disable (bool):
Whether Pod CIDR overprovisioning is
disabled. Note: Pod CIDR overprovisioning is
enabled by default.
"""

disable: bool = proto.Field(
proto.BOOL,
number=1,
)


class IPAllocationPolicy(proto.Message):
r"""Configuration for controlling how IPs are allocated in the
cluster.
Expand Down Expand Up @@ -1970,6 +2006,20 @@ class IPAllocationPolicy(proto.Message):
ipv6_access_type (google.cloud.container_v1.types.IPv6AccessType):
The ipv6 access type (internal or external) when
create_subnetwork is true
pod_cidr_overprovision_config (google.cloud.container_v1.types.PodCIDROverprovisionConfig):
[PRIVATE FIELD] Pod CIDR size overprovisioning config for
the cluster.
Pod CIDR size per node depends on max_pods_per_node. By
default, the value of max_pods_per_node is doubled and then
rounded off to next power of 2 to get the size of pod CIDR
block per node. Example: max_pods_per_node of 30 would
result in 64 IPs (/26).
This config can disable the doubling of IPs (we still round
off to next power of 2) Example: max_pods_per_node of 30
will result in 32 IPs (/27) when overprovisioning is
disabled.
subnet_ipv6_cidr_block (str):
Output only. [Output only] The subnet's IPv6 CIDR block used
by nodes and pods.
Expand Down Expand Up @@ -2040,6 +2090,11 @@ class IPAllocationPolicy(proto.Message):
number=17,
enum="IPv6AccessType",
)
pod_cidr_overprovision_config: "PodCIDROverprovisionConfig" = proto.Field(
proto.MESSAGE,
number=21,
message="PodCIDROverprovisionConfig",
)
subnet_ipv6_cidr_block: str = proto.Field(
proto.STRING,
number=22,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
NotificationConfig,
Operation,
OperationProgress,
PodCIDROverprovisionConfig,
PodSecurityPolicyConfig,
PrivateClusterConfig,
PrivateClusterMasterGlobalAccessConfig,
Expand Down Expand Up @@ -293,6 +294,7 @@
"NotificationConfig",
"Operation",
"OperationProgress",
"PodCIDROverprovisionConfig",
"PodSecurityPolicyConfig",
"PrivateClusterConfig",
"PrivateClusterMasterGlobalAccessConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
NotificationConfig,
Operation,
OperationProgress,
PodCIDROverprovisionConfig,
PodSecurityPolicyConfig,
PrivateClusterConfig,
PrivateClusterMasterGlobalAccessConfig,
Expand Down Expand Up @@ -283,6 +284,7 @@
"NotificationConfig",
"Operation",
"OperationProgress",
"PodCIDROverprovisionConfig",
"PodSecurityPolicyConfig",
"PrivateClusterConfig",
"PrivateClusterMasterGlobalAccessConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"MasterAuthorizedNetworksConfig",
"LegacyAbac",
"NetworkPolicy",
"PodCIDROverprovisionConfig",
"IPAllocationPolicy",
"BinaryAuthorization",
"PodSecurityPolicyConfig",
Expand Down Expand Up @@ -902,6 +903,20 @@ class NodeNetworkConfig(proto.Message):
Network bandwidth tier configuration.
This field is a member of `oneof`_ ``_network_performance_config``.
pod_cidr_overprovision_config (google.cloud.container_v1beta1.types.PodCIDROverprovisionConfig):
[PRIVATE FIELD] Pod CIDR size overprovisioning config for
the nodepool.
Pod CIDR size per node depends on max_pods_per_node. By
default, the value of max_pods_per_node is rounded off to
next power of 2 and we then double that to get the size of
pod CIDR block per node. Example: max_pods_per_node of 30
would result in 64 IPs (/26).
This config can disable the doubling of IPs (we still round
off to next power of 2) Example: max_pods_per_node of 30
will result in 32 IPs (/27) when overprovisioning is
disabled.
"""

class NetworkPerformanceConfig(proto.Message):
Expand Down Expand Up @@ -972,6 +987,11 @@ class Tier(proto.Enum):
optional=True,
message=NetworkPerformanceConfig,
)
pod_cidr_overprovision_config: "PodCIDROverprovisionConfig" = proto.Field(
proto.MESSAGE,
number=13,
message="PodCIDROverprovisionConfig",
)


class ShieldedInstanceConfig(proto.Message):
Expand Down Expand Up @@ -1933,6 +1953,22 @@ class Provider(proto.Enum):
)


class PodCIDROverprovisionConfig(proto.Message):
r"""[PRIVATE FIELD] Config for pod CIDR size overprovisioning.
Attributes:
disable (bool):
Whether Pod CIDR overprovisioning is
disabled. Note: Pod CIDR overprovisioning is
enabled by default.
"""

disable: bool = proto.Field(
proto.BOOL,
number=1,
)


class IPAllocationPolicy(proto.Message):
r"""Configuration for controlling how IPs are allocated in the
cluster.
Expand Down Expand Up @@ -2075,6 +2111,20 @@ class IPAllocationPolicy(proto.Message):
ipv6_access_type (google.cloud.container_v1beta1.types.IPAllocationPolicy.IPv6AccessType):
The ipv6 access type (internal or external) when
create_subnetwork is true
pod_cidr_overprovision_config (google.cloud.container_v1beta1.types.PodCIDROverprovisionConfig):
[PRIVATE FIELD] Pod CIDR size overprovisioning config for
the cluster.
Pod CIDR size per node depends on max_pods_per_node. By
default, the value of max_pods_per_node is doubled and then
rounded off to next power of 2 to get the size of pod CIDR
block per node. Example: max_pods_per_node of 30 would
result in 64 IPs (/26).
This config can disable the doubling of IPs (we still round
off to next power of 2) Example: max_pods_per_node of 30
will result in 32 IPs (/27) when overprovisioning is
disabled.
subnet_ipv6_cidr_block (str):
Output only. [Output only] The subnet's IPv6 CIDR block used
by nodes and pods.
Expand Down Expand Up @@ -2183,6 +2233,11 @@ class IPv6AccessType(proto.Enum):
number=17,
enum=IPv6AccessType,
)
pod_cidr_overprovision_config: "PodCIDROverprovisionConfig" = proto.Field(
proto.MESSAGE,
number=21,
message="PodCIDROverprovisionConfig",
)
subnet_ipv6_cidr_block: str = proto.Field(
proto.STRING,
number=22,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-container",
"version": "2.18.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-container",
"version": "2.18.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit be00d17

Please sign in to comment.