init: copied modules from lawndale-infra
This commit is contained in:
39
kubernetes/flannel/configmap.tf
Normal file
39
kubernetes/flannel/configmap.tf
Normal file
@@ -0,0 +1,39 @@
|
||||
resource "kubernetes_config_map" "this" {
|
||||
metadata {
|
||||
namespace = var.namespace
|
||||
name = "kube-flannel-cfg"
|
||||
labels = {
|
||||
app = "flannel"
|
||||
"k8s-app" = "cni"
|
||||
}
|
||||
}
|
||||
data = {
|
||||
"cni-conf.json" = jsonencode({
|
||||
name = "cbr0",
|
||||
cniVersion = "0.3.1",
|
||||
plugins = [
|
||||
{
|
||||
type = "flannel",
|
||||
delegate = {
|
||||
hairpinMode = true,
|
||||
isDefaultGateway = true,
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "portmap",
|
||||
capabilities = {
|
||||
portMappings = true,
|
||||
}
|
||||
},
|
||||
]
|
||||
})
|
||||
"net-conf.json" = jsonencode({
|
||||
Network = var.cluster_cidr,
|
||||
Backend = {
|
||||
Type = "vxlan",
|
||||
VNI = var.vxlan_id,
|
||||
Port = var.vxlan_port,
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user