-
Notifications
You must be signed in to change notification settings - Fork 57
/
helm.tf
46 lines (39 loc) · 1.16 KB
/
helm.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
resource "helm_release" "kubernetes_efs_csi_driver" {
depends_on = [var.mod_dependency, kubernetes_namespace.kubernetes_efs_csi_driver]
count = var.enabled ? 1 : 0
name = var.helm_chart_name
chart = var.helm_chart_release_name
repository = var.helm_chart_repo
version = var.helm_chart_version
namespace = var.namespace
set {
name = "controller.serviceAccount.create"
value = "true"
}
set {
name = "controller.serviceAccount.name"
value = var.service_account_name
}
set {
name = "controller.serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn"
value = aws_iam_role.efs_csi_driver[0].arn
}
set {
name = "node.serviceAccount.create"
# We're using the same service account for both the nodes and controllers,
# and we're already creating the service account in the controller config
# above.
value = "false"
}
set {
name = "node.serviceAccount.name"
value = var.service_account_name
}
set {
name = "node.serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn"
value = aws_iam_role.efs_csi_driver[0].arn
}
values = [
yamlencode(var.settings)
]
}