Skip to content

Commit c4517d5

Browse files
address comments
1 parent ad5144b commit c4517d5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

exp/controllers/awsmanagedmachinepool_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func (r *AWSManagedMachinePoolReconciler) reconcileDelete(
262262
}
263263

264264
if launchTemplate == nil {
265-
machinePoolScope.V(2).Info("Unable to locate launch template")
265+
machinePoolScope.V(2).Info("Unable to find matching launch template")
266266
r.Recorder.Eventf(machinePoolScope.ManagedMachinePool, corev1.EventTypeNormal, "NoLaunchTemplateFound", "Unable to find matching launch template")
267267
controllerutil.RemoveFinalizer(machinePoolScope.ManagedMachinePool, expinfrav1.ManagedMachinePoolFinalizer)
268268
return ctrl.Result{}, nil

pkg/cloud/services/ec2/launchtemplate.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ func (s *Service) ReconcileLaunchTemplate(
153153
}
154154

155155
scope.SetLaunchTemplateLatestVersionStatus(version)
156-
return scope.PatchObject()
156+
if err := scope.PatchObject(); err != nil {
157+
return err
158+
}
157159
}
158160

159161
if needsUpdate || tagsChanged || *imageID != *launchTemplate.AMI.ID {

test/e2e/data/eks/cluster-template-eks-managed-machinepool-with-launch-template-only.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
replicas: ${WORKER_MACHINE_COUNT}
88
template:
99
spec:
10-
version: "EKS_KUBERNETES_VERSION"
10+
version: "${KUBERNETES_VERSION}"
1111
clusterName: "${CLUSTER_NAME}"
1212
bootstrap:
1313
dataSecretName: "${CLUSTER_NAME}-pool-lt-0-userdata"

0 commit comments

Comments
 (0)