Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding cluster upgrade in blue-green with route53 example #1255

Merged
merged 20 commits into from
Dec 22, 2022

Conversation

allamand
Copy link
Contributor

@allamand allamand commented Dec 13, 2022

What does this PR do?

This add a sample to allow Canary EKS cluster migration for ArgoCD stateless workloads using Route53 weighted records.

The changes in Route53 weighted are managed with Terraform variable from the 2 clusters.

Motivation

  • Resolves #

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I have added a new example under examples to support my PR
  • Yes, I have created another PR for add-ons under add-ons repo (if applicable)
  • Yes, I have updated the docs for this feature
  • Yes, I ran pre-commit run -a with this PR

Note: Not all the PRs require a new example and/or doc page. In general:

  • Use an existing example when possible to demonstrate a new addons usage
  • A new docs page under docs/add-ons/* is required for new a new addon

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

@allamand allamand requested a review from a team as a code owner December 13, 2022 14:30
@allamand allamand changed the title adding cluster upgrade in blue-green with route53 example feat: adding cluster upgrade in blue-green with route53 example Dec 13, 2022
@allamand allamand changed the title feat: adding cluster upgrade in blue-green with route53 example feat: Adding cluster upgrade in blue-green with route53 example Dec 13, 2022
@allamand allamand temporarily deployed to EKS Blueprints Test December 14, 2022 09:17 — with GitHub Actions Inactive
examples/upgrade/blue-green-route53/README.md Outdated Show resolved Hide resolved
examples/upgrade/blue-green-route53/README.md Outdated Show resolved Hide resolved
examples/upgrade/blue-green-route53/README.md Outdated Show resolved Hide resolved
examples/upgrade/blue-green-route53/core-infra/locals.tf Outdated Show resolved Hide resolved
Comment on lines 31 to 43
public_subnet_tags = {
"kubernetes.io/cluster/${local.name}-blue" = "shared"
"kubernetes.io/cluster/${local.name}-green" = "shared"
"kubernetes.io/cluster/${local.name}-nodomain" = "shared"
"kubernetes.io/role/elb" = "1"
}

private_subnet_tags = {
"kubernetes.io/cluster/${local.name}-blue" = "shared"
"kubernetes.io/cluster/${local.name}-green" = "shared"
"kubernetes.io/cluster/${local.name}-nodomain" = "shared"
"kubernetes.io/role/internal-elb" = "1"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these tags still required? Afaik only the "kubernetes.io/role/elb" = "1" is required.

Suggested change
public_subnet_tags = {
"kubernetes.io/cluster/${local.name}-blue" = "shared"
"kubernetes.io/cluster/${local.name}-green" = "shared"
"kubernetes.io/cluster/${local.name}-nodomain" = "shared"
"kubernetes.io/role/elb" = "1"
}
private_subnet_tags = {
"kubernetes.io/cluster/${local.name}-blue" = "shared"
"kubernetes.io/cluster/${local.name}-green" = "shared"
"kubernetes.io/cluster/${local.name}-nodomain" = "shared"
"kubernetes.io/role/internal-elb" = "1"
}
public_subnet_tags = {
"kubernetes.io/role/elb" = "1"
}
private_subnet_tags = {
"kubernetes.io/role/internal-elb" = "1"
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll test this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So yes this is needed for Karpenter, we uses it in the subnet selector

  subnetSelector:
    kubernetes.io/cluster/{{ .Values.spec.clusterName }}: '*'
    kubernetes.io/role/internal-elb: '1' # to select only private subnets

Without this, your Karpenter nodes could be created in another VPC used maybe by another cluster

examples/upgrade/blue-green-route53/core-infra/main.tf Outdated Show resolved Hide resolved
examples/upgrade/blue-green-route53/eks-blue/locals.tf Outdated Show resolved Hide resolved
examples/upgrade/blue-green-route53/eks-green/locals.tf Outdated Show resolved Hide resolved
Co-authored-by: Apoorva Kulkarni <askulkarni84@gmail.com>
Co-authored-by: Apoorva Kulkarni <askulkarni84@gmail.com>
Co-authored-by: Apoorva Kulkarni <askulkarni84@gmail.com>
@allamand allamand temporarily deployed to EKS Blueprints Test December 19, 2022 12:57 — with GitHub Actions Inactive
@askulkarni2 askulkarni2 temporarily deployed to EKS Blueprints Test December 21, 2022 00:33 — with GitHub Actions Inactive
Signed-off-by: sallaman <sallaman@amazon.com>
@askulkarni2 askulkarni2 temporarily deployed to EKS Blueprints Test December 22, 2022 00:28 — with GitHub Actions Inactive
@askulkarni2 askulkarni2 temporarily deployed to EKS Blueprints Test December 22, 2022 07:10 — with GitHub Actions Inactive
@askulkarni2 askulkarni2 merged commit b217170 into aws-ia:main Dec 22, 2022
allamand added a commit to allamand/terraform-aws-eks-blueprints that referenced this pull request Jan 10, 2023
…ia#1255)

Signed-off-by: sallaman <sallaman@amazon.com>
Co-authored-by: Apoorva Kulkarni <kuapoorv@amazon.com>
vara-bonthu pushed a commit that referenced this pull request Feb 2, 2023
Signed-off-by: sallaman <sallaman@amazon.com>
Co-authored-by: Apoorva Kulkarni <kuapoorv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants