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

Fix typo #276

Merged
merged 1 commit into from
Mar 7, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cmd-coil-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 2<sup>5</sup>, `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 2<sup>5</sup>, `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.
Expand Down
2 changes: 1 addition & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 2<sup>n</sup> addresses, so if the value is 5,
each address block of this pool will have 32 IP addresses.

Expand Down
2 changes: 1 addition & 1 deletion v2/api/v2/addressblock_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 2 additions & 2 deletions v2/api/v2/addresspool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion v2/config/crd/bases/coil.cybozu.com_addressblocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion v2/config/crd/bases/coil.cybozu.com_addresspools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions v2/pkg/ipam/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
}

Expand Down
Loading