This repository was archived by the owner on Apr 13, 2020. It is now read-only.
Fix Incorrect Backend SVC for Default IngressRoutes#441
Merged
Conversation
bnookala
approved these changes
Mar 24, 2020
- Fixed bug where the Traefik IngressRoute generated via `reconcile` for an
`isDefault` ringed service was pointing to a non-existent backend k8s service
when `k8sBackend` is not provided.
- Cause: Incorrect computed value for the IngressRoute
`spec.routes[].services[].name`; was falling back to `metadata.name` when
`k8sBackend` was no provided -- which did does not contain the `ringName`.
- Fix: Expand logic for computing the IngressRoute `metadata.name`.
1. Always compute the _ringed_ version of the service name.
2. Use the _ringed_ service name for `metadata.name` when not `isDefault` --
use non-ringed otherwise.
3. Use the _ringed_ service name as fallback for the backing k8s service if
`k8sBackend` not provided -- otherwise compute the _ringed_ `k8sBackend`.
5a836b9 to
457af06
Compare
edaena
approved these changes
Mar 24, 2020
mtarng
approved these changes
Mar 24, 2020
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
reconcilefor anisDefaultringed service was pointing to a non-existent backend k8s servicewhen
k8sBackendis not provided.spec.routes[].services[].name; was falling back tometadata.namewhenk8sBackendwas no provided -- which did does not contain theringName.metadata.name.metadata.namewhen notisDefault--use non-ringed otherwise.
k8sBackendnot provided -- otherwise compute the ringedk8sBackend.