mirror of https://github.com/status-im/consul.git
parent
3177c2b450
commit
1e49c157c5
|
@ -234,6 +234,12 @@ type Config struct {
|
||||||
VerifyServerHostname *bool `json:"verify_server_hostname,omitempty" hcl:"verify_server_hostname" mapstructure:"verify_server_hostname"`
|
VerifyServerHostname *bool `json:"verify_server_hostname,omitempty" hcl:"verify_server_hostname" mapstructure:"verify_server_hostname"`
|
||||||
Watches []map[string]interface{} `json:"watches,omitempty" hcl:"watches" mapstructure:"watches"`
|
Watches []map[string]interface{} `json:"watches,omitempty" hcl:"watches" mapstructure:"watches"`
|
||||||
|
|
||||||
|
// This isn't used by Consul but we've documented a feature where users
|
||||||
|
// can deploy their snapshot agent configs alongside their Consul configs
|
||||||
|
// so we have a placeholder here so it can be parsed but this doesn't
|
||||||
|
// manifest itself in any way inside the runtime config.
|
||||||
|
SnapshotAgent map[string]interface{} `json:"snapshot_agent,omitempty" hcl:"snapshot_agent" mapstructure:"snapshot_agent"`
|
||||||
|
|
||||||
// non-user configurable values
|
// non-user configurable values
|
||||||
ACLDisabledTTL *string `json:"acl_disabled_ttl,omitempty" hcl:"acl_disabled_ttl" mapstructure:"acl_disabled_ttl"`
|
ACLDisabledTTL *string `json:"acl_disabled_ttl,omitempty" hcl:"acl_disabled_ttl" mapstructure:"acl_disabled_ttl"`
|
||||||
AEInterval *string `json:"ae_interval,omitempty" hcl:"ae_interval" mapstructure:"ae_interval"`
|
AEInterval *string `json:"ae_interval,omitempty" hcl:"ae_interval" mapstructure:"ae_interval"`
|
||||||
|
|
|
@ -1194,6 +1194,7 @@ func TestConfigFlagsAndEdgecases(t *testing.T) {
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
// transformations
|
// transformations
|
||||||
//
|
//
|
||||||
|
|
||||||
{
|
{
|
||||||
desc: "raft performance scaling",
|
desc: "raft performance scaling",
|
||||||
args: []string{`-data-dir=` + dataDir},
|
args: []string{`-data-dir=` + dataDir},
|
||||||
|
@ -1922,6 +1923,21 @@ func TestConfigFlagsAndEdgecases(t *testing.T) {
|
||||||
rt.DataDir = dataDir
|
rt.DataDir = dataDir
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
desc: "ignore snapshot_agent sub-object",
|
||||||
|
args: []string{
|
||||||
|
`-data-dir=` + dataDir,
|
||||||
|
},
|
||||||
|
json: []string{
|
||||||
|
`{ "snapshot_agent": { "dont": "care" } }`,
|
||||||
|
},
|
||||||
|
hcl: []string{
|
||||||
|
`snapshot_agent = { dont = "care" }`,
|
||||||
|
},
|
||||||
|
patch: func(rt *RuntimeConfig) {
|
||||||
|
rt.DataDir = dataDir
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
testConfig(t, tests, dataDir)
|
testConfig(t, tests, dataDir)
|
||||||
|
|
Loading…
Reference in New Issue