-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New validation webhook for route uniqueness
This adds a validating webhook to ensure the uniqueness of routes across all orgs and spaces. Since the name registry is used now in 3 webhooks: subnamespaceanchor, app and route, we factored out the common logic in a new DuplicateValidator helper. Route uniqueness is checked using a combination of host, path, domain guid and domain namespace within the cf root namespace. Note we are not using the actual domain name, as this should be immutable, and avoid an extra lookup. We have introduced a config property to set the root CF namespace in the controllers config, and the various config yamls, as we need to use a name registry in the root namespace to guarantee route uniqueness throughout all orgs and spaces. We have also moved the duplicate validator and error messages from workloads up a package level to webhooks, so networking and workloads can share the code. There is no way to update route host/path/domain via the API, so we have an e2e test to trigger the update hook via the add destinations endpoint. This will exit the hook early as new and old route host/path/domain remain unchanged. The code also fixes e2e flakiness by setting the non-propagation annotation on the cfdomain permissions workaround role binding. See #728 Issue: #178 Co-authored-by: Danail Branekov <danailster@gmail.com> Co-authored-by: Giuseppe Capizzi <gcapizzi@pivotal.io> Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com>
- Loading branch information
1 parent
2e1e4ac
commit dabfa56
Showing
38 changed files
with
2,037 additions
and
635 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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.