diff --git a/pkg/featureflag/featureflag.go b/pkg/featureflag/featureflag.go index 942d3a4ca64df..637f72f61b7fe 100644 --- a/pkg/featureflag/featureflag.go +++ b/pkg/featureflag/featureflag.go @@ -76,6 +76,8 @@ var ( Spotinst = New("Spotinst", Bool(false)) // SpotinstOcean toggles the use of Spotinst Ocean instance group implementation. SpotinstOcean = New("SpotinstOcean", Bool(false)) + // SpotinstController toggles the installation of the Spotinst controller addon. + SpotinstController = New("SpotinstController", Bool(true)) // VPCSkipEnableDNSSupport if set will make that a VPC does not need DNSSupport enabled. VPCSkipEnableDNSSupport = New("VPCSkipEnableDNSSupport", Bool(false)) // VSphereCloudProvider enables the vsphere cloud provider diff --git a/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go b/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go index 36afeb034272d..20bce40d7513b 100644 --- a/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go +++ b/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go @@ -543,7 +543,7 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons { } } - if featureflag.Spotinst.Enabled() { + if featureflag.Spotinst.Enabled() && featureflag.SpotinstController.Enabled() { key := "spotinst-kubernetes-cluster-controller.addons.k8s.io" {