This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
make sync-catalog work with clients disabled #570
Merged
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.
Currently sync-catalog won't work when clients are disabled (see #211 ). I'm opening this PR because we have a use case (running multiple consuls) where we disable clients and prefer working with the kubernetes service instead.
The sync-catalog won't work with the clients disabled due to the use of the
HOST_IP
variable. Since the option is given to disable the clients, I think the logic would go that if the clients are disabled, the sync-catalog talks to the kubernetes service for the consul server instead of interacting through the clients.It has some duplicate code and I'm not sure if this is the best way, but it has been confirmed to work when deploying our application set.
Feel free to make any suggestions, I mainly want to see #211 resolved.