kubetest2: support specifying admin-access value

Otherwise I was getting my IPv6 address, which doesn't work well.
This commit is contained in:
Justin Santa Barbara 2021-01-04 11:28:07 -05:00 committed by Justin SB
parent 62b7ae0c49
commit b04b5f556c
2 changed files with 8 additions and 1 deletions

View File

@ -55,6 +55,8 @@ type deployer struct {
ArtifactsDir string `flag:"-"`
AdminAccess string `flag:"admin-access" desc:"The CIDR to restrict kubernetes API access"`
BuildOptions *builder.BuildOptions
}

View File

@ -38,10 +38,15 @@ func (d *deployer) Up() error {
return err
}
adminAccess := d.AdminAccess
if adminAccess == "" {
adminAccess = publicIP
}
args := []string{
d.KopsBinaryPath, "create", "cluster",
"--name", d.ClusterName,
"--admin-access", publicIP,
"--admin-access", adminAccess,
"--cloud", d.CloudProvider,
"--kubernetes-version", d.KubernetesVersion,
"--master-count", "1",