Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Implement missing helm variables #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ resource "helm_release" "alb_controller" {
"region" = local.aws_region_name
"vpcId" = local.aws_vpc_id
"hostNetwork" = var.enable_host_networking
"replicaCount" = var.k8s_replicas
}
content {
name = set.key
Expand All @@ -445,6 +446,22 @@ resource "helm_release" "alb_controller" {
}
}

dynamic "set" {
for_each = var.k8s_pod_annotations
content {
name = "podAnnotations.${set.key}"
value = set.value
}
}

dynamic "set" {
for_each = var.k8s_pod_labels
content {
name = "podLabels.${set.key}"
value = set.value
}
}

depends_on = [var.alb_controller_depends_on]
}

Expand Down
3 changes: 2 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ variable "k8s_replicas" {
default = 1
}


# missing
variable "k8s_pod_annotations" {
description = "Additional annotations to be added to the Pods."
type = map(string)
default = {}
}

# missing
variable "k8s_pod_labels" {
description = "Additional labels to be added to the Pods."
type = map(string)
Expand Down