Skip to content

Commit

Permalink
Merge pull request #46 from ExpediaGroup/fix/eks_ingress_fix
Browse files Browse the repository at this point in the history
Fix/eks ingress fix
  • Loading branch information
abhimanyugupta07 authored Sep 18, 2023
2 parents 82aeabd + edd1543 commit 98a3e69
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand Down
14 changes: 9 additions & 5 deletions k8s-api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand All @@ -140,8 +140,12 @@ resource "kubernetes_ingress" "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 {
number = var.k8s_beekeeper_api_port
}
}
}
path = "/"
}
Expand Down
4 changes: 2 additions & 2 deletions k8s-metadata-cleanup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions k8s-path-cleanup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions k8s-scheduler-apiary.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
terraform {
required_version = ">= 0.12.31"
required_providers {
kubernetes = "~> 1.0"
kubernetes = "~> 2.7.0"
aws = "~> 4.0"
}
}
Expand Down

0 comments on commit 98a3e69

Please sign in to comment.