From b8fdd811b5cba9e705d66f76f7afe34a00a91b89 Mon Sep 17 00:00:00 2001 From: Valentin Khramtsov Date: Fri, 16 Aug 2024 12:30:56 +0300 Subject: [PATCH] Deploy boiler main components to aws --- .../k8s-addons/eks-kube-prometheus-stack.tf | 2 +- .../modules/k8s-addons/eks-loki-stack.tf | 2 +- .../modules/k8s-addons/eks-metric-server.tf | 106 ++++++++++++++++++ .../modules/k8s-addons/eks-storageclass.tf | 17 +++ .../modules/k8s-addons/helm-releases.yaml | 6 + .../demo/common/aws-acm/.terraform.lock.hcl | 3 +- .../demo/common/aws-eks/.terraform.lock.hcl | 10 +- .../demo/common/aws-r53/.terraform.lock.hcl | 3 +- .../demo/common/aws-vpc/.terraform.lock.hcl | 3 +- terragrunt/ACCOUNT_ID/us-east-1/demo/env.yaml | 4 +- .../demo/k8s-addons/.terraform.lock.hcl | 19 +++- .../demo/karpenter/.terraform.lock.hcl | 9 +- .../ebs-encryption/.terraform.lock.hcl | 36 +++--- 13 files changed, 187 insertions(+), 33 deletions(-) create mode 100644 terraform/modules/k8s-addons/eks-metric-server.tf diff --git a/terraform/modules/k8s-addons/eks-kube-prometheus-stack.tf b/terraform/modules/k8s-addons/eks-kube-prometheus-stack.tf index 97395938..0df1c3ff 100644 --- a/terraform/modules/k8s-addons/eks-kube-prometheus-stack.tf +++ b/terraform/modules/k8s-addons/eks-kube-prometheus-stack.tf @@ -59,7 +59,7 @@ prometheus: storageSpec: volumeClaimTemplate: spec: - storageClassName: advanced + storageClassName: gp3 accessModes: ["ReadWriteOnce"] resources: requests: diff --git a/terraform/modules/k8s-addons/eks-loki-stack.tf b/terraform/modules/k8s-addons/eks-loki-stack.tf index 3c22eb6f..4193cb0f 100644 --- a/terraform/modules/k8s-addons/eks-loki-stack.tf +++ b/terraform/modules/k8s-addons/eks-loki-stack.tf @@ -30,7 +30,7 @@ loki: accessModes: - ReadWriteOnce size: 10Gi - storageClassName: advanced + storageClassName: gp3 serviceMonitor: enabled: true scrapeTimeout: 10s diff --git a/terraform/modules/k8s-addons/eks-metric-server.tf b/terraform/modules/k8s-addons/eks-metric-server.tf new file mode 100644 index 00000000..862dedcc --- /dev/null +++ b/terraform/modules/k8s-addons/eks-metric-server.tf @@ -0,0 +1,106 @@ +locals { + metrics_server = { + name = local.helm_releases[index(local.helm_releases.*.id, "metrics-server")].id + enabled = local.helm_releases[index(local.helm_releases.*.id, "metrics-server")].enabled + chart = local.helm_releases[index(local.helm_releases.*.id, "metrics-server")].chart + repository = local.helm_releases[index(local.helm_releases.*.id, "metrics-server")].repository + chart_version = local.helm_releases[index(local.helm_releases.*.id, "metrics-server")].chart_version + namespace = local.helm_releases[index(local.helm_releases.*.id, "metrics-server")].namespace + } + + metrics_server_values = <