Skip to content

Commit 5d4d867

Browse files
authored
spotinst: Bump k8s cluster controller to v2 (#16717)
* update controller v2, inform user on conflict with aws nodeTerminationHandler and Ocean * add BuildPrune to addon,tested * add note to release 1.31
1 parent 2e52682 commit 5d4d867

File tree

4 files changed

+670
-190
lines changed

4 files changed

+670
-190
lines changed

docs/releases/1.31-NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ Lorem ipsum....
2222

2323
* TODO
2424

25+
# Other changes of note
26+
27+
* Spotinst cluster controller V1 is replaced with Ocean kubernetes controller V2, all old k8s resource are removed
28+
except spotinst-kubernetes-cluster-controller Secret.
2529

2630
# Breaking changes
2731

pkg/model/awsmodel/spotinst.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ func (b *SpotInstanceGroupModelBuilder) buildElastigroup(c *fi.CloudupModelBuild
218218
if aws := b.Cluster.Spec.CloudProvider.AWS; aws != nil {
219219
group.Product = aws.SpotinstProduct
220220
group.Orientation = aws.SpotinstOrientation
221+
nth := aws.NodeTerminationHandler
222+
if nth != nil && nth.Enabled != nil && *nth.Enabled {
223+
return fmt.Errorf("can't build elastigroup while nodeTerminationHandler flag is on. " +
224+
"using nodeTerminationHandler will interfere with Ocean Kubernetes controller .\n" +
225+
"Please add the following configuration to cluster config \n nodeTerminationHandler:\n enabled: false ")
226+
}
221227
}
222228

223229
// Strategy.

0 commit comments

Comments
 (0)