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 default subnet in custom vpc to the beginning of the list #4826

Merged
merged 3 commits into from
Dec 24, 2024

Conversation

cnvergence
Copy link
Contributor

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes

Fixes #(issue-number)

@cnvergence cnvergence marked this pull request as ready for review December 12, 2024 15:23
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. vpc labels Dec 12, 2024
@coveralls
Copy link

coveralls commented Dec 12, 2024

Pull Request Test Coverage Report for Build 12355542560

Details

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 22.081%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controller/namespace.go 0 3 0.0%
Totals Coverage Status
Change from base Build 12347800600: 0.0%
Covered Lines: 10267
Relevant Lines: 46498

💛 - Coveralls

@@ -151,7 +151,9 @@ func (c *Controller) handleAddNamespace(key string) error {
return err
}
if s.Name == vpc.Spec.DefaultSubnet {
lss = []string{s.Name}
if slices.Contains(vpc.Spec.Namespaces, key) && key != metav1.NamespaceSystem {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why exclude kube-system here?

Copy link
Contributor Author

@cnvergence cnvergence Dec 20, 2024

Choose a reason for hiding this comment

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

while you can add kube-system to the custom VPCs, I would not add the default subnet from custom VPC to any pod that is going to be created in kube-system namespace, wdyt @oilbeater?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's right, it's dangerous.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 24, 2024
@oilbeater oilbeater merged commit 9aa076b into kubeovn:master Dec 24, 2024
67 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files. vpc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants