@@ -228,8 +228,6 @@ func (c *Cluster) Load() error {
228
228
229
229
c .HostedZoneID = withHostedZoneIDPrefix (c .HostedZoneID )
230
230
231
- c .ConsumeDeprecatedKeys ()
232
-
233
231
if err := c .valid (); err != nil {
234
232
return fmt .Errorf ("invalid cluster: %v" , err )
235
233
}
@@ -261,90 +259,6 @@ func (c *Cluster) Load() error {
261
259
return nil
262
260
}
263
261
264
- func (c * Cluster ) ConsumeDeprecatedKeys () {
265
- // TODO Remove deprecated keys in v0.9.7
266
- if c .DeprecatedControllerCount != nil {
267
- fmt .Println ("WARN: controllerCount is deprecated and will be removed in v0.9.7. Please use controller.count instead" )
268
- c .Controller .Count = * c .DeprecatedControllerCount
269
- }
270
- if c .DeprecatedControllerTenancy != nil {
271
- fmt .Println ("WARN: controllerTenancy is deprecated and will be removed in v0.9.7. Please use controller.tenancy instead" )
272
- c .Controller .Tenancy = * c .DeprecatedControllerTenancy
273
- }
274
- if c .DeprecatedControllerInstanceType != nil {
275
- fmt .Println ("WARN: controllerInstanceType is deprecated and will be removed in v0.9.7. Please use controller.instanceType instead" )
276
- c .Controller .InstanceType = * c .DeprecatedControllerInstanceType
277
- }
278
- if c .Controller .DeprecatedControllerManagedIamRoleName != "" {
279
- fmt .Println ("WARN: controller.managedIamRoleName is deprecated and will be removed in v0.9.7. Please use controller.iam.managedIamRoleName instead" )
280
- c .Controller .IAMConfig .Role .Name = c .Controller .DeprecatedControllerManagedIamRoleName
281
- }
282
- if c .DeprecatedControllerCreateTimeout != nil {
283
- fmt .Println ("WARN: controllerCreateTimeout is deprecated and will be removed in v0.9.7. Please use controller.createTimeout instead" )
284
- c .Controller .CreateTimeout = * c .DeprecatedControllerCreateTimeout
285
- }
286
- if c .DeprecatedControllerRootVolumeIOPS != nil {
287
- fmt .Println ("WARN: controllerRootVolumeIOPS is deprecated and will be removed in v0.9.7. Please use controller.rootVolume.iops instead" )
288
- c .Controller .RootVolume .IOPS = * c .DeprecatedControllerRootVolumeIOPS
289
- }
290
- if c .DeprecatedControllerRootVolumeSize != nil {
291
- fmt .Println ("WARN: controllerRootVolumeSize is deprecated and will be removed in v0.9.7. Please use controller.rootVolume.size instead" )
292
- c .Controller .RootVolume .Size = * c .DeprecatedControllerRootVolumeSize
293
- }
294
- if c .DeprecatedControllerRootVolumeType != nil {
295
- fmt .Println ("WARN: controllerRootVolumeType is deprecated and will be removed in v0.9.7. Please use controller.rootVolume.type instead" )
296
- c .Controller .RootVolume .Type = * c .DeprecatedControllerRootVolumeType
297
- }
298
-
299
- if c .DeprecatedEtcdCount != nil {
300
- fmt .Println ("WARN: etcdCount is deprecated and will be removed in v0.9.7. Please use etcd.count instead" )
301
- c .Etcd .Count = * c .DeprecatedEtcdCount
302
- }
303
- if c .DeprecatedEtcdTenancy != nil {
304
- fmt .Println ("WARN: etcdTenancy is deprecated and will be removed in v0.9.7. Please use etcd.tenancy instead" )
305
- c .Etcd .Tenancy = * c .DeprecatedEtcdTenancy
306
- }
307
- if c .DeprecatedEtcdInstanceType != nil {
308
- fmt .Println ("WARN: etcdInstanceType is deprecated and will be removed in v0.9.7. Please use etcd.instanceType instead" )
309
- c .Etcd .InstanceType = * c .DeprecatedEtcdInstanceType
310
- }
311
- //if c.DeprecatedEtcdCreateTimeout != nil {
312
- // c.Etcd.CreateTimeout = *c.DeprecatedEtcdCreateTimeout
313
- //}
314
- if c .DeprecatedEtcdRootVolumeIOPS != nil {
315
- fmt .Println ("WARN: etcdRootVolumeIOPS is deprecated and will be removed in v0.9.7. Please use etcd.rootVolume.iops instead" )
316
- c .Etcd .RootVolume .IOPS = * c .DeprecatedEtcdRootVolumeIOPS
317
- }
318
- if c .DeprecatedEtcdRootVolumeSize != nil {
319
- fmt .Println ("WARN: etcdRootVolumeSize is deprecated and will be removed in v0.9.7. Please use etcd.rootVolume.size instead" )
320
- c .Etcd .RootVolume .Size = * c .DeprecatedEtcdRootVolumeSize
321
- }
322
- if c .DeprecatedEtcdRootVolumeType != nil {
323
- fmt .Println ("WARN: etcdRootVolumeType is deprecated and will be removed in v0.9.7. Please use etcd.rootVolume.type instead" )
324
- c .Etcd .RootVolume .Type = * c .DeprecatedEtcdRootVolumeType
325
- }
326
- if c .DeprecatedEtcdDataVolumeIOPS != nil {
327
- fmt .Println ("WARN: etcdDataVolumeIOPS is deprecated and will be removed in v0.9.7. Please use etcd.dataVolume.iops instead" )
328
- c .Etcd .DataVolume .IOPS = * c .DeprecatedEtcdDataVolumeIOPS
329
- }
330
- if c .DeprecatedEtcdDataVolumeSize != nil {
331
- fmt .Println ("WARN: etcdDataVolumeSize is deprecated and will be removed in v0.9.7. Please use etcd.dataVolume.size instead" )
332
- c .Etcd .DataVolume .Size = * c .DeprecatedEtcdDataVolumeSize
333
- }
334
- if c .DeprecatedEtcdDataVolumeType != nil {
335
- fmt .Println ("WARN: etcdDataVolumeType is deprecated and will be removed in v0.9.7. Please use etcd.dataVolume.type instead" )
336
- c .Etcd .DataVolume .Type = * c .DeprecatedEtcdDataVolumeType
337
- }
338
- if c .DeprecatedEtcdDataVolumeEphemeral != nil {
339
- fmt .Println ("WARN: etcdDataVolumeEphemeral is deprecated and will be removed in v0.9.7. Please use etcd.dataVolume.ephemeral instead" )
340
- c .Etcd .DataVolume .Ephemeral = * c .DeprecatedEtcdDataVolumeEphemeral
341
- }
342
- if c .DeprecatedEtcdDataVolumeEncrypted != nil {
343
- fmt .Println ("WARN: etcdDataVolumeEncrypted is deprecated and will be removed in v0.9.7. Please use etcd.dataVolume.encrypted instead" )
344
- c .Etcd .DataVolume .Encrypted = * c .DeprecatedEtcdDataVolumeEncrypted
345
- }
346
- }
347
-
348
262
func (c * Cluster ) SetDefaults () {
349
263
// For backward-compatibility
350
264
if len (c .Subnets ) == 0 {
@@ -533,120 +447,12 @@ type DefaultWorkerSettings struct {
533
447
534
448
// Part of configuration which is specific to controller nodes
535
449
type ControllerSettings struct {
536
- model.Controller `yaml:"controller,omitempty"`
537
- DeprecatedControllerCount * int `yaml:"controllerCount,omitempty"`
538
- DeprecatedControllerCreateTimeout * string `yaml:"controllerCreateTimeout,omitempty"`
539
- DeprecatedControllerInstanceType * string `yaml:"controllerInstanceType,omitempty"`
540
- DeprecatedControllerRootVolumeType * string `yaml:"controllerRootVolumeType,omitempty"`
541
- DeprecatedControllerRootVolumeIOPS * int `yaml:"controllerRootVolumeIOPS,omitempty"`
542
- DeprecatedControllerRootVolumeSize * int `yaml:"controllerRootVolumeSize,omitempty"`
543
- DeprecatedControllerTenancy * string `yaml:"controllerTenancy,omitempty"`
544
- }
545
-
546
- func (c ControllerSettings ) ControllerCount () int {
547
- fmt .Println ("WARN: ControllerCount is deprecated and will be removed in v0.9.7. Please use Controller.Count instead" )
548
- return c .Controller .Count
549
- }
550
-
551
- func (c ControllerSettings ) ControllerCreateTimeout () string {
552
- fmt .Println ("WARN: ControllerCreateTimeout is deprecated and will be removed in v0.9.7. Please use Controller.CreateTimeout instead" )
553
- return c .Controller .CreateTimeout
554
- }
555
-
556
- func (c ControllerSettings ) ControllerInstanceType () string {
557
- fmt .Println ("WARN: ControllerInstanceType is deprecated and will be removed in v0.9.7. Please use Controller.InstanceType instead" )
558
- return c .Controller .InstanceType
559
- }
560
-
561
- func (c ControllerSettings ) ControllerRootVolumeType () string {
562
- fmt .Println ("WARN: ControllerRootVolumeType is deprecated and will be removed in v0.9.7. Please use Controller.RootVolume.Type instead" )
563
- return c .Controller .RootVolume .Type
564
- }
565
-
566
- func (c ControllerSettings ) ControllerRootVolumeIOPS () int {
567
- fmt .Println ("WARN: ControllerRootVolumeIOPS is deprecated and will be removed in v0.9.7. Please use Controller.RootVolume.IOPS instead" )
568
- return c .Controller .RootVolume .IOPS
569
- }
570
-
571
- func (c ControllerSettings ) ControllerRootVolumeSize () int {
572
- fmt .Println ("WARN: ControllerRootVolumeSize is deprecated and will be removed in v0.9.7. Please use Controller.RootVolume.Size instead" )
573
- return c .Controller .RootVolume .Size
574
- }
575
-
576
- func (c ControllerSettings ) ControllerTenancy () string {
577
- fmt .Println ("WARN: ControllerTenancy is deprecated and will be removed in v0.9.7. Please use Controller.Tenancy instead" )
578
- return c .Controller .Tenancy
450
+ model.Controller `yaml:"controller,omitempty"`
579
451
}
580
452
581
453
// Part of configuration which is specific to etcd nodes
582
454
type EtcdSettings struct {
583
- model.Etcd `yaml:"etcd,omitempty"`
584
- DeprecatedEtcdCount * int `yaml:"etcdCount"`
585
- DeprecatedEtcdInstanceType * string `yaml:"etcdInstanceType,omitempty"`
586
- DeprecatedEtcdRootVolumeSize * int `yaml:"etcdRootVolumeSize,omitempty"`
587
- DeprecatedEtcdRootVolumeType * string `yaml:"etcdRootVolumeType,omitempty"`
588
- DeprecatedEtcdRootVolumeIOPS * int `yaml:"etcdRootVolumeIOPS,omitempty"`
589
- DeprecatedEtcdDataVolumeSize * int `yaml:"etcdDataVolumeSize,omitempty"`
590
- DeprecatedEtcdDataVolumeType * string `yaml:"etcdDataVolumeType,omitempty"`
591
- DeprecatedEtcdDataVolumeIOPS * int `yaml:"etcdDataVolumeIOPS,omitempty"`
592
- DeprecatedEtcdDataVolumeEphemeral * bool `yaml:"etcdDataVolumeEphemeral,omitempty"`
593
- DeprecatedEtcdDataVolumeEncrypted * bool `yaml:"etcdDataVolumeEncrypted,omitempty"`
594
- DeprecatedEtcdTenancy * string `yaml:"etcdTenancy,omitempty"`
595
- }
596
-
597
- func (e EtcdSettings ) EtcdCount () int {
598
- fmt .Println ("WARN: EtcdCount is deprecated and will be removed in v0.9.7. Please use Etcd.Count instead" )
599
- return e .Etcd .Count
600
- }
601
-
602
- func (e EtcdSettings ) EtcdInstanceType () string {
603
- fmt .Println ("WARN: EtcdInstanceType is deprecated and will be removed in v0.9.7. Please use Etcd.InstanceType instead" )
604
- return e .Etcd .InstanceType
605
- }
606
-
607
- func (e EtcdSettings ) EtcdRootVolumeSize () int {
608
- fmt .Println ("WARN: EtcdRootVolumeSize is deprecated and will be removed in v0.9.7. Please use Etcd.RootVolume.Size instead" )
609
- return e .Etcd .RootVolume .Size
610
- }
611
-
612
- func (e EtcdSettings ) EtcdRootVolumeType () string {
613
- fmt .Println ("WARN: EtcdRootVolumeType is deprecated and will be removed in v0.9.7. Please use Etcd.RootVolume.Type instead" )
614
- return e .Etcd .RootVolume .Type
615
- }
616
-
617
- func (e EtcdSettings ) EtcdRootVolumeIOPS () int {
618
- fmt .Println ("WARN: EtcdRootVolumeIOPS is deprecated and will be removed in v0.9.7. Please use Etcd.RootVolume.IOPS instead" )
619
- return e .Etcd .RootVolume .IOPS
620
- }
621
-
622
- func (e EtcdSettings ) EtcdDataVolumeSize () int {
623
- fmt .Println ("WARN: EtcdDataVolumeSize is deprecated and will be removed in v0.9.7. Please use Etcd.DataVolume.Size instead" )
624
- return e .Etcd .DataVolume .Size
625
- }
626
-
627
- func (e EtcdSettings ) EtcdDataVolumeType () string {
628
- fmt .Println ("WARN: EtcdDataVolumeType is deprecated and will be removed in v0.9.7. Please use Etcd.DataVolume.Type instead" )
629
- return e .Etcd .DataVolume .Type
630
- }
631
-
632
- func (e EtcdSettings ) EtcdDataVolumeIOPS () int {
633
- fmt .Println ("WARN: EtcdDataVolumeIOPS is deprecated and will be removed in v0.9.7. Please use Etcd.DataVolume.IOPS instead" )
634
- return e .Etcd .DataVolume .IOPS
635
- }
636
-
637
- func (e EtcdSettings ) EtcdDataVolumeEphemeral () bool {
638
- fmt .Println ("WARN: EtcdDataVolumeEphemeral is deprecated and will be removed in v0.9.7. Please use Etcd.DataVolume.Ephemeral instead" )
639
- return e .Etcd .DataVolume .Ephemeral
640
- }
641
-
642
- func (e EtcdSettings ) EtcdDataVolumeEncrypted () bool {
643
- fmt .Println ("WARN: EtcdDataVolumeEncrypted is deprecated and will be removed in v0.9.7. Please use Etcd.DataVolume.Encrypted instead" )
644
- return e .Etcd .DataVolume .Encrypted
645
- }
646
-
647
- func (e EtcdSettings ) EtcdTenancy () string {
648
- fmt .Println ("WARN: EtcdTenancy is deprecated and will be removed in v0.9.7. Please use Etcd.Tenancy instead" )
649
- return e .Etcd .Tenancy
455
+ model.Etcd `yaml:"etcd,omitempty"`
650
456
}
651
457
652
458
// Part of configuration which is specific to flanneld
0 commit comments