forked from knative-extensions/net-kourier
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CP] Validate Ingress before adding it to the cache: Avoid duplicated…
… domains (#39) (#1) * Validate Ingress before adding it to the cache: Avoid duplicated domains * Fix typo * Mark the ingress as failed with DuplicatedDomain reason * Improve reason and message for duplicated domain * Return error instead of handling the status here. * * Don't initialize status again. * Use ingress.status instead of copying it. * Observed generation is handled at the beginning of the reconciliation loop. * * Increase the observerGeneration at the start of the reconciliation loop. * Handle the specific error of ErrDomainConflict by marking the ingress as failed. * Define specific error for the duplicated domain error * Addressing PR comments. * Removed Errors package. * Inlined error message. * Simplified addIngressToCache logic * Moved ErrDomainConflict to generator package. * Added unit test for ValidateIngress * PR comments * Make ValidateIngress a private func * Do the validation inside AddTranslatedIngress * Make sure the validateIngress test fails due to ErrDomainConflict Co-authored-by: Joaquim Moreno Prusi <[email protected]>
- Loading branch information
1 parent
70b9ffb
commit 5e38a9a
Showing
5 changed files
with
86 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters