Remove unnecessary --networking flag from kubetest2.

this can be specified in --create-args
This commit is contained in:
Peter Rifel 2021-01-31 08:18:56 -06:00
parent 31c8771587
commit 942c48c04b
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
3 changed files with 2 additions and 7 deletions

View File

@ -64,7 +64,7 @@ See [Conformance Testing in Kubernetes](https://github.com/kubernetes/community/
### Running against a new cluster
By adding the `--up` flag, `kubetest2` will spin up a new cluster. In most cases, you also need to add a few additional flags, such as `--networking`. See `kubetest2 kops --help` for the full list.
By adding the `--up` flag, `kubetest2` will spin up a new cluster. Flags can be passed to the `kops create cluster` command via the `--create-args` flag. In most cases, you also need to add a few additional flags. See `kubetest2 kops --help` for the full list.
```shell
kubetest2 kops \
@ -72,9 +72,9 @@ kubetest2 kops \
--up \
--cloud-provider=aws \
--cluster-name=my.testcluster.com \
--create-args="--networking calico" \
--kops-binary-path=${KOPS_ROOT}/bazel-bin/cmd/kops/linux-amd64/kops \
--kubernetes-version=v1.20.2 \
--networking calico \
--test=kops \
--
-- \

View File

@ -49,7 +49,6 @@ type deployer struct {
Env []string `flag:"env" desc:"Additional env vars to set for kops commands in NAME=VALUE format"`
CreateArgs string `flag:"create-args" desc:"Extra space-separated arguments passed to 'kops create cluster'"`
KopsBinaryPath string `flag:"kops-binary-path" desc:"The path to kops executable used for testing"`
Networking string `flag:"networking" desc:"The networking mode to use"`
StateStore string `flag:"-"`
TemplatePath string `flag:"template-path" desc:"The path to the manifest template used for cluster creation"`

View File

@ -125,10 +125,6 @@ func (d *deployer) createCluster(zones []string, adminAccess string) error {
args = append(args, "--master-size", "s-8vcpu-16gb")
}
if d.Networking != "" {
args = append(args, "--networking", d.Networking)
}
if d.CreateArgs != "" {
// TODO: we should only set the above flags if they're not in CreateArgs
// allowing any flag to be overridden