Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Deprecate cluster-pool-v2beta #25767

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions Documentation/cmdref/cilium-operator-alibabacloud.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Documentation/cmdref/cilium-operator-aws.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Documentation/cmdref/cilium-operator-azure.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Documentation/cmdref/cilium-operator-generic.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Documentation/cmdref/cilium-operator.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 0 additions & 75 deletions Documentation/network/concepts/ipam/cluster-pool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,78 +69,3 @@ You can solve it in two ways:

- Explicitly set ``clusterPoolIPv4PodCIDRList`` to a non-conflicting CIDR
- Use a different CIDR for your nodes

**********************
Cluster Pool v2 (Beta)
**********************

Cluster Pool v2 (Beta) extends the above mechanism to allow additional PodCIDRs
to be dynamically allocated to each node based on usage. With v2, each Cilium
agent instance reports the utilization of its PodCIDRs via the ``CiliumNode``
resource.

If a node is running low on available pod IPs, the operator will assign an
additional PodCIDR to that node. Likewise, if a node has unused PodCIDRs, it
will eventually release it, allowing the operator to re-assign the released
PodCIDR to a different node if needed.

When running v2, the ``CiliumNode`` resource is extended with an additional
PodCIDR status section:

+-------------------------+----------------------------------------------------+
|Field | Description |
+=========================+====================================================+
|``spec.ipam.podCIDRs`` | List of assigned IPv4 and/or IPv6 PodCIDRs |
+-------------------------+----------------------------------------------------+
|``status.ipam.pod-cidrs``| PodCIDR utilization |
| | (one of: ``in-use``, ``depleted``, or ``released``)|
+-------------------------+----------------------------------------------------+

The operator assigns a new PodCIDR to a node if all of its PodCIDRs are either
depleted or released.

Limitations
===========

Cluster Pool v2 is a preview feature. The following limitations currently apply
to Cilium running in ``cluster-pool-v2beta`` IPAM mode:

.. warning::
- Tunnel mode is not supported. Cluster Pool v2 may only be used in direct
routing mode.
- Transparent encryption with IPSec is not supported.

The current status of these limitations is tracked in :gh-issue:`18987`.

Configuration
=============

To enable Cluster Pool v2, pass ``--set ipam.mode=cluster-pool-v2beta`` to your
Helm options. The CIDR pool used in Cluster Pool v2 mode are configured the same
way as regular cluster pool (see :ref:`gsg_ipam_crd_cluster_pool`).

In addition, the thresholds for when a PodCIDR should be allocated or released
can be configured per node via the following ``CiliumNode.spec.ipam`` fields:

``spec.ipam.pod-cidr-allocation-threshold``
Defines the minimum number of free IPs which must be available to this node
via its PodCIDR pool.

If the total number of IP addresses in the PodCIDR pool is less than this
value, the PodCIDRs currently in-use by this node will be marked as depleted
and Cilium operator will allocate a new PodCIDR to this node.

This value effectively defines the buffer of IP addresses available
immediately without requiring Cilium operator to get involved.

If unspecified, defaults to 8.


``spec.ipam.pod-cidr-release-threshold``
Defines the maximum number of free IPs which may be available to this node via
its PodCIDR pool.

While the total number of free IP addresses in the PodCIDR pool is larger than
this value, Cilium agent will attempt to release currently unused PodCIDR.

If unspecified, defaults to 16.
3 changes: 3 additions & 0 deletions Documentation/operations/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ Deprecated Options
* The ``disable-cnp-status-updates``, ``cnp-node-status-gc-interval duration`` and ``enable-k8s-event-handover``
options are deprecated and will be removed in v1.15. There is no replacement for these
flags as enabling them causes scalability and performance issues even in small clusters.
* The ``cluster-pool-v2beta`` IPAM mode is deprecated and will be removed in v1.15.
The functionality to dynamically allocate Pod CIDRs is now provided by the
more flexible ``multi-pool`` IPAM mode.
Comment on lines +362 to +363
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edits for clarity

Suggested change
The functionality to dynamically allocate Pod CIDRs is now provided by the
more flexible ``multi-pool`` IPAM mode.
Dynamic allocation of Pod CIDRs is now provided by the
more flexible ``multi-pool`` IPAM mode.


Added Metrics
~~~~~~~~~~~~~
Expand Down
16 changes: 8 additions & 8 deletions operator/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,29 +202,29 @@ func init() {
option.BindEnv(Vp, option.EnableIPv4Name)

flags.StringSlice(operatorOption.ClusterPoolIPv4CIDR, []string{},
fmt.Sprintf("IPv4 CIDR Range for Pods in cluster. Requires '%s=%s|%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool, ipamOption.IPAMClusterPoolV2,
fmt.Sprintf("IPv4 CIDR Range for Pods in cluster. Requires '%s=%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool,
option.EnableIPv4Name, "true"))
option.BindEnv(Vp, operatorOption.ClusterPoolIPv4CIDR)

flags.Int(operatorOption.NodeCIDRMaskSizeIPv4, 24,
fmt.Sprintf("Mask size for each IPv4 podCIDR per node. Requires '%s=%s|%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool, ipamOption.IPAMClusterPoolV2,
fmt.Sprintf("Mask size for each IPv4 podCIDR per node. Requires '%s=%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool,
option.EnableIPv4Name, "true"))
option.BindEnv(Vp, operatorOption.NodeCIDRMaskSizeIPv4)

flags.Bool(option.EnableIPv6Name, defaults.EnableIPv6, "Enable IPv6 support")
option.BindEnv(Vp, option.EnableIPv6Name)

flags.StringSlice(operatorOption.ClusterPoolIPv6CIDR, []string{},
fmt.Sprintf("IPv6 CIDR Range for Pods in cluster. Requires '%s=%s|%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool, ipamOption.IPAMClusterPoolV2,
fmt.Sprintf("IPv6 CIDR Range for Pods in cluster. Requires '%s=%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool,
option.EnableIPv6Name, "true"))
option.BindEnv(Vp, operatorOption.ClusterPoolIPv6CIDR)

flags.Int(operatorOption.NodeCIDRMaskSizeIPv6, 112,
fmt.Sprintf("Mask size for each IPv6 podCIDR per node. Requires '%s=%s|%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool, ipamOption.IPAMClusterPoolV2,
fmt.Sprintf("Mask size for each IPv6 podCIDR per node. Requires '%s=%s' and '%s=%s'",
option.IPAM, ipamOption.IPAMClusterPool,
option.EnableIPv6Name, "true"))
option.BindEnv(Vp, operatorOption.NodeCIDRMaskSizeIPv6)

Expand Down
4 changes: 3 additions & 1 deletion pkg/ipam/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ func NewIPAM(nodeAddressing types.NodeAddressing, c Configuration, owner Owner,
ipam.IPv4Allocator = newHostScopeAllocator(nodeAddressing.IPv4().AllocationCIDR().IPNet)
}
case ipamOption.IPAMClusterPoolV2:
log.Info("Initializing ClusterPool v2 IPAM")
log.
WithField(logfields.Hint, "IPAM mode cluster-pool-v2beta is deprecated. Please use multi-pool IPAM instead.").
Info("Initializing ClusterPool v2 IPAM")

if c.IPv6Enabled() {
ipam.IPv6Allocator = newClusterPoolAllocator(IPv6, c, owner, k8sEventReg, clientset)
Expand Down