Skip to content

Commit

Permalink
Change variable name to be ingress specific
Browse files Browse the repository at this point in the history
  • Loading branch information
vradicevicds committed Sep 24, 2024
1 parent c601057 commit a4944c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion k8s_addons.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module "ingress_nginx" {
source = "./modules/eks_addons"
enable_ingress_nginx = var.ingress_nginx_config.enable

helm_config = {
ingress_nginx_helm_config = {
namespace = "nginx"
name = "ingress-nginx"
chart = "ingress-nginx"
Expand Down
22 changes: 11 additions & 11 deletions modules/eks_addons/ingress_nginx.tf
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
resource "kubernetes_namespace_v1" "this" {
count = try(var.helm_config.create_namespace, true) && var.helm_config.namespace != "kube-system" && var.enable_ingress_nginx ? 1 : 0
count = try(var.ingress_nginx_helm_config.create_namespace, true) && var.ingress_nginx_helm_config.namespace != "kube-system" && var.enable_ingress_nginx ? 1 : 0

metadata {
name = var.helm_config.namespace
name = var.ingress_nginx_helm_config.namespace
}
}

resource "helm_release" "ingress_nginx" {
count = var.enable_ingress_nginx ? 1 : 0

namespace = var.helm_config.namespace
name = var.helm_config.name
chart = var.helm_config.chart
repository = var.helm_config.repository
version = var.helm_config.version
description = var.helm_config.description
create_namespace = var.helm_config.create_namespace
dependency_update = var.helm_config.dependency_update
values = var.helm_config.values
namespace = var.ingress_nginx_helm_config.namespace
name = var.ingress_nginx_helm_config.name
chart = var.ingress_nginx_helm_config.chart
repository = var.ingress_nginx_helm_config.repository
version = var.ingress_nginx_helm_config.version
description = var.ingress_nginx_helm_config.description
create_namespace = var.ingress_nginx_helm_config.create_namespace
dependency_update = var.ingress_nginx_helm_config.dependency_update
values = var.ingress_nginx_helm_config.values
timeout = 1200
}
4 changes: 2 additions & 2 deletions modules/eks_addons/variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "helm_config" {
description = "Helm Configuration"
variable "ingress_nginx_helm_config" {
description = "Helm Configuration for Ingress Nginx"
type = any
default = {}
}
Expand Down

0 comments on commit a4944c5

Please sign in to comment.