Skip to content

Commit ff590f6

Browse files
authored
Merge pull request #17682 from ameukam/add-tags-support
Support tags for kubetest-kops
2 parents aeab9ab + b392c42 commit ff590f6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/e2e/kubetest2-kops/deployer/deployer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ type deployer struct {
7878
SSHPublicKeyPath string `flag:"ssh-public-key" desc:"The path to the public key passed to the cloud provider"`
7979
SSHUser string `flag:"ssh-user" desc:"The SSH user to use for SSH access to instances"`
8080

81+
Tags []string `flag:"tags" desc:"Tags to apply to the cluster resources in key=value format"`
82+
8183
TerraformVersion string `flag:"terraform-version" desc:"The version of terraform to use for applying the cluster"`
8284

8385
ArtifactsDir string `flag:"-"`
@@ -140,6 +142,10 @@ func New(opts types.Options) (types.Deployer, *pflag.FlagSet) {
140142
BoskosResourceType: "gce-project",
141143
BoskosAcquireTimeout: 5 * time.Minute,
142144
BoskosHeartbeatInterval: 5 * time.Minute,
145+
Tags: []string{
146+
"group=sig-cluster-lifecycle",
147+
"subproject=kops",
148+
},
143149
}
144150
dir, err := defaultArtifactsDir()
145151
if err != nil {

tests/e2e/kubetest2-kops/deployer/up.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ func (d *deployer) createCluster(zones []string, adminAccess string, yes bool) e
194194
}
195195
args = append(args, createArgs...)
196196
}
197+
args = append(args, "--cloud-labels", strings.Join(d.Tags, ","))
197198
args = appendIfUnset(args, "--admin-access", adminAccess)
198199

199200
// Dont set --master-count if either --control-plane-count or --master-count

0 commit comments

Comments
 (0)