Skip to content

Commit

Permalink
re-add values from our local copy in the addon config
Browse files Browse the repository at this point in the history
  • Loading branch information
alanty committed Mar 14, 2024
1 parent 1bef2cc commit a2d7bf3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion aws-efa-k8s-device-plugin.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
locals {
aws_efa_k8s_device_plugin_default_values = <<-EOT
tolerations:
- operator: Exists # DaemonSet is tolerant of any taints, regardless of the key or value of the taint.
- key: CriticalAddonsOnly
operator: Exists
EOT

aws_efa_k8s_device_plugin_merged_values_yaml = yamlencode(merge(
yamldecode(local.aws_efa_k8s_device_plugin_default_values),
try(yamldecode(var.aws_efa_k8s_device_plugin_helm_config.values[0]), {})
))
}


resource "helm_release" "aws_efa_k8s_device_plugin" {
count = var.enable_aws_efa_k8s_device_plugin ? 1 : 0

Expand All @@ -6,7 +21,7 @@ resource "helm_release" "aws_efa_k8s_device_plugin" {
chart = try(var.aws_efa_k8s_device_plugin_helm_config["chart"], "aws-efa-k8s-device-plugin")
version = try(var.aws_efa_k8s_device_plugin_helm_config["version"], "v0.4.4")
timeout = try(var.aws_efa_k8s_device_plugin_helm_config["timeout"], 300)
values = try(var.aws_efa_k8s_device_plugin_helm_config["values"], null)
values = [local.aws_efa_k8s_device_plugin_merged_values_yaml]
create_namespace = try(var.aws_efa_k8s_device_plugin_helm_config["create_namespace"], false)
namespace = try(var.aws_efa_k8s_device_plugin_helm_config["namespace"], "kube-system")
lint = try(var.aws_efa_k8s_device_plugin_helm_config["lint"], false)
Expand Down

0 comments on commit a2d7bf3

Please sign in to comment.