hashicorp / hashicorp/consul

Refactor agent/consul/config.go

Open
#3,744 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.