Skip to content

Conversation

@cheina97
Copy link
Member

@cheina97 cheina97 commented May 5, 2025

Description

This PR adds a check inside the controller-manager. Before the controllers start, it checks if any IP contains a status which is not coherent with the linked network resource and clean it.

@adamjensenbot
Copy link
Collaborator

Hi @cheina97. Thanks for your PR!

I am @adamjensenbot.
You can interact with me issuing a slash command in the first line of a comment.
Currently, I understand the following commands:

  • /rebase: Rebase this PR onto the master branch (You can add the option test=true to launch the tests
    when the rebase operation is completed)
  • /merge: Merge this PR into the master branch
  • /build Build Liqo components
  • /test Launch the E2E and Unit tests
  • /hold, /unhold Add/remove the hold label to prevent merging with /merge

Make sure this PR appears in the liqo changelog, adding one of the following labels:

  • feat: 🚀 New Feature
  • fix: 🐛 Bug Fix
  • refactor: 🧹 Code Refactoring
  • docs: 📝 Documentation
  • style: 💄 Code Style
  • perf: 🐎 Performance Improvement
  • test: ✅ Tests
  • chore: 🚚 Dependencies Management
  • build: 📦 Builds Management
  • ci: 👷 CI/CD
  • revert: ⏪ Reverts Previous Changes

@github-actions github-actions bot added the fix Fixes a bug in the codebase. label May 5, 2025
@adamjensenbot
Copy link
Collaborator

The generated artifacts appear to be out-of-date.

Please, ensure you are using the correct version of the generators (eg. controller-gen) and re-run:

make generate
Here it is an excerpt of the diff:
diff --git a/pkg/ipam/clean.go b/pkg/ipam/clean.go%0Aindex c1e9788..76b7591 100644%0A--- a/pkg/ipam/clean.go%0A+++ b/pkg/ipam/clean.go%0A@@ -1,3 +1,17 @@%0A+// Copyright 2019-2025 The Liqo Authors%0A+//%0A+// Licensed under the Apache License, Version 2.0 (the "License");%0A+// you may not use this file except in compliance with the License.%0A+// You may obtain a copy of the License at%0A+//%0A+//      http://www.apache.org/licenses/LICENSE-2.0%0A+//%0A+// Unless required by applicable law or agreed to in writing, software%0A+// distributed under the License is distributed on an "AS IS" BASIS,%0A+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A+// See the License for the specific language governing permissions and%0A+// limitations under the License.%0A+%0A package ipam%0A %0A import (%0A@@ -5,8 +19,9 @@ import (%0A 	"fmt"%0A 	"net/netip"%0A %0A-	ipamv1alpha1 "github.com/liqotech/liqo/apis/ipam/v1alpha1"%0A 	"sigs.k8s.io/controller-runtime/pkg/client"%0A+%0A+	ipamv1alpha1 "github.com/liqotech/liqo/apis/ipam/v1alpha1"%0A )%0A %0A // CheckAndSanitizeIP checks if the IP resource is coherent with its Network and sanitizes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fixes a bug in the codebase. size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants