-
Notifications
You must be signed in to change notification settings - Fork 386
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
Add documentation for secondary network IPAM #3634
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3634 +/- ##
==========================================
- Coverage 63.94% 63.54% -0.41%
==========================================
Files 278 278
Lines 27838 39360 +11522
==========================================
+ Hits 17802 25010 +7208
- Misses 8110 12420 +4310
- Partials 1926 1930 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
3892d55
to
bdcf497
Compare
# bridging mode and allocates IPs to Pods in bridging mode. It is also required by secondary network | ||
# network IPAM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also required by secondary network IPAM
If I interpret this correctly, we should stop shipping the Whereabouts binary altogether in the Antrea Docker image, as AntreaIPAM is the only supported option now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation supports only Multus managed network, not Antrea native secondary network. I plan to wait for the SR-IOV CI ready to add Antrea IPAM support for native secondary network.
docs/secondary-network-ipam.md
Outdated
With the [AntreaIPM feature](antrea-ipam.md#antrea-flexible-ipam), Antrea can | ||
allocate IPs for Pod secondary networks. At the moment, AntreaIPAM supports | ||
secondary networks managed by [Multus](https://github.com/k8snetworkplumbingwg/multus-cni), | ||
we will add support for secondary networks managed by Antrea in future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be missing something, but that seems in direct contradiction with what you added to the config comments:
It is also required by secondary network IPAM
I feel like it is quite confusing to use the "secondary network" terminology in both cases, as this is the name of the Antrea feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is your suggestion then? But at least when we finally support IPAM for Antrea native secondary network, then it will not be problem any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess most of my confusion comes from the "It is also required by secondary network IPAM." statement in other places. That doesn't seem to apply to either case:
- For the Multus case, any IPAM solution can be used, so AntreaIPAM is not required
- For the Antrea SecondaryNetwork feature, only Whereabouts is supported at the moment
I think I see what you are trying to say, but maybe something like this would help clarify (in config comments):
To use Antrea for IPAM when configuring secondary network interfaces with Multus, this feature gate needs to be enabled.
For this documentation, the current version sounds good to me. In the last sentence I would just add a reference to the Antrea feature name (SecondaryNetwork
) for clarification.
BTW, I am not sure why we need a new document and cannot place this information in https://github.com/antrea-io/antrea/blob/main/docs/antrea-ipam.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Let me rephrase the comments on feature gate. I can merge the doc to antrea-ipam.md as well. Earlier thought secondary network IPAM is not interested by most people, so created a separate doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
b7aeee5
to
f4f6609
Compare
docs/secondary-network-ipam.md
Outdated
With the [AntreaIPM feature](antrea-ipam.md#antrea-flexible-ipam), Antrea can | ||
allocate IPs for Pod secondary networks. At the moment, AntreaIPAM supports | ||
secondary networks managed by [Multus](https://github.com/k8snetworkplumbingwg/multus-cni), | ||
we will add support for secondary networks managed by Antrea in future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess most of my confusion comes from the "It is also required by secondary network IPAM." statement in other places. That doesn't seem to apply to either case:
- For the Multus case, any IPAM solution can be used, so AntreaIPAM is not required
- For the Antrea SecondaryNetwork feature, only Whereabouts is supported at the moment
I think I see what you are trying to say, but maybe something like this would help clarify (in config comments):
To use Antrea for IPAM when configuring secondary network interfaces with Multus, this feature gate needs to be enabled.
For this documentation, the current version sounds good to me. In the last sentence I would just add a reference to the Antrea feature name (SecondaryNetwork
) for clarification.
BTW, I am not sure why we need a new document and cannot place this information in https://github.com/antrea-io/antrea/blob/main/docs/antrea-ipam.md?
fa31969
to
98f1e98
Compare
@@ -32,7 +32,10 @@ featureGates: | |||
# Egress: true | |||
|
|||
# Enable AntreaIPAM, which can allocate IP addresses from IPPools. AntreaIPAM is required by the | |||
# bridging mode and allocates IPs to Pods in bridging mode. | |||
# bridging mode and allocates IPs to Pods in bridging mode. It is also required to use Antrea for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think that a new line for each case (bridgingMode and secondaryNetwork) is more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel one paragraph is ok. I do not like short paragraphs.
# Enable flexible IPAM mode for Antrea. This mode allows to assign IP Ranges to Namespaces, | ||
# Deployments and StatefulSets via IP Pool annotation. | ||
# Enable AntreaIPAM, which can allocate IP addresses from IPPools. AntreaIPAM is required by the | ||
# bridging mode and allocates IPs to Pods in bridging mode. It is also required to use Antrea for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
b140a2d
to
3958eab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some small comments, otherwise LGTM
docs/antrea-ipam.md
Outdated
With the AntreaIPAM feature, Antrea can allocate IPs for Pod secondary networks. At the | ||
moment, AntreaIPAM supports secondary networks managed by [Multus](https://github.com/k8snetworkplumbingwg/multus-cni), | ||
we will add support for [secondary networks managed by Antrea](feature-gates.md#secondarynetwork) | ||
in future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/antrea-ipam.md
Outdated
|
||
To configure Antrea IPAM, `antrea` should be specified as the IPAM plugin in the | ||
the CNI IPAM configuration, and at least one Antrea IPPool should be specified | ||
in the `ippools` field. IPs will be allcoated from the specified IPPool(s) for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/allcoated/allocated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
docs/antrea-ipam.md
Outdated
Additionally, Antrea IPAM also supports configuration of static IP addresses, | ||
static routes, and DNS settings, as what are supported by the [static IPAM | ||
plugin](https://www.cni.dev/plugins/current/ipam/static). The following example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sentence is not correct. Maybe you mean:
Additionally, Antrea IPAM also supports the same configuration of static IP addresses, static routes, and DNS settings as what is supported by the ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
docs/antrea-ipam.md
Outdated
|
||
## `IPPool` CRD | ||
|
||
Antrea IP pools are defined with `IPPool` CRD. The following two examples define |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the IPPool
CRD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/feature-gates.md
Outdated
by the underlay network. For more information, please refer to the | ||
[Antrea IPAM document](antrea-ipam.md#antrea-flexible-ipam). | ||
|
||
This feature gate also needs to be enabled, to use Antrea for IPAM when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature gate also needs to be enabled, to use Antrea for IPAM when | |
This feature gate also needs to be enabled to use Antrea for IPAM when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
docs/feature-gates.md
Outdated
[Antrea IPAM document](antrea-ipam.md#antrea-flexible-ipam). | ||
|
||
This feature gate also needs to be enabled, to use Antrea for IPAM when | ||
configuring secondary network interfaces with Multus, in which Antrea works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in which case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
docs/feature-gates.md
Outdated
be included in the Namespace annotation. In the future, annotation of up to two pools for | ||
IPv4 and IPv6 respectively will be supported. | ||
The bridging mode works only with `system` OVS datapath type; and `noEncap`, | ||
`noSNAT` traffic mode. At this moment, it supports only IPv4. The IPs in an IP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Add a document for secondary network IPAM, and add the Antrea IPAM option to the Multus cookbook. Signed-off-by: Jianjun Shen <shenj@vmware.com>
e20b5ef
to
393740c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/skip-all |
Add a document for secondary network IPAM, and add the Antrea IPAM
option to the Multus cookbook.
Signed-off-by: Jianjun Shen shenj@vmware.com