Skip to content

Commit 0d8d540

Browse files
committed
Fix integration tests
1 parent 679c513 commit 0d8d540

File tree

4 files changed

+31
-23
lines changed

4 files changed

+31
-23
lines changed

integration/tests/bare_cluster/bare_cluster_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ var _ = Describe("Bare Clusters", Ordered, func() {
5656
WithArgs(
5757
"cluster",
5858
"--config-file=-",
59+
"--verbose", "4",
5960
"--kubeconfig="+params.KubeconfigPath,
6061
).
6162
WithoutArg("--region", params.Region).

integration/tests/update/update_cluster_test.go

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,15 @@ var _ = Describe("(Integration) Upgrading cluster", func() {
223223

224224
Context("addons", func() {
225225
It("should upgrade kube-proxy", func() {
226-
cmd := params.EksctlUtilsCmd.WithArgs(
227-
"update-kube-proxy",
228-
"--cluster", params.ClusterName,
229-
"--verbose", "4",
230-
"--approve",
231-
)
226+
cmd := params.EksctlUpdateCmd.
227+
WithArgs(
228+
"addon",
229+
"--name", "kube-proxy",
230+
"--cluster", params.ClusterName,
231+
"--version", "latest",
232+
"--wait",
233+
"--verbose", "4",
234+
)
232235
Expect(cmd).To(RunSuccessfully())
233236

234237
rawClient := getRawClient(clusterProvider)
@@ -256,24 +259,29 @@ var _ = Describe("(Integration) Upgrading cluster", func() {
256259
}
257260
preUpdateAWSNodeVersion := getAWSNodeVersion()
258261

259-
cmd := params.EksctlUtilsCmd.WithArgs(
260-
"update-aws-node",
261-
"--cluster", params.ClusterName,
262-
"--verbose", "4",
263-
"--approve",
264-
)
262+
cmd := params.EksctlUpdateCmd.
263+
WithArgs(
264+
"addon",
265+
"--name", "vpc-cni",
266+
"--cluster", params.ClusterName,
267+
"--version", "latest",
268+
"--wait",
269+
"--verbose", "4",
270+
)
265271
Expect(cmd).To(RunSuccessfully())
266-
267272
Eventually(getAWSNodeVersion, k8sUpdatePollTimeout, k8sUpdatePollInterval).ShouldNot(Equal(preUpdateAWSNodeVersion))
268273
})
269274

270275
It("should upgrade coredns", func() {
271-
cmd := params.EksctlUtilsCmd.WithArgs(
272-
"update-coredns",
273-
"--cluster", params.ClusterName,
274-
"--verbose", "4",
275-
"--approve",
276-
)
276+
cmd := params.EksctlUpdateCmd.
277+
WithArgs(
278+
"addon",
279+
"--name", "coredns",
280+
"--cluster", params.ClusterName,
281+
"--version", "latest",
282+
"--wait",
283+
"--verbose", "4",
284+
)
277285
Expect(cmd).To(RunSuccessfully())
278286
})
279287

pkg/ctl/create/cluster.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,6 @@ func doCreateCluster(cmd *cmdutils.Cmd, ngFilter *filter.NodeGroupFilter, params
353353
logger.Info("if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=%s --cluster=%s'", meta.Region, meta.Name)
354354

355355
eks.LogEnabledFeatures(cfg)
356-
postClusterCreationTasks := ctl.CreateExtraClusterConfigTasks(ctx, cfg)
357-
358356
iamRoleCreator := &podidentityassociation.IAMRoleCreator{
359357
ClusterName: cfg.Metadata.Name,
360358
StackCreator: stackManager,
@@ -363,7 +361,7 @@ func doCreateCluster(cmd *cmdutils.Cmd, ngFilter *filter.NodeGroupFilter, params
363361
if len(autoDefaultAddons) > 0 {
364362
logger.Info("default addons %s were not specified, will install them as EKS addons", strings.Join(autoDefaultAddons, ", "))
365363
}
366-
postClusterCreationTasks.Append(preNodegroupAddons)
364+
postClusterCreationTasks := ctl.CreateExtraClusterConfigTasks(ctx, cfg, preNodegroupAddons)
367365

368366
taskTree := stackManager.NewTasksToCreateCluster(ctx, cfg.NodeGroups, cfg.ManagedNodeGroups, cfg.AccessConfig, makeAccessEntryCreator(cfg.Metadata.Name, stackManager), postClusterCreationTasks)
369367

pkg/eks/tasks.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@ func newEFADevicePluginTask(
181181
}
182182

183183
// CreateExtraClusterConfigTasks returns all tasks for updating cluster configuration
184-
func (c *ClusterProvider) CreateExtraClusterConfigTasks(ctx context.Context, cfg *api.ClusterConfig) *tasks.TaskTree {
184+
func (c *ClusterProvider) CreateExtraClusterConfigTasks(ctx context.Context, cfg *api.ClusterConfig, preNodeGroupAddons *tasks.TaskTree) *tasks.TaskTree {
185185
newTasks := &tasks.TaskTree{
186186
Parallel: false,
187187
IsSubTask: true,
188+
Tasks: []tasks.Task{preNodeGroupAddons},
188189
}
189190

190191
newTasks.Append(&tasks.GenericTask{

0 commit comments

Comments
 (0)