mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-27 08:49:33 +01:00
45 lines
828 B
Terraform
45 lines
828 B
Terraform
|
resource "kubernetes_config_map" "config" {
|
||
|
metadata {
|
||
|
name = "flannel-config"
|
||
|
namespace = "kube-system"
|
||
|
labels = {
|
||
|
k8s-app = "flannel"
|
||
|
tier = "node"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
data = {
|
||
|
"cni-conf.json" = <<-EOF
|
||
|
{
|
||
|
"name": "cbr0",
|
||
|
"cniVersion": "0.3.1",
|
||
|
"plugins": [
|
||
|
{
|
||
|
"type": "flannel",
|
||
|
"delegate": {
|
||
|
"hairpinMode": true,
|
||
|
"isDefaultGateway": true
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "portmap",
|
||
|
"capabilities": {
|
||
|
"portMappings": true
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
EOF
|
||
|
"net-conf.json" = <<-EOF
|
||
|
{
|
||
|
"Network": "${var.pod_cidr}",
|
||
|
"Backend": {
|
||
|
"Type": "vxlan",
|
||
|
"Port": 4789
|
||
|
}
|
||
|
}
|
||
|
EOF
|
||
|
}
|
||
|
}
|
||
|
|