Skip to content

Commit f562a58

Browse files
committed
Add owner tag to eksctl
Signed-off-by: Parthvi Vala <[email protected]>
1 parent 17c8a1b commit f562a58

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/testenv/eksctl_provider.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"fmt"
66
"os"
7+
"os/user"
78
"strconv"
89

910
. "github.com/onsi/ginkgo/v2"
@@ -61,6 +62,11 @@ func (k *EKSClusterProvider) Create(ctx context.Context) {
6162

6263
createClusterRes := &turtlesframework.RunCommandResult{}
6364
numWorkerNodes := strconv.Itoa(k.numWorkers)
65+
tags := "team=highlander,purpose=e2e"
66+
currentUser, _ := user.Current()
67+
if currentUser != nil {
68+
tags += fmt.Sprintf(",owner=%s", currentUser.Username)
69+
}
6470
turtlesframework.RunCommand(ctx, turtlesframework.RunCommandInput{
6571
Command: "eksctl",
6672
Args: []string{
@@ -84,7 +90,7 @@ func (k *EKSClusterProvider) Create(ctx context.Context) {
8490
"--kubeconfig",
8591
tempFile.Name(),
8692
"--tags",
87-
"team=highlander,purpose=e2e",
93+
tags,
8894
"--node-type",
8995
"m5.xlarge",
9096
},

0 commit comments

Comments
 (0)