Skip to content
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

Use bind address for consul checks #1866

Merged
merged 8 commits into from
Oct 27, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add to valid configs fields
dadgar committed Oct 27, 2016

Unverified

This user has not yet uploaded their public signing key.
commit 0e47a66391920a3076c987c37a960c7cef1dea1f
9 changes: 5 additions & 4 deletions command/agent/config-test-fixtures/basic.hcl
Original file line number Diff line number Diff line change
@@ -100,13 +100,14 @@ consul {
token = "token1"
auth = "username:pass"
ssl = true
verify_ssl = false
verify_ssl = true
ca_file = "/path/to/ca/file"
cert_file = "/path/to/cert/file"
key_file = "/path/to/key/file"
server_auto_join = false
client_auto_join = false
auto_advertise = false
server_auto_join = true
client_auto_join = true
auto_advertise = true
checks_use_advertise = true
}
vault {
address = "127.0.0.1:9500"
1 change: 1 addition & 0 deletions command/agent/config_parse.go
Original file line number Diff line number Diff line change
@@ -616,6 +616,7 @@ func parseConsulConfig(result **config.ConsulConfig, list *ast.ObjectList) error
"auto_advertise",
"ca_file",
"cert_file",
"checks_use_advertise",
"client_auto_join",
"client_service_name",
"key_file",
27 changes: 14 additions & 13 deletions command/agent/config_parse_test.go
Original file line number Diff line number Diff line change
@@ -109,19 +109,20 @@ func TestConfig_Parse(t *testing.T) {
Endpoint: "127.0.0.1:1234",
},
Consul: &config.ConsulConfig{
ServerServiceName: "nomad",
ClientServiceName: "nomad-client",
Addr: "127.0.0.1:9500",
Token: "token1",
Auth: "username:pass",
EnableSSL: true,
VerifySSL: false,
CAFile: "/path/to/ca/file",
CertFile: "/path/to/cert/file",
KeyFile: "/path/to/key/file",
ServerAutoJoin: false,
ClientAutoJoin: false,
AutoAdvertise: false,
ServerServiceName: "nomad",
ClientServiceName: "nomad-client",
Addr: "127.0.0.1:9500",
Token: "token1",
Auth: "username:pass",
EnableSSL: true,
VerifySSL: true,
CAFile: "/path/to/ca/file",
CertFile: "/path/to/cert/file",
KeyFile: "/path/to/key/file",
ServerAutoJoin: true,
ClientAutoJoin: true,
AutoAdvertise: true,
ChecksUseAdvertise: true,
},
Vault: &config.VaultConfig{
Addr: "127.0.0.1:9500",