hashicorp / consul-helm

Helm chart to install Consul and other associated components.
Mozilla Public License 2.0
419 stars 385 forks source link

Add new constructor for KubernetesEnvironment #1026

Closed ndhanushkodi closed 3 years ago

ndhanushkodi commented 3 years ago

This constructor can be used by the consul-k8s-cli to create a KubernetesEnvironment and leverage the helpers in the environment and k8s framework packages.

Once this is merged I can remove the replace directive in go.mod in consul-k8s-cli acceptance-test-setup branch.

How I've tested this PR: The suite package in consul-k8s-cli uses this new constructor, and the basic installation test makes use of the environment to use it's Kubernetes client:

https://github.com/hashicorp/consul-k8s-cli/blob/acceptance-test-setup/test/acceptance/tests/install/install_test.go#L31 https://github.com/hashicorp/consul-k8s-cli/blob/acceptance-test-setup/test/acceptance/framework/suite/suite.go#L41

How I expect reviewers to test this PR: code review