-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcni.tf
78 lines (61 loc) · 1.69 KB
/
cni.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
resource "random_id" "cilium_ipsec" {
byte_length = 20
}
resource "kubernetes_secret" "cilium_ipsec_keys" {
metadata {
namespace = "kube-system"
name = "cilium-ipsec-keys"
}
data = {
"keys" = "3 rfc4106(gcm(aes)) ${random_id.cilium_ipsec.hex} 128"
}
}
resource "helm_release" "cilium" {
namespace = "kube-system"
name = "cilium"
chart = "cilium"
version = "1.11.0"
repository = "https://helm.cilium.io"
values = [yamlencode({
"rollOutCiliumPods" = true
"containerRuntime" = {
"integration" = "containerd"
}
"encryption" = {
"enabled" = true
# currently broken:
# see https://github.com/cilium/cilium/issues/13663
"nodeEncryption" = false
}
"extraArgs" = [
# Handle higher load when pods are created rapidly
"--api-rate-limit", "endpoint-create=rate-limit:4/s,rate-burst:8"
]
"hubble" = {
"relay" = {
"enabled" = true
"rollOutPods" = true
}
"ui" = {
"enabled" = true
"rollOutPods" = true
}
}
"ipam" = {
"mode" = "kubernetes"
}
"ipv6" = {
"enabled" = true
}
# BREAKS NGINX INGRESS - DO NOT USE.
"sockops" = {
"enabled" = false
}
"operator" = {
"rollOutPods" = true
# should hold 2 replicas for clusters of more than 1 node
"replicas" = var.cluster_redundant ? 2 : 1
}
})]
depends_on = [ kubernetes_secret.cilium_ipsec_keys ]
}