diff --git a/docs/cmd-coil-controller.md b/docs/cmd-coil-controller.md index 2408c507..49827174 100644 --- a/docs/cmd-coil-controller.md +++ b/docs/cmd-coil-controller.md @@ -11,7 +11,7 @@ address blocks to allocate address blocks quickly. ## BlockRequest -`coil-controller` watches newly created block requests and curve out +`coil-controller` watches newly created block requests and carve out address blocks from the requested pool. ## Egress diff --git a/docs/design.md b/docs/design.md index 66dc3696..b86c603c 100644 --- a/docs/design.md +++ b/docs/design.md @@ -102,7 +102,7 @@ To make things simple, the default pool is the pool whose name is `default`. To reduce the number of advertised routes, addresses in an address pool are divided into fixed-size blocks. These blocks are called _address blocks_, and assigned to nodes. Since all IP addresses in an address block are routed to the same node, only one route per address block need to be advertised. -For example, if an address pool defines that the size of an address block is 25, `coil-controller` will curve an address block for IPv4 with `/27` subnet mask out of the pool, and assigns it to a node. +For example, if an address pool defines that the size of an address block is 25, `coil-controller` will carve an address block for IPv4 with `/27` subnet mask out of the pool, and assigns it to a node. In general, avoiding immediate reuse of IP addresses is better not to confuse other software or components. diff --git a/docs/setup.md b/docs/setup.md index 9868f627..b681d412 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -123,7 +123,7 @@ spec: - ipv4: 10.100.0.0/16 ``` -- `blockSizeBits`: 5 means that blocks of 32 (= 2^5) addresses will be curved out. +- `blockSizeBits`: 5 means that blocks of 32 (= 2^5) addresses will be carved out. - `subnets`: a list of IP subnets in this pool. ### IPv6 pool diff --git a/docs/usage.md b/docs/usage.md index 92274513..14b8d44f 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -53,7 +53,7 @@ spec: ipv6: fd01:0203:0405:0607::/112 ``` -`blockSizeBits` specifies the size of an address block that is curved from this pool. +`blockSizeBits` specifies the size of an address block that is carved from this pool. The value `n` is interpreted as 2n addresses, so if the value is 5, each address block of this pool will have 32 IP addresses. diff --git a/v2/api/v2/addressblock_types.go b/v2/api/v2/addressblock_types.go index 33bf1b57..1f63cf5b 100644 --- a/v2/api/v2/addressblock_types.go +++ b/v2/api/v2/addressblock_types.go @@ -16,7 +16,7 @@ import ( // AddressBlock is the Schema for the addressblocks API // -// The ownerReferences field contains the AddressPool where the block is curved from. +// The ownerReferences field contains the AddressPool where the block is carved from. type AddressBlock struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/v2/api/v2/addresspool_types.go b/v2/api/v2/addresspool_types.go index bf39f1a8..e1f20ecf 100644 --- a/v2/api/v2/addresspool_types.go +++ b/v2/api/v2/addresspool_types.go @@ -110,7 +110,7 @@ func (ss SubnetSet) Equal(x SubnetSet) bool { return true } -// GetBlock curves Nth block from the pool +// GetBlock carves Nth block from the pool func (ss SubnetSet) GetBlock(n uint, sizeBits int) (ipv4 *net.IPNet, ipv6 *net.IPNet) { blockOffset := (int64(1) << sizeBits) * int64(n) if ss.IPv4 != nil { @@ -150,7 +150,7 @@ type AddressPoolSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file - // BlockSizeBits specifies the size of the address blocks curved from this pool. + // BlockSizeBits specifies the size of the address blocks carved from this pool. // If this is 5, a block will have 2^5 = 32 addresses. Default is 5. // +kubebuilder:default=5 // +kubebuilder:validation:Minimum=0 diff --git a/v2/config/crd/bases/coil.cybozu.com_addressblocks.yaml b/v2/config/crd/bases/coil.cybozu.com_addressblocks.yaml index e0ceb1db..dd18e225 100644 --- a/v2/config/crd/bases/coil.cybozu.com_addressblocks.yaml +++ b/v2/config/crd/bases/coil.cybozu.com_addressblocks.yaml @@ -31,7 +31,7 @@ spec: schema: openAPIV3Schema: description: "AddressBlock is the Schema for the addressblocks API \n The - ownerReferences field contains the AddressPool where the block is curved + ownerReferences field contains the AddressPool where the block is carved from." properties: apiVersion: diff --git a/v2/config/crd/bases/coil.cybozu.com_addresspools.yaml b/v2/config/crd/bases/coil.cybozu.com_addresspools.yaml index 1cd38863..1e68c7ff 100644 --- a/v2/config/crd/bases/coil.cybozu.com_addresspools.yaml +++ b/v2/config/crd/bases/coil.cybozu.com_addresspools.yaml @@ -41,7 +41,7 @@ spec: blockSizeBits: default: 5 description: BlockSizeBits specifies the size of the address blocks - curved from this pool. If this is 5, a block will have 2^5 = 32 + carved from this pool. If this is 5, a block will have 2^5 = 32 addresses. Default is 5. format: int32 minimum: 0 diff --git a/v2/pkg/ipam/pool.go b/v2/pkg/ipam/pool.go index 138d8715..ac50947f 100644 --- a/v2/pkg/ipam/pool.go +++ b/v2/pkg/ipam/pool.go @@ -33,7 +33,7 @@ type PoolManager interface { // This also updates the metrics of the pool. SyncPool(ctx context.Context, name string) error - // AllocateBlock curves an AddressBlock out of the pool for a node. + // AllocateBlock carves an AddressBlock out of the pool for a node. // If the pool runs out of the free blocks, this returns ErrNoBlock. AllocateBlock(ctx context.Context, poolName, nodeName, requestUID string) (*coilv2.AddressBlock, error) @@ -229,7 +229,7 @@ func (p *pool) AllocateBlock(ctx context.Context, nodeName, requestUID string) ( return nil, err } if ap.DeletionTimestamp != nil { - p.log.Info("unable to curve out a block because pool is under deletion") + p.log.Info("unable to carve out a block because pool is under deletion") return nil, ErrNoBlock }