From e9b8b8121d711da196111c244b45910ebafd64d9 Mon Sep 17 00:00:00 2001 From: Edgardo Quiroga Date: Thu, 30 Mar 2023 16:34:20 -0300 Subject: [PATCH 1/8] updating kubernetes image repository --- CHANGELOG.md | 5 +++++ README.md | 1 + helm.tf | 21 +++++++++++++++++++++ variables.tf | 4 +++- 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9abc045..cae44b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.6.1] - 2023-03-30 + +### Fixed + +- Update kubernetes registry from k8s.gcr.io Image to registry.k8s.io, based on this [announcement](https://kubernetes.io/blog/2023/02/06/k8s-gcr-io-freeze-announcement/) ## [4.6.0] - 2023-02-23 diff --git a/README.md b/README.md index dabb5e4..815796c 100644 --- a/README.md +++ b/README.md @@ -367,6 +367,7 @@ module "eks_main" { | grafana\_ingress\_class\_name | ingress className | `string` | `nginx` | no | | grafana\_persistence\_enabled | Persistent volume | `bool` | `false` | no | | grafana\_priority\_class\_name | allows you to set a priority class | `string` | `""` | no | +| k8s\_image\_registry | Kubernetes image registry. | `string` | `registry.k8s.io` | no | ## Outputs diff --git a/helm.tf b/helm.tf index cb49db9..6f64e12 100644 --- a/helm.tf +++ b/helm.tf @@ -14,6 +14,11 @@ resource "helm_release" "ingress_nginx" { file("${path.module}/helm-values/ingress-nginx.yaml") ] + set { + name = "controller.image.registry" + value = var.k8s_image_registry + } + set { name = "controller.metrics.enabled" value = var.ingress_service_monitor_enabled @@ -66,6 +71,11 @@ resource "helm_release" "ingress_nginx_additional" { file("${path.module}/helm-values/ingress-nginx-additional.yaml") ] + set { + name = "controller.image.registry" + value = var.k8s_image_registry + } + set { name = "controller.metrics.enabled" value = var.ingress_service_monitor_enabled @@ -114,6 +124,11 @@ resource "helm_release" "cluster_autoscaler" { chart = "cluster-autoscaler" version = var.cluster_autoscaler_chart_version + set { + name = "image.repository" + value = "${var.k8s_image_registry}/autoscaling/cluster-autoscaler" + } + set { name = "autoDiscovery.clusterName" value = var.cluster_name @@ -197,6 +212,12 @@ resource "helm_release" "prometheus_stack" { dependency_update = true timeout = 600 + + set { + name = "admissionWebhooks.patch.image.registry" + value = var.k8s_image_registry + } + set { name = "prometheus.prometheusSpec.additionalScrapeConfigs" value = var.prometheus_additional_scrape_configs diff --git a/variables.tf b/variables.tf index 3396cf3..4a58511 100644 --- a/variables.tf +++ b/variables.tf @@ -119,7 +119,9 @@ variable "eks_addons" { } # ============================== helm releases ============================== # - +variable "k8s_image_registry" { + default = "registry.k8s.io" +} # ================== ingress-nginx ================= variable "helm_ingress_nginx_enabled" { default = false From 12a013dee42036e6680bde6352305b8bb488d607 Mon Sep 17 00:00:00 2001 From: Edgardo Quiroga Date: Thu, 30 Mar 2023 16:38:07 -0300 Subject: [PATCH 2/8] fixing variable name --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 4a58511..a15079c 100644 --- a/variables.tf +++ b/variables.tf @@ -240,7 +240,7 @@ variable "loki_chart_version" { default = "0.48.3" } -variable "loki_priorityclass" { +variable "loki_priority_class_name" { default = "" } From 97ab09b6d38be31ddb1a432111f8a69866df44ac Mon Sep 17 00:00:00 2001 From: Edgardo Quiroga Date: Thu, 30 Mar 2023 17:36:04 -0300 Subject: [PATCH 3/8] updating kubernetes image repository for prometheus helm chart --- helm.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm.tf b/helm.tf index 6f64e12..e602f64 100644 --- a/helm.tf +++ b/helm.tf @@ -214,8 +214,8 @@ resource "helm_release" "prometheus_stack" { set { - name = "admissionWebhooks.patch.image.registry" - value = var.k8s_image_registry + name = "admissionWebhooks.patch.image.repository" + value = "${var.k8s_image_registry}/ingress-nginx/kube-webhook-certgen" } set { From e21ef6a2c414e3812b1682e0fb95878d036a1949 Mon Sep 17 00:00:00 2001 From: Edgardo Quiroga Date: Thu, 30 Mar 2023 17:59:49 -0300 Subject: [PATCH 4/8] updating kubernetes image repository for prometheus helm chart --- helm.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm.tf b/helm.tf index e602f64..601600c 100644 --- a/helm.tf +++ b/helm.tf @@ -214,7 +214,7 @@ resource "helm_release" "prometheus_stack" { set { - name = "admissionWebhooks.patch.image.repository" + name = "prometheusOperator.admissionWebhooks.patch.image.repository" value = "${var.k8s_image_registry}/ingress-nginx/kube-webhook-certgen" } From 5ab715158605c5ae6c0696893c66b09514e6c54e Mon Sep 17 00:00:00 2001 From: Edgardo Quiroga Date: Thu, 30 Mar 2023 19:09:01 -0300 Subject: [PATCH 5/8] updating kubernetes image repository for prometheus kube state metrics helm chart --- helm.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/helm.tf b/helm.tf index 601600c..250ace4 100644 --- a/helm.tf +++ b/helm.tf @@ -213,6 +213,11 @@ resource "helm_release" "prometheus_stack" { timeout = 600 + set { + name = "kube-state-metrics.image.registry" + value = var.k8s_image_registry + } + set { name = "prometheusOperator.admissionWebhooks.patch.image.repository" value = "${var.k8s_image_registry}/ingress-nginx/kube-webhook-certgen" From 8f0da3eb06fc6825307853669b804f21a3c402b2 Mon Sep 17 00:00:00 2001 From: Edgardo Quiroga Date: Thu, 30 Mar 2023 19:40:48 -0300 Subject: [PATCH 6/8] updating kubernetes image repository for prometheus kube state metrics helm chart --- helm.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm.tf b/helm.tf index 250ace4..789afc6 100644 --- a/helm.tf +++ b/helm.tf @@ -214,8 +214,8 @@ resource "helm_release" "prometheus_stack" { set { - name = "kube-state-metrics.image.registry" - value = var.k8s_image_registry + name = "kube-state-metrics.image.repository" + value = "${var.k8s_image_registry}/kube-state-metrics/kube-state-metrics" } set { From 32a9e01254cf9edbc8f1b7893d0e74cfa4775ef0 Mon Sep 17 00:00:00 2001 From: Edgardo Quiroga Date: Fri, 31 Mar 2023 08:44:55 -0300 Subject: [PATCH 7/8] fixing tempo priority class name value set and tempor chart version variable name --- helm.tf | 4 ++-- nodegroups.tf | 5 +---- variables.tf | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/helm.tf b/helm.tf index 789afc6..2a389cd 100644 --- a/helm.tf +++ b/helm.tf @@ -892,7 +892,7 @@ resource "helm_release" "tempo_distributed" { create_namespace = true repository = "https://grafana.github.io/helm-charts" chart = "tempo-distributed" - version = var.tempo_chart_versoin + version = var.tempo_chart_version dependency_update = true timeout = 600 @@ -901,7 +901,7 @@ resource "helm_release" "tempo_distributed" { ] set { - name = "prometheus_priority_class_name" + name = "global.priorityClassName" value = var.tempo_priority_class_name } diff --git a/nodegroups.tf b/nodegroups.tf index 2926bbe..097cf15 100644 --- a/nodegroups.tf +++ b/nodegroups.tf @@ -35,11 +35,9 @@ locals { resource "aws_key_pair" "eks" { key_name = aws_eks_cluster.main.name public_key = base64decode(aws_ssm_parameter.eks_public_key.value) - tags = var.eks_tags + tags = var.eks_tags } - - resource "aws_launch_template" "eks_node_groups" { for_each = merge(local.custom_node_groups, local.managed_node_groups) name = each.key @@ -140,7 +138,6 @@ resource "aws_autoscaling_group" "eks" { } } - lifecycle { ignore_changes = [desired_capacity] } diff --git a/variables.tf b/variables.tf index a15079c..9494d72 100644 --- a/variables.tf +++ b/variables.tf @@ -575,13 +575,12 @@ variable "helm_tempo_enabled" { default = false } -variable "tempo_chart_versoin" { +variable "tempo_chart_version" { default = "0.17.1" } variable "tempo_priority_class_name" { default = null - } # tempo - compactor From 96d6ad53931a5e65062b041e0ae3a8dcc468f003 Mon Sep 17 00:00:00 2001 From: Edgardo Quiroga Date: Fri, 31 Mar 2023 08:51:27 -0300 Subject: [PATCH 8/8] updating changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cae44b3..649c8a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Update kubernetes registry from k8s.gcr.io Image to registry.k8s.io, based on this [announcement](https://kubernetes.io/blog/2023/02/06/k8s-gcr-io-freeze-announcement/) +- Update kubernetes registry from k8s.gcr.io Image to registry.k8s.io, based on this [announcement](https://kubernetes.io/blog/2023/02/06/k8s-gcr-io-freeze-announcement/) +- Typo on Tempo Helm chart version variable name. +- Typo on Tempo priority class name set value. ## [4.6.0] - 2023-02-23