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

[doc][flexible-ipam] Add Flexible IPAM design section #5339

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

gran-vmv
Copy link
Contributor

@gran-vmv gran-vmv commented Aug 1, 2023

No description provided.

@gran-vmv gran-vmv added the kind/documentation Categorizes issue or PR as related to a documentation. label Aug 1, 2023
@gran-vmv gran-vmv self-assigned this Aug 1, 2023
@gran-vmv gran-vmv added this to the Antrea v1.14 release milestone Aug 17, 2023
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
luolanzone
luolanzone previously approved these changes Oct 18, 2023
Copy link
Contributor

@luolanzone luolanzone left a comment

Choose a reason for hiding this comment

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

LGTM

@luolanzone
Copy link
Contributor

@tnqn @jianjuns could you help to review this doc change? Thanks.

docs/antrea-ipam.md Outdated Show resolved Hide resolved
@@ -218,6 +218,34 @@ metadata:
A StatefulSet Pod's IP will be kept after Pod restarts, when the IP is allocated from the
annotated IPPool.

### IPAM behaviors
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the main purpose and who are the target readers of this section? It looks like design and internal implementation? If so, I would suggest to move it to the last sub-section and name it IPAM design.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to explain how antrea manages IP when FlexibleIPAM feature is enabled.
Moved it to the last sub-section and name it Flexible IPAM design.

docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
docs/antrea-ipam.md Outdated Show resolved Hide resolved
#### On Pod create

`antrea-agent` will receive a CNI add request, it will check annotations and allocate an IP from
an IPPool. The IP is a pre-allocated StatefulSet IP, a specified IP or the next available IP in
Copy link
Contributor

Choose a reason for hiding this comment

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

"the corresponding IPPool"

Or, probably we should remove "from an IPPool", given you have another sentence to explain the IP, which seems can be pre-allocated too.

Consider "and allocate an IP for the Pod, which can be a pre-allocated IP StatefulSet IP, a user-specified IP, or the next available IP in the specified IPPool."

Copy link
Contributor

Choose a reason for hiding this comment

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

The IP can be

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored this section to

`antrea-agent` will receive a CNI add request, and it will check the Antrea IPAM annotations and
allocate an IP for the Pod, which can be a pre-allocated IP StatefulSet IP, a user-specified IP,
or the next available IP in the specified IPPool.

#### On Pod delete

`antrea-agent` will receive a CNI del request and release the IP allocation from the IPPool.
The pre-allocation status won't be changed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not understand this sentence. You probably should add more information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to:

If the IP is a pre-allocated StatefulSet IP, it will remain pre-allocated status thus the Pod will
get same IP after recreated.

@gran-vmv gran-vmv changed the title [doc][flexible-ipam] Add IPAM behaviors section [doc][flexible-ipam] Add Flexible IPAM design section Nov 6, 2023
@gran-vmv gran-vmv added the area/ipam Issues or PRs related to IP address management (IPAM). label Nov 6, 2023
### Flexible IPAM design

When the `AntreaIPAM` feature gate is enabled, `antrea-controller` will watch IPPool CRs and
StatefulSets from kube-apiserver, and `antrea-agent` will register the IPAM driver to CNI server.
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrapp kube-apiserver with ''.

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider: "activate the Antrea IPAM driver". "register to CNI server" is too much internal details.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added `` for kube-apiserver.
Removed

and `antrea-agent` will register the IPAM driver to CNI server


#### On Pod create

`antrea-agent` will receive a CNI add request, and it will check the Antrea IPAM annotations and
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider: "it will" -> "it will then"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

#### On Pod delete

`antrea-agent` will receive a CNI del request and release the IP allocation from the IPPool.
If the IP is a pre-allocated StatefulSet IP, it will remain pre-allocated status thus the Pod will
Copy link
Contributor

Choose a reason for hiding this comment

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

"it will stay in the pre-allocated status"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Thanks.

Co-authored-by: Lan <luola@vmware.com>
Signed-off-by: gran <gran@vmware.com>
@jianjuns
Copy link
Contributor

jianjuns commented Nov 7, 2023

/skip-all

@jianjuns jianjuns merged commit 92df15a into antrea-io:main Nov 7, 2023
48 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipam Issues or PRs related to IP address management (IPAM). kind/documentation Categorizes issue or PR as related to a documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants