Refactor agent/consul/config.go
Open
theme/internal-cleanup
type/enhancement
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Right now there's a default config function for Consul servers that's redundant with the agent config's defaults:
https://github.com/hashicorp/consul/blob/v1.0.1/agent/consul/config.go#L379-L426
And there's a mostly-useless merge function:
https://github.com/hashicorp/consul/blob/v1.0.1/agent/agent.go#L664-L864
We should just pass the runtime config into the server, if possible, so all the defaults can be in one place and we don't have to maintain this weird merge function, which was the source of bugs like #3730.
Contributor guide
Assessment
This issue has not been assessed yet.