Skip to content

Commit 8e6556d

Browse files
authored
refactor: do not use templates/calico-values.yaml and set necessary values in the eks-calico.tf file (#210)
1 parent cc06147 commit 8e6556d

File tree

3 files changed

+10
-60
lines changed

3 files changed

+10
-60
lines changed

terraform/layer2-k8s/eks-calico.tf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ locals {
44
enabled = local.helm_releases[index(local.helm_releases.*.id, "aws-calico")].enabled
55
chart = local.helm_releases[index(local.helm_releases.*.id, "aws-calico")].chart
66
repository = local.helm_releases[index(local.helm_releases.*.id, "aws-calico")].repository
7-
chart_version = local.helm_releases[index(local.helm_releases.*.id, "aws-calico")].version
7+
chart_version = local.helm_releases[index(local.helm_releases.*.id, "aws-calico")].chart_version
88
namespace = local.helm_releases[index(local.helm_releases.*.id, "aws-calico")].namespace
99
}
10+
aws_calico_values = <<VALUES
11+
calico:
12+
typha:
13+
logseverity: Warning #Debug, Info, Warning, Error, Fatal
14+
node:
15+
logseverity: Warning #Debug, Info, Warning, Error, Fatal
16+
VALUES
1017
}
1118

1219
resource "helm_release" "calico_daemonset" {
@@ -20,7 +27,7 @@ resource "helm_release" "calico_daemonset" {
2027
max_history = var.helm_release_history_size
2128

2229
values = [
23-
file("${path.module}/templates/calico-values.yaml")
30+
local.aws_calico_values
2431
]
2532

2633
}

terraform/layer2-k8s/helm-releases.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ releases:
1515
enabled: true
1616
chart: aws-calico
1717
repository: https://aws.github.io/eks-charts
18-
version: 0.3.4
18+
chart_version: 0.3.4
1919
namespace: kube-system
2020
- id: cert-manager
2121
enabled: false

terraform/layer2-k8s/templates/calico-values.yaml

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)