-
Notifications
You must be signed in to change notification settings - Fork 117
RSDK-5140 Don't override a local config BindAddress with a default one from Cloud #4985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…rom the cloud config
I'd like to see a log of some kind for each of these cases:
basically we should be able to tell that ports were defined and explicitly overridden through the logs |
Isn't the current behavior already everything except the third (non-default local overrides default from cloud)? I'll add that one, but is it necessary to log all the others? I think users shouldn't really be expecting to be able to override cloud options with their local config unless we want to explicitly add that feature. Alternatively, I can always log the BindAddress and the source it retrieved it from. EDIT: discussed offline, we'll log 1 and 3, as they seem to be the two cases that have confused users in the past. |
… either does or doesn't get overridden with Cloud's
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.
LGTM
// Note: DefaultBindAddress "from Cloud" is actually set with a constant in rdk. | ||
if err == nil && !cfgFromDisk.Network.BindAddressDefaultSet { | ||
if cfg.Network.BindAddressDefaultSet { | ||
logger.Infof("Using cloud config, but BindAddress is specified in local config (%v) "+ |
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.
prefer using logger.CInfof, even if it wouldn't matter in this case
In
reader.go:fromReader
: the initial read of both local and cloud configs.In
entrypoint.go:configWatcher
: runs on detected config file changes.Bind Address order of precedence is now:
Possible alternative:
Update all Cloud read functions with a parameter to include/exclude returning the default BindAddress. Note that the default BindAddress is not really coming from Cloud, but rather patched with a constant defined in rdk.