This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 385
add hostIP as env to server-statefulset and substitute env variables in extraConfig #1042
Merged
Conversation
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
thisisnotashwin
approved these changes
Jul 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the comment regarding the testing. I think i agree with the complexity of it. I havent tested this PR, but if you have and it does solve the problem, even when the input json is complicated, this LGMT!!
Thanks for putting in the hard work on this one. It definitely was quite a wild journey for a PR!!
ishustava
approved these changes
Jul 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Co-authored-by: Ashwin Venkatesh <ashwin@hashicorp.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area/chart-only
Related to changes that simply require yaml chart changes, e.g. exposing a new field
bug
Something isn't working
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.
Changes proposed in this PR:
extraConfig
configMap file to/consul/extra-config/extra-from-values.json
and usessed
to replaceHOST_IP/POD_IP/HOSTNAME
at runtime with the environment.-config-file=/consul/extra-config/extra-from-values.json
to server-statefulset and client-daemonset.Resolves #657.
How I've tested this PR:
unit tests updated and pass, manually tested using the extra-env-args telemetry specified in issue #657 :
And confirmed that the server and clients comes online with the changes and fails to come online with existing code.
How I expect reviewers to test this PR:
unit tests pass, code review.
Note to reviewers:
server-statefulset
andclient-daemonset
is there anything worth additionally testing in bats?/consul/config/extra-from-values.json
and once again in the new one. Based on https://www.consul.io/docs/agent/options#_config_file merging should be "ok". I'm not sure this is guaranteed. If we are concerned about that, I can rename the configMap entry toextra-from-values.tmp
and Consul will ignore it when processing/consul/config/
and only catch the one we modify. Thoughts?Checklist: