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

Disable pod use NodeSwitch subnet #3991

Merged
merged 1 commit into from
May 9, 2024

Conversation

Longchuanzheng
Copy link
Contributor

Pull Request

What type of this PR

Examples of user facing changes:

  • Bug fixes

Which issue(s) this PR fixes

Fixes #3947

@Longchuanzheng Longchuanzheng force-pushed the disablepodusejoin branch 2 times, most recently from eb86e48 to 56a98e2 Compare May 8, 2024 07:20
@Longchuanzheng
Copy link
Contributor Author

Longchuanzheng commented May 8, 2024

I find it is difficult to add webhook for pod use join subnet. The name of the "join" subnet is implemented by setting the "node-switch" in ovn-controller. We can not get "node-switch" name in webhook because it dosen't have a controller.
While I also can not add check in ValidatePodNetwork in handleAddOrUpdatePod because subnet list which pod use is gotten after ValidatePodNetwork func.
Therefore, I just add check at reconcileRouteSubnets. This is the easiest way to solve this.

@Longchuanzheng
Copy link
Contributor Author

I also think this PR is an inelegant patch, let's see if there is a better solution.

@zbb88888 zbb88888 force-pushed the disablepodusejoin branch from 56a98e2 to 15b6382 Compare May 9, 2024 08:11
@zbb88888 zbb88888 merged commit 5bcdf28 into kubeovn:master May 9, 2024
9 of 10 checks passed
zbb88888 pushed a commit that referenced this pull request May 13, 2024
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.

Can't create pod with join subnet
2 participants