Skip to content

Commit

Permalink
Merge pull request kubernetes-retired#927 from mumoshu/drop-worker-count
Browse files Browse the repository at this point in the history
Drop the deprecated key `workerCount` in cluster.yaml
  • Loading branch information
mumoshu authored Sep 6, 2017
2 parents 19ec1e1 + 5f8d397 commit 3e19289
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
6 changes: 0 additions & 6 deletions core/controlplane/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ func NewDefaultCluster() *Cluster {
DNSServiceIP: "10.3.0.10",
},
DefaultWorkerSettings: DefaultWorkerSettings{
WorkerCount: 0,
WorkerCreateTimeout: "PT15M",
WorkerInstanceType: "t2.medium",
WorkerRootVolumeType: "gp2",
Expand Down Expand Up @@ -468,7 +467,6 @@ type DeploymentSettings struct {

// Part of configuration which is specific to worker nodes
type DefaultWorkerSettings struct {
WorkerCount int `yaml:"workerCount,omitempty"`
WorkerCreateTimeout string `yaml:"workerCreateTimeout,omitempty"`
WorkerInstanceType string `yaml:"workerInstanceType,omitempty"`
WorkerRootVolumeType string `yaml:"workerRootVolumeType,omitempty"`
Expand Down Expand Up @@ -1334,10 +1332,6 @@ func (c DefaultWorkerSettings) Validate() error {
}
}

if c.WorkerCount != 0 {
return errors.New("`workerCount` is removed. Set worker.nodePools[].count per node pool instead")
}

return nil
}

Expand Down
4 changes: 1 addition & 3 deletions core/controlplane/config/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,6 @@ kmsKeyArn: "{{.KMSKeyARN}}"
# [Service]
# ExecStart=/bin/rkt run --set-env TAGS=Controller ...

# Default number of worker nodes per node pool to create, for more control use `worker.nodePools[].count` and/or `worker.autoScalingGroup` and do not use this setting
#workerCount: 1

worker:
#
# # Settings that apply to all worker node pools
Expand Down Expand Up @@ -320,6 +317,7 @@ worker:
# #
#
# # Number of worker nodes to create for an autoscaling group based pool
# # Specify `worker.autoScalingGroup` instead for more control over its min/max/desired capacity.
# count: 1
#
# # Instance type for worker nodes
Expand Down
7 changes: 0 additions & 7 deletions test/integration/maincluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4064,13 +4064,6 @@ worker:
`,
expectedErrorMessage: `internet gateway id can't be omitted when there're one or more managed public subnets in an existing VPC`,
},
{
context: "WithNonZeroWorkerCount",
configYaml: minimalValidConfigYaml + `
workerCount: 1
`,
expectedErrorMessage: "`workerCount` is removed. Set worker.nodePools[].count per node pool instead",
},
{
context: "WithVpcIdAndVPCCIDRSpecified",
configYaml: minimalValidConfigYaml + `
Expand Down

0 comments on commit 3e19289

Please sign in to comment.