From 187a44c5a955f4f610a8b369995ee9a0caf694a0 Mon Sep 17 00:00:00 2001 From: paduin Date: Mon, 18 Sep 2023 11:30:37 +0200 Subject: [PATCH 1/5] fix ingress error --- k8s-api.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s-api.tf b/k8s-api.tf index 7d8bfb4..4284cba 100644 --- a/k8s-api.tf +++ b/k8s-api.tf @@ -128,7 +128,7 @@ resource "kubernetes_service" "beekeeper_api" { } } -resource "kubernetes_ingress" "beekeeper-api" { +resource "kubernetes_ingress_v1" "beekeeper-api" { metadata { name = local.api_full_name namespace = var.k8s_namespace From 2e27fc1a78e1598153627b1cfe465644cc7440cb Mon Sep 17 00:00:00 2001 From: paduin Date: Mon, 18 Sep 2023 11:56:43 +0200 Subject: [PATCH 2/5] fix syntax --- k8s-api.tf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/k8s-api.tf b/k8s-api.tf index 4284cba..c24f63b 100644 --- a/k8s-api.tf +++ b/k8s-api.tf @@ -140,8 +140,12 @@ resource "kubernetes_ingress_v1" "beekeeper-api" { http { path { backend { - service_name = local.api_full_name - service_port = var.k8s_beekeeper_api_port + service { + name = local.api_full_name + port { + port = var.k8s_beekeeper_api_port + } + } } path = "/" } From 468373d2545dc272ac1f480e25dfb325f971b670 Mon Sep 17 00:00:00 2001 From: paduin Date: Mon, 18 Sep 2023 12:17:48 +0200 Subject: [PATCH 3/5] upgrade provider --- version.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.tf b/version.tf index cade80a..22bad9f 100644 --- a/version.tf +++ b/version.tf @@ -7,7 +7,7 @@ terraform { required_version = ">= 0.12.31" required_providers { - kubernetes = "~> 1.0" + kubernetes = "~> 2.7.0" aws = "~> 4.0" } } From edae52edbddd1374ace19fccc334503727d28c14 Mon Sep 17 00:00:00 2001 From: paduin Date: Mon, 18 Sep 2023 12:27:39 +0200 Subject: [PATCH 4/5] upgrade to new K8S provider --- k8s-api.tf | 6 +++--- k8s-metadata-cleanup.tf | 4 ++-- k8s-path-cleanup.tf | 4 ++-- k8s-scheduler-apiary.tf | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/k8s-api.tf b/k8s-api.tf index c24f63b..dce3009 100644 --- a/k8s-api.tf +++ b/k8s-api.tf @@ -65,11 +65,11 @@ resource "kubernetes_deployment" "beekeeper_api" { } resources { - limits { + limits = { memory = var.k8s_api_memory cpu = var.k8s_api_cpu } - requests { + requests = { memory = var.k8s_api_memory cpu = var.k8s_api_cpu } @@ -143,7 +143,7 @@ resource "kubernetes_ingress_v1" "beekeeper-api" { service { name = local.api_full_name port { - port = var.k8s_beekeeper_api_port + number = var.k8s_beekeeper_api_port } } } diff --git a/k8s-metadata-cleanup.tf b/k8s-metadata-cleanup.tf index a7a926d..a60b58c 100644 --- a/k8s-metadata-cleanup.tf +++ b/k8s-metadata-cleanup.tf @@ -64,11 +64,11 @@ resource "kubernetes_deployment" "beekeeper_metadata_cleanup" { } resources { - limits { + limits = { memory = var.k8s_metadata_cleanup_memory cpu = var.k8s_metadata_cleanup_cpu } - requests { + requests = { memory = var.k8s_metadata_cleanup_memory cpu = var.k8s_metadata_cleanup_cpu } diff --git a/k8s-path-cleanup.tf b/k8s-path-cleanup.tf index 4d53585..03c6708 100644 --- a/k8s-path-cleanup.tf +++ b/k8s-path-cleanup.tf @@ -65,11 +65,11 @@ resource "kubernetes_deployment" "beekeeper_path_cleanup" { } resources { - limits { + limits = { memory = var.k8s_path_cleanup_memory cpu = var.k8s_path_cleanup_cpu } - requests { + requests = { memory = var.k8s_path_cleanup_memory cpu = var.k8s_path_cleanup_cpu } diff --git a/k8s-scheduler-apiary.tf b/k8s-scheduler-apiary.tf index 0954cc3..0ce8bf1 100644 --- a/k8s-scheduler-apiary.tf +++ b/k8s-scheduler-apiary.tf @@ -64,11 +64,11 @@ resource "kubernetes_deployment" "beekeeper_scheduler_apiary" { } resources { - limits { + limits = { memory = var.k8s_scheduler_apiary_memory cpu = var.k8s_scheduler_apiary_cpu } - requests { + requests = { memory = var.k8s_scheduler_apiary_memory cpu = var.k8s_scheduler_apiary_cpu } From edd15434f1ad16873c67939e2c4ead5ed7f24e12 Mon Sep 17 00:00:00 2001 From: paduin Date: Mon, 18 Sep 2023 13:34:45 +0200 Subject: [PATCH 5/5] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14d1390..84dedfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [4.0.1] - 2023-09-18 +### Changed +- Increase k8s provider version to `~>2.7.0` (was `~>1.0.0`). Fixes issue with K8S upgrade and error: 'Failed to create Ingress'. + ## [4.0.0] - 2023-03-14 ### Added - Added variables `db_apply_immediately`(default `false`) and `db_performance_insights_enabled` (default `true`).