From efbc74c52011a957e04b10e65ec117d22ccf6a84 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 17 Nov 2018 23:20:29 -0800 Subject: [PATCH] pkg/tfvars/aws: Drop custom subnets This functionality was originally from 8324c212 (AWS: VPC subnets with custom CIDRs and AZs per workers / masters, 2017-04-20, coreos/tectonic-installer#267), but we haven't exposed it in openshift-install (which has never used the parsers removed by f7a4e68b, pkg/types/config: Drop ParseConfig and other Parse* methods, 2018-10-02, #403). Currently we are unable to scale masters post-install, because auto-scaling etcd is difficult. Depending on how long that takes us to get working, we may need to re-enable this for masters later. Workers are already managable via the cluster API and MachineSets, so folks who need custom worker subnets can create a cluster without workers and then launch their worker machine-sets directly as a day-2 operation. The cluster-API type chain is: * MachineSet.Spec [1] * MachineSetSpec.Template [2] * MachineTemplateSpec.Spec [3] * MachineSpec.ProviderConfig [4] * ProviderConfig.Value [5] * RawExtension which is nice and generic, but a dead-end for structured configuration ;). Jumping over to the OpenShift AWS provider, there is an AWSMachineProviderConfig.Subnet [6]. I don't see code for auto-creating those subnets, but an admin could manually create the subnet wherever they wanted and then use the cluster API to launch new workers into that subnet. And maybe there will be generic tooling to automate that subnet creation (setting up routing, etc.) to make that less tedious/error-prone. Also in this space, see [7,8] [1]: https://github.com/kubernetes-sigs/cluster-api/blob/0734939e05aeb64ab198e3feeee8b4e90ee5cbb2/pkg/apis/cluster/v1alpha1/machineset_types.go#L42 [2]: https://github.com/kubernetes-sigs/cluster-api/blob/0734939e05aeb64ab198e3feeee8b4e90ee5cbb2/pkg/apis/cluster/v1alpha1/machineset_types.go#L68-L71 [3]: https://github.com/kubernetes-sigs/cluster-api/blob/0734939e05aeb64ab198e3feeee8b4e90ee5cbb2/pkg/apis/cluster/v1alpha1/machineset_types.go#L84-L87 [4]: https://github.com/kubernetes-sigs/cluster-api/blob/0734939e05aeb64ab198e3feeee8b4e90ee5cbb2/pkg/apis/cluster/v1alpha1/machine_types.go#L62-L64 [5]: https://github.com/kubernetes-sigs/cluster-api/blob/0734939e05aeb64ab198e3feeee8b4e90ee5cbb2/pkg/apis/cluster/v1alpha1/common_types.go#L29-L34 [6]: https://github.com/openshift/cluster-api-provider-aws/blob/e6986093d1fbac2084c50b04fe2f78125ffca582/pkg/apis/awsproviderconfig/v1alpha1/awsmachineproviderconfig_types.go#L130-L131 [7]: https://github.com/kubernetes/kops/issues/1333 [8]: https://github.com/kubernetes-sigs/cluster-api/blob/0734939e05aeb64ab198e3feeee8b4e90ee5cbb2/pkg/apis/cluster/v1alpha1/cluster_types.go#L62-L82 --- data/data/aws/main.tf | 4 ---- data/data/aws/variables-aws.tf | 23 ----------------------- data/data/aws/vpc/common.tf | 4 ++-- data/data/aws/vpc/variables.tf | 10 ---------- data/data/aws/vpc/vpc-private.tf | 5 +---- data/data/aws/vpc/vpc-public.tf | 5 +---- pkg/tfvars/aws/aws.go | 16 +++++++--------- 7 files changed, 11 insertions(+), 56 deletions(-) diff --git a/data/data/aws/main.tf b/data/data/aws/main.tf index f0fc7674747..f6d7db44e6b 100644 --- a/data/data/aws/main.tf +++ b/data/data/aws/main.tf @@ -93,10 +93,6 @@ module "vpc" { external_worker_subnet_ids = "${compact(var.tectonic_aws_external_worker_subnet_ids)}" extra_tags = "${var.tectonic_aws_extra_tags}" - // empty map subnet_configs will have the vpc module creating subnets in all availabile AZs - new_master_subnet_configs = "${var.tectonic_aws_master_custom_subnets}" - new_worker_subnet_configs = "${var.tectonic_aws_worker_custom_subnets}" - private_master_endpoints = "${local.private_endpoints}" public_master_endpoints = "${local.public_endpoints}" } diff --git a/data/data/aws/variables-aws.tf b/data/data/aws/variables-aws.tf index 615e9a19045..76bbc70cb7c 100644 --- a/data/data/aws/variables-aws.tf +++ b/data/data/aws/variables-aws.tf @@ -171,29 +171,6 @@ Ignored if the volume type is not io1. EOF } -variable "tectonic_aws_master_custom_subnets" { - type = "map" - default = {} - - description = <