Add private CIDR for calico

This commit is contained in:
Philipp
2022-04-30 00:11:07 +02:00
parent bfdca599b9
commit eb99ec5859
4 changed files with 32 additions and 4 deletions

26
init.tf
View File

@@ -89,9 +89,9 @@ resource "null_resource" "kustomization" {
, var.cni_plugin == "calico" ? ["https://projectcalico.docs.tigera.io/manifests/calico.yaml"] : []),
patchesStrategicMerge = concat([
file("${path.module}/kustomize/kured.yaml"),
file("${path.module}/kustomize/ccm.yaml"),
file("${path.module}/kustomize/system-upgrade-controller.yaml")
], var.cni_plugin == "calico" ? [file("${path.module}/kustomize/calico.yaml")] : [])
file("${path.module}/kustomize/system-upgrade-controller.yaml"),
"ccm.yaml"
], var.cni_plugin == "calico" ? ["calico.yaml"] : [])
})
destination = "/var/post_install/kustomization.yaml"
}
@@ -112,6 +112,26 @@ resource "null_resource" "kustomization" {
destination = "/var/post_install/traefik_config.yaml"
}
# Upload the CCM patch config
provisioner "file" {
content = templatefile(
"${path.module}/templates/ccm.yaml.tpl",
{
cluster_cidr_ipv4 = local.cluster_cidr_ipv4
})
destination = "/var/post_install/ccm.yaml"
}
# Upload the calico patch config
provisioner "file" {
content = templatefile(
"${path.module}/templates/calico.yaml.tpl",
{
cluster_cidr_ipv4 = local.cluster_cidr_ipv4
})
destination = "/var/post_install/calico.yaml"
}
# Upload the system upgrade controller plans config
provisioner "file" {
content = templatefile(