Skip to content

Commit

Permalink
spotinst: Bump k8s cluster controller to v2 (#16717)
Browse files Browse the repository at this point in the history
* update controller v2, inform user on conflict with aws nodeTerminationHandler and Ocean

* add BuildPrune to addon,tested

* add note to release 1.31
  • Loading branch information
yehielnetapp authored Aug 9, 2024
1 parent 2e52682 commit 5d4d867
Show file tree
Hide file tree
Showing 4 changed files with 670 additions and 190 deletions.
4 changes: 4 additions & 0 deletions docs/releases/1.31-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Lorem ipsum....

* TODO

# Other changes of note

* Spotinst cluster controller V1 is replaced with Ocean kubernetes controller V2, all old k8s resource are removed
except spotinst-kubernetes-cluster-controller Secret.

# Breaking changes

Expand Down
6 changes: 6 additions & 0 deletions pkg/model/awsmodel/spotinst.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ func (b *SpotInstanceGroupModelBuilder) buildElastigroup(c *fi.CloudupModelBuild
if aws := b.Cluster.Spec.CloudProvider.AWS; aws != nil {
group.Product = aws.SpotinstProduct
group.Orientation = aws.SpotinstOrientation
nth := aws.NodeTerminationHandler
if nth != nil && nth.Enabled != nil && *nth.Enabled {
return fmt.Errorf("can't build elastigroup while nodeTerminationHandler flag is on. " +
"using nodeTerminationHandler will interfere with Ocean Kubernetes controller .\n" +
"Please add the following configuration to cluster config \n nodeTerminationHandler:\n enabled: false ")
}
}

// Strategy.
Expand Down
Loading

0 comments on commit 5d4d867

Please sign in to comment.