mirror of https://github.com/kubernetes/kops.git
fix: rename spotinst's feature flag
This commit is contained in:
parent
4c8ac60bf3
commit
9f94c06e67
|
@ -358,7 +358,7 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command {
|
|||
cmd.Flags().StringVar(&options.VSphereDatastore, "vsphere-datastore", options.VSphereDatastore, "vsphere-datastore is required for vSphere. Set a valid datastore in which to store dynamic provision volumes.")
|
||||
}
|
||||
|
||||
if featureflag.SpotinstIntegration.Enabled() {
|
||||
if featureflag.Spotinst.Enabled() {
|
||||
// Spotinst flags
|
||||
cmd.Flags().StringVar(&options.SpotinstProduct, "spotinst-product", options.SpotinstProduct, "Set the product code.")
|
||||
cmd.Flags().StringVar(&options.SpotinstOrientation, "spotinst-orientation", options.SpotinstOrientation, "Set the group orientation.")
|
||||
|
@ -852,7 +852,7 @@ func RunCreateCluster(f *util.Factory, out io.Writer, c *CreateClusterOptions) e
|
|||
cluster.Spec.CloudConfig.VSphereDatastore = fi.String(c.VSphereDatastore)
|
||||
}
|
||||
|
||||
if featureflag.SpotinstIntegration.Enabled() {
|
||||
if featureflag.Spotinst.Enabled() {
|
||||
if cluster.Spec.CloudConfig == nil {
|
||||
cluster.Spec.CloudConfig = &api.CloudConfiguration{}
|
||||
}
|
||||
|
|
|
@ -77,8 +77,8 @@ var GoogleCloudBucketAcl = New("GoogleCloudBucketAcl", Bool(false))
|
|||
// EnableNodeAuthorization enables the node authorization features
|
||||
var EnableNodeAuthorization = New("EnableNodeAuthorization", Bool(false))
|
||||
|
||||
// SpotinstIntegration toggles the use of Spotinst integration.
|
||||
var SpotinstIntegration = New("SpotinstIntegration", Bool(false))
|
||||
// Spotinst toggles the use of Spotinst integration.
|
||||
var Spotinst = New("Spotinst", Bool(false))
|
||||
|
||||
var flags = make(map[string]*FeatureFlag)
|
||||
var flagsMutex sync.Mutex
|
||||
|
|
|
@ -84,7 +84,7 @@ func ListResourcesAWS(cloud awsup.AWSCloud, clusterName string) (map[string]*res
|
|||
ListIAMRoles,
|
||||
}
|
||||
|
||||
if featureflag.SpotinstIntegration.Enabled() {
|
||||
if featureflag.Spotinst.Enabled() {
|
||||
// Spotinst Elastigroups
|
||||
listFunctions = append(listFunctions, ListSpotinstElastigroups)
|
||||
} else {
|
||||
|
|
|
@ -678,7 +678,7 @@ func (c *ApplyClusterCmd) Run() error {
|
|||
KopsModelContext: modelContext,
|
||||
}
|
||||
|
||||
if featureflag.SpotinstIntegration.Enabled() {
|
||||
if featureflag.Spotinst.Enabled() {
|
||||
l.Builders = append(l.Builders, &spotinstmodel.ElastigroupModelBuilder{
|
||||
AWSModelContext: awsModelContext,
|
||||
BootstrapScript: bootstrapScriptBuilder,
|
||||
|
|
|
@ -269,7 +269,7 @@ func NewAWSCloud(region string, tags map[string]string) (AWSCloud, error) {
|
|||
c.route53.Handlers.Send.PushFront(requestLogger)
|
||||
c.addHandlers(region, &c.route53.Handlers)
|
||||
|
||||
if featureflag.SpotinstIntegration.Enabled() {
|
||||
if featureflag.Spotinst.Enabled() {
|
||||
c.spotinst, err = spotinst.NewService(kops.CloudProviderAWS)
|
||||
if err != nil {
|
||||
return c, err
|
||||
|
|
|
@ -445,7 +445,7 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri
|
|||
}
|
||||
}
|
||||
|
||||
if featureflag.SpotinstIntegration.Enabled() {
|
||||
if featureflag.Spotinst.Enabled() {
|
||||
key := "spotinst-kubernetes-cluster-controller.addons.k8s.io"
|
||||
version := "1.0.16"
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
|
|||
return os.Getenv("DIGITALOCEAN_ACCESS_TOKEN")
|
||||
}
|
||||
|
||||
if featureflag.SpotinstIntegration.Enabled() {
|
||||
if featureflag.Spotinst.Enabled() {
|
||||
if creds, err := spotinst.LoadCredentials(); err == nil {
|
||||
dest["SpotinstToken"] = func() string { return creds.Token }
|
||||
dest["SpotinstAccount"] = func() string { return creds.Account }
|
||||
|
|
Loading…
Reference in New Issue