Skip to content

Commit

Permalink
ipam: Remove cluster-pool-v2beta fields from CiliumNode CRD
Browse files Browse the repository at this point in the history
They are no longer used.

Signed-off-by: Sebastian Wicki <[email protected]>
  • Loading branch information
gandro committed Sep 7, 2023
1 parent 22bb525 commit 1d2c61e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 79 deletions.
3 changes: 0 additions & 3 deletions pkg/ipam/option/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ const (
// option.IPAM
IPAMClusterPool = "cluster-pool"

// IPAMClusterPoolV2 is the value to select cluster pool version 2
IPAMClusterPoolV2 = "cluster-pool-v2beta"

// IPAMMultiPool is the value to select the multi pool IPAM mode
IPAMMultiPool = "multi-pool"

Expand Down
19 changes: 0 additions & 19 deletions pkg/ipam/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,6 @@ type IPAMSpec struct {
//
// +kubebuilder:validation:Minimum=0
MaxAboveWatermark int `json:"max-above-watermark,omitempty"`

// PodCIDRAllocationThreshold defines the minimum number of free IPs which
// must be available to this node via its pod CIDR pool. If the total number
// of IP addresses in the pod CIDR pool is less than this value, the pod
// CIDRs currently in-use by this node will be marked as depleted and
// cilium-operator will allocate a new pod CIDR to this node.
// This value effectively defines the buffer of IP addresses available
// immediately without requiring cilium-operator to get involved.
//
// +kubebuilder:validation:Minimum=0
PodCIDRAllocationThreshold int `json:"pod-cidr-allocation-threshold,omitempty"`

// PodCIDRReleaseThreshold defines the maximum number of free IPs which may
// be available to this node via its pod CIDR pool. While the total number
// of free IP addresses in the pod CIDR pool is larger than this value,
// cilium-agent will attempt to release currently unused pod CIDRs.
//
// +kubebuilder:validation:Minimum=0
PodCIDRReleaseThreshold int `json:"pod-cidr-release-threshold,omitempty"`
}

// IPReleaseStatus defines the valid states in IP release handshake
Expand Down
6 changes: 0 additions & 6 deletions pkg/ipam/types/zz_generated.deepequal.go

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

19 changes: 0 additions & 19 deletions pkg/k8s/apis/cilium.io/client/crds/v2/ciliumnodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,25 +285,6 @@ spec:
logic takes over to continue allocating IPs.
minimum: 0
type: integer
pod-cidr-allocation-threshold:
description: PodCIDRAllocationThreshold defines the minimum number
of free IPs which must be available to this node via its pod
CIDR pool. If the total number of IP addresses in the pod CIDR
pool is less than this value, the pod CIDRs currently in-use
by this node will be marked as depleted and cilium-operator
will allocate a new pod CIDR to this node. This value effectively
defines the buffer of IP addresses available immediately without
requiring cilium-operator to get involved.
minimum: 0
type: integer
pod-cidr-release-threshold:
description: PodCIDRReleaseThreshold defines the maximum number
of free IPs which may be available to this node via its pod
CIDR pool. While the total number of free IP addresses in the
pod CIDR pool is larger than this value, cilium-agent will attempt
to release currently unused pod CIDRs.
minimum: 0
type: integer
podCIDRs:
description: PodCIDRs is the list of CIDRs available to the node
for allocation. When an IP is used, the IP will be added to
Expand Down
32 changes: 0 additions & 32 deletions plugins/cilium-cni/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,38 +268,6 @@ func (t *CNITypesSuite) TestReadCNIConfAzurev2WithPlugins(c *check.C) {
testConfRead(c, confFile1, &netConf1)
}

func (t *CNITypesSuite) TestReadCNIConfClusterPoolV2(c *check.C) {
confFile1 := `
{
"cniVersion":"0.3.1",
"name":"cilium",
"plugins": [
{
"cniVersion":"0.3.1",
"type":"cilium-cni",
"ipam": {
"pod-cidr-allocation-threshold": 10,
"pod-cidr-release-threshold": 20
}
}
]
}
`
netConf1 := NetConf{
NetConf: cnitypes.NetConf{
CNIVersion: "0.3.1",
Type: "cilium-cni",
},
IPAM: IPAM{
IPAMSpec: ipamTypes.IPAMSpec{
PodCIDRAllocationThreshold: 10,
PodCIDRReleaseThreshold: 20,
},
},
}
testConfRead(c, confFile1, &netConf1)
}

func (t *CNITypesSuite) TestReadCNIConfIPAMType(c *check.C) {
confFile := `
{
Expand Down

0 comments on commit 1d2c61e

Please sign in to comment.