Skip to content

Commit

Permalink
agentless: integrate consul-server-connection-manager to connect-init…
Browse files Browse the repository at this point in the history
… command (#1520)

* Introduce new set of Consul flags that will be used by all consul-k8s commands
* Use consul-server-connection-manager to discover servers and use up-to-date
  server IP every time we need to make an API request.

Co-authored-by: Ashwin Venkatesh <ashwin.what@gmail.com>
  • Loading branch information
ishustava and thisisnotashwin authored Sep 26, 2022
1 parent 34fc011 commit 6ee1fd2
Show file tree
Hide file tree
Showing 20 changed files with 1,123 additions and 1,216 deletions.
5 changes: 2 additions & 3 deletions acceptance/framework/consul/helm_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,8 @@ func configureSCCs(t *testing.T, client kubernetes.Interface, cfg *config.TestCo

func defaultValues() map[string]string {
values := map[string]string{
"server.replicas": "1",
"connectInject.envoyExtraArgs": "--log-level debug",
"connectInject.logLevel": "debug",
"global.logLevel": "debug",
"server.replicas": "1",
// Disable DNS since enabling it changes the policy for the anonymous token,
// which could result in tests passing due to that token having privileges to read services
// (false positive).
Expand Down
47 changes: 22 additions & 25 deletions acceptance/framework/consul/helm_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,38 @@ func TestNewHelmCluster(t *testing.T) {
name: "defaults are used when no helmValues are set",
helmValues: map[string]string{},
want: map[string]string{
"global.image": "test-config-image",
"server.replicas": "1",
"connectInject.envoyExtraArgs": "--log-level debug",
"connectInject.logLevel": "debug",
"global.image": "test-config-image",
"global.logLevel": "debug",
"server.replicas": "1",
"connectInject.transparentProxy.defaultEnabled": "false",
"dns.enabled": "false",
"server.extraConfig": `"{\"log_level\": \"TRACE\"}"`,
"client.extraConfig": `"{\"log_level\": \"TRACE\"}"`,
"dns.enabled": "false",
"server.extraConfig": `"{\"log_level\": \"TRACE\"}"`,
"client.extraConfig": `"{\"log_level\": \"TRACE\"}"`,
},
},
{
name: "when using helmValues, defaults are overridden",
helmValues: map[string]string{
"global.image": "test-image",
"server.bootstrapExpect": "3",
"server.replicas": "3",
"connectInject.envoyExtraArgs": "--foo",
"connectInject.logLevel": "debug",
"global.image": "test-image",
"global.logLevel": "debug",
"server.bootstrapExpect": "3",
"server.replicas": "3",
"connectInject.transparentProxy.defaultEnabled": "true",
"dns.enabled": "true",
"server.extraConfig": `"{\"foo\": \"bar\"}"`,
"client.extraConfig": `"{\"foo\": \"bar\"}"`,
"feature.enabled": "true",
"dns.enabled": "true",
"server.extraConfig": `"{\"foo\": \"bar\"}"`,
"client.extraConfig": `"{\"foo\": \"bar\"}"`,
"feature.enabled": "true",
},
want: map[string]string{
"global.image": "test-image",
"server.bootstrapExpect": "3",
"server.replicas": "3",
"connectInject.envoyExtraArgs": "--foo",
"connectInject.logLevel": "debug",
"global.image": "test-image",
"global.logLevel": "debug",
"server.bootstrapExpect": "3",
"server.replicas": "3",
"connectInject.transparentProxy.defaultEnabled": "true",
"dns.enabled": "true",
"server.extraConfig": `"{\"foo\": \"bar\"}"`,
"client.extraConfig": `"{\"foo\": \"bar\"}"`,
"feature.enabled": "true",
"dns.enabled": "true",
"server.extraConfig": `"{\"foo\": \"bar\"}"`,
"client.extraConfig": `"{\"foo\": \"bar\"}"`,
"feature.enabled": "true",
},
},
}
Expand Down
4 changes: 4 additions & 0 deletions acceptance/tests/wan-federation/wan_federation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ func TestWANFederation(t *testing.T) {
env := suite.Environment()
cfg := suite.Config()

if cfg.UseKind {
t.Skipf("skipping wan federation tests as they currently fail on Kind even though they work on other clouds.")
}

primaryContext := env.DefaultContext(t)
secondaryContext := env.Context(t, environment.SecondaryContextName)

Expand Down
Loading

0 comments on commit 6ee1fd2

Please sign in to comment.