From d8ac0a7c497c90dabd4ea12e7c2fdd11cf7ef8be Mon Sep 17 00:00:00 2001 From: Ivan Schasny Date: Mon, 23 Jan 2023 12:37:24 +0000 Subject: [PATCH] Move double hashing node group to ue2a To where VPCs are --- deploy/infrastructure/dev/us-east-2/eks.tf | 4 ++-- deploy/infrastructure/dev/us-east-2/vpc.tf | 17 +++++++++++++++++ .../us-east-2/cluster/kube-system/aws-auth.yaml | 2 +- .../storetheindex/instances/ago/deployment.yaml | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/deploy/infrastructure/dev/us-east-2/eks.tf b/deploy/infrastructure/dev/us-east-2/eks.tf index 231f28ce1..a01eb53b0 100644 --- a/deploy/infrastructure/dev/us-east-2/eks.tf +++ b/deploy/infrastructure/dev/us-east-2/eks.tf @@ -22,12 +22,12 @@ module "eks" { eks_managed_node_groups = { # Node group used by double hashing indexer nodes - dev-ue2b-r6a-xl = { + dev-ue2a-r6a-xl = { min_size = 0 max_size = 3 desired_size = 1 instance_types = ["r6a.xlarge"] - subnet_ids = [data.aws_subnet.ue2b1.id] + subnet_ids = [data.aws_subnet.ue2a2.id] } dev-ue2-m4-xl-2 = { min_size = 3 diff --git a/deploy/infrastructure/dev/us-east-2/vpc.tf b/deploy/infrastructure/dev/us-east-2/vpc.tf index 3911fc1b0..d2dc98ec8 100644 --- a/deploy/infrastructure/dev/us-east-2/vpc.tf +++ b/deploy/infrastructure/dev/us-east-2/vpc.tf @@ -56,6 +56,23 @@ data "aws_subnet" "ue2a1" { } } +data "aws_subnet" "ue2a2" { + vpc_id = module.vpc.vpc_id + + filter { + name = "availability-zone" + values = ["us-east-2a"] + } + filter { + name = "subnet-id" + values = module.vpc.private_subnets + } + filter { + name = "cidr-block" + values = ["20.10.4.0/24"] + } +} + data "aws_subnet" "ue2b1" { vpc_id = module.vpc.vpc_id diff --git a/deploy/manifests/dev/us-east-2/cluster/kube-system/aws-auth.yaml b/deploy/manifests/dev/us-east-2/cluster/kube-system/aws-auth.yaml index a33d31da8..d8c6da0eb 100644 --- a/deploy/manifests/dev/us-east-2/cluster/kube-system/aws-auth.yaml +++ b/deploy/manifests/dev/us-east-2/cluster/kube-system/aws-auth.yaml @@ -12,7 +12,7 @@ data: - groups: - system:bootstrappers - system:nodes - rolearn: arn:aws:iam::407967248065:role/dev-ue2b-r6a-xl-eks-node-group + rolearn: arn:aws:iam::407967248065:role/dev-ue2a-r6a-xl-eks-node-group username: system:node:{{EC2PrivateDNSName}} - groups: - system:bootstrappers diff --git a/deploy/manifests/dev/us-east-2/tenant/storetheindex/instances/ago/deployment.yaml b/deploy/manifests/dev/us-east-2/tenant/storetheindex/instances/ago/deployment.yaml index 9b340c04f..9f6b201a0 100644 --- a/deploy/manifests/dev/us-east-2/tenant/storetheindex/instances/ago/deployment.yaml +++ b/deploy/manifests/dev/us-east-2/tenant/storetheindex/instances/ago/deployment.yaml @@ -32,7 +32,7 @@ spec: - key: topology.kubernetes.io/zone operator: In values: - - us-east-2b + - us-east-2a volumes: - name: data persistentVolumeClaim: