Skip to content

Commit

Permalink
Used key instead of dest_path in filtering images
Browse files Browse the repository at this point in the history
  • Loading branch information
dang0317 committed Oct 2, 2024
1 parent 17ffd9e commit 0815af0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module "images_cluster_autoscaler" {
profile = var.profile
application_list = []
application_name = format("eks/%v", var.cluster_name)
image_config = [for k, v in local.images_settings : v if (v.enabled && v.dest_path == "cluster-autoscaler")]
image_config = [for k, v in local.images_settings : v if (v.enabled && k == "cluster-autoscaler")]
force_delete = true

enable_lifecycle_policy = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
locals {
image_config = [ for k, v in local.images_settings : v if (v.enabled && v.dest_path == null) ]
image_config = [ for k, v in local.images_settings : v if (v.enabled && k != "cluster-autoscaler") ]
image_output = { for k, v in module.images.images : v.name => v }

charts = { for k, v in local.chart_settings : k => v if try(v.enabled, true) }
images = { for k, v in local.images_settings : k => v if (v.enabled && v.dest_path == null) }
images = { for k, v in local.images_settings : k => v if (v.enabled && k != "cluster-autoscaler") }
}

module "images" {
Expand Down
2 changes: 1 addition & 1 deletion examples/full-cluster-tf-upgrade/1.30/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cluster-autoscaler:
documentation: "https://github.com/kubernetes/autoscaler/releases"
name: "cluster-autoscaler"
image: "registry.k8s.io/autoscaling/cluster-autoscaler"
dest_path: "cluster-autoscaler"
dest_path: null
source_registry: "registry.k8s.io"
source_image: "autoscaling/cluster-autoscaler"
source_tag: null
Expand Down

0 comments on commit 0815af0

Please sign in to comment.