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

General Upgrades and Housekeeping for Terraform bootstrap #193

Merged
merged 21 commits into from
May 31, 2024

Conversation

edgarsilva948
Copy link
Collaborator

What does this PR do?

  • Eliminates the eks blueprints addon module, directly linking to it.
  • Removes the variables file to align with EKS Blueprints best practices.
  • Upgrades all related blueprint modules including IRSA, EKS, and Addons.
  • Upgrades Crossplane to enable new metrics.
  • Revises Helm values for consistent naming and organization.
  • Replaces the Crossplane grafana dashboard and adds an ArgoCD dashboard.
  • Replaces the outdated gavinbunney/kubectl.
  • Transforms the cleanup process from a script to documentation.

Motivation

The motivation behind this pull request is to enhance maintainability, and ensure that our Blueprints adhere to the latest best practices.

More

  • Yes, I have tested the PR using my local account setup (Please refer to the Additional Notes for test evidence).
  • Yes, I have added a new example under examples to support my PR.
  • Yes, I have updated the docs for this feature.
  • Yes, I have linked to an issue or feature request (applicable to PRs that solve a bug or a feature request).

Note:

  • Not all PRs require examples and docs.
  • We prefer small, well-tested pull requests. Please ensure your pull requests are self-contained, and commits are squashed.

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

N/A

@edgarsilva948
Copy link
Collaborator Author

this PR fixes #166

Comment on lines 46 to 47
name = "crossplane-blueprints"
region = "us-east-1"
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for removing the vars here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've seen the EKS Blueprints adopting this pattern of not having the variables file, I think it makes it easier for the user:

Copy link
Contributor

@candonov candonov May 30, 2024

Choose a reason for hiding this comment

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

keep the vars here as well, we need them to be able to pass and override on command line

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

bootstrap/terraform/main.tf Show resolved Hide resolved
Comment on lines 49 to 50
cluster_version = "1.30"
capacity_type = "SPOT"
Copy link
Contributor

Choose a reason for hiding this comment

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

same question, what is the reason for removing the vars?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the same here:

Copy link
Contributor

Choose a reason for hiding this comment

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

same here, keep the vars

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

bootstrap/terraform/main.tf Show resolved Hide resolved
values = [
templatefile("${path.module}/argocd-values.yaml", {
templatefile("${path.module}/values/control-plane-eks-argocd-stack.yaml", {
Copy link
Contributor

Choose a reason for hiding this comment

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

It is nice to organize under values/ folder but why prefix with control-plane-eks-?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there is no specific reason.. I thought it would be clearer, but I can remove it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

chart = "crossplane"
chart_version = "1.16.0"
repository = "https://charts.crossplane.io/stable/"
values = [file("${path.module}/values/control-plane-eks-crossplane-stack.yaml")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice touch! Love it! Much more readable!

@@ -210,8 +207,8 @@ locals {
crossplane_namespace = "crossplane-system"

upjet_aws_provider = {
enable = var.enable_upjet_aws_provider # defaults to true
version = "v1.4.0"
enable = true
Copy link
Contributor

Choose a reason for hiding this comment

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

keep the variable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added back

@@ -233,15 +230,15 @@ locals {
}

aws_provider = {
enable = var.enable_aws_provider # defaults to false
enable = false
Copy link
Contributor

Choose a reason for hiding this comment

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

keep the variable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added back

version = "v0.48.0"
name = "aws-provider"
runtime_config = "aws-runtime-config"
provider_config_name = "aws-provider-config" #this is the providerConfigName used in all the examples in this repo
}

kubernetes_provider = {
enable = var.enable_kubernetes_provider # defaults to true
enable = true
Copy link
Contributor

Choose a reason for hiding this comment

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

keep the variable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added back

@@ -251,7 +248,7 @@ locals {
}

helm_provider = {
enable = var.enable_helm_provider # defaults to true
enable = true
Copy link
Contributor

Choose a reason for hiding this comment

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

keep the variable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added back

@edgarsilva948
Copy link
Collaborator Author

@candonov adjusted it with your recommendations

values = [
templatefile("${path.module}/argocd-values.yaml", {
templatefile("${path.module}/values/argocd-stack.yaml", {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's have the file name match the add-on name, argocd.yaml

values = [file("${path.module}/kube-prometheus-stack-values.yaml")]
wait = true
timeout = "600"
values = [file("${path.module}/values/prometheus-stack.yaml")]
Copy link
Contributor

Choose a reason for hiding this comment

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

kube-prometheus-stack

chart = "crossplane"
chart_version = "1.16.0"
repository = "https://charts.crossplane.io/stable/"
values = [file("${path.module}/values/crossplane-stack.yaml")]
Copy link
Contributor

Choose a reason for hiding this comment

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

crossplane.yaml

Copy link
Contributor

@candonov candonov left a comment

Choose a reason for hiding this comment

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

lgtm

@candonov candonov merged commit de9662d into awslabs:main May 31, 2024
1 check passed
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