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

Add option to force specifying pool name #53

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

adrianchiris
Copy link
Collaborator

in some cases it is desired to make specifying at least one pool in poolName or pools mandatory. To achieve this we add a new IPAM CNI parameter which can be defined in nv-ipam config file. this will prevent CNI from using network name as pool name in case poolName was not specified.

@coveralls
Copy link

coveralls commented Sep 25, 2024

Coverage Status

coverage: 70.122% (+0.07%) from 70.056%
when pulling 52b3daa on adrianchiris:force-pool-name
into 6ce8885 on Mellanox:main.

@@ -148,9 +151,13 @@ func (cl *confLoader) LoadConf(args *skel.CmdArgs) (*NetConf, error) {
}

// overlay config with defaults
var defaultPoolName string
if !fileConf.ForcePoolName {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should not limit this to the fileConf. We should support this option as STDIN ARG also.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

makes sense

in some cases it is desired to make specifying at least one
pool in poolName or pools mandatory. To achieve this we add a
new IPAM CNI parameter which can be defined in nv-ipam config
file. this will prevent CNI from using network name as pool name
in case poolName was not specified.

Signed-off-by: adrianc <adrianc@nvidia.com>
Copy link
Collaborator

@ykulazhenkov ykulazhenkov left a comment

Choose a reason for hiding this comment

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

LGTM

@ykulazhenkov ykulazhenkov merged commit 3b154af into Mellanox:main Sep 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants