diff --git a/CHANGES.md b/CHANGES.md index fdbb64ec..4ee49028 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,12 @@ Notable changes between versions. * Replace `os_channel` variable with `os_image` to align naming across clouds * Please change values `stable`, `beta`, or `alpha` to `coreos-stable` (default), `coreos-beta`, `coreos-alpha` (action required!) +#### Bare-Metal + +* Add `network_ip_autodetection_method` variable for Calico host IPv4 address detection + * Use Calico's default "first-found" to support single NIC and bonded NIC nodes + * Allow [alternative](https://docs.projectcalico.org/v3.1/reference/node/configuration#ip-autodetection-methods) methods for multi NIC nodes, like `can-reach=IP` or `interface=REGEX` + #### Addons * Fix Prometheus data directory location ([#203](https://github.com/poseidon/typhoon/pull/203)) diff --git a/bare-metal/container-linux/kubernetes/bootkube.tf b/bare-metal/container-linux/kubernetes/bootkube.tf index 3c2aeaca..fc95acc1 100644 --- a/bare-metal/container-linux/kubernetes/bootkube.tf +++ b/bare-metal/container-linux/kubernetes/bootkube.tf @@ -2,13 +2,14 @@ module "bootkube" { source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=28f68db28e06e9fe3422ed49c98986375783a862" - cluster_name = "${var.cluster_name}" - api_servers = ["${var.k8s_domain_name}"] - etcd_servers = ["${var.controller_domains}"] - asset_dir = "${var.asset_dir}" - networking = "${var.networking}" - network_mtu = "${var.network_mtu}" - pod_cidr = "${var.pod_cidr}" - service_cidr = "${var.service_cidr}" - cluster_domain_suffix = "${var.cluster_domain_suffix}" + cluster_name = "${var.cluster_name}" + api_servers = ["${var.k8s_domain_name}"] + etcd_servers = ["${var.controller_domains}"] + asset_dir = "${var.asset_dir}" + networking = "${var.networking}" + network_mtu = "${var.network_mtu}" + network_ip_autodetection_method = "${var.network_ip_autodetection_method}" + pod_cidr = "${var.pod_cidr}" + service_cidr = "${var.service_cidr}" + cluster_domain_suffix = "${var.cluster_domain_suffix}" } diff --git a/bare-metal/container-linux/kubernetes/variables.tf b/bare-metal/container-linux/kubernetes/variables.tf index 7f74e8ae..c49bf76c 100644 --- a/bare-metal/container-linux/kubernetes/variables.tf +++ b/bare-metal/container-linux/kubernetes/variables.tf @@ -76,6 +76,12 @@ variable "network_mtu" { default = "1480" } +variable "network_ip_autodetection_method" { + description = "Method to autodetect the host IPv4 address (applies to calico only)" + type = "string" + default = "first-found" +} + variable "pod_cidr" { description = "CIDR IPv4 range to assign Kubernetes pods" type = "string" diff --git a/docs/cl/bare-metal.md b/docs/cl/bare-metal.md index 0a1089e2..8762a49b 100644 --- a/docs/cl/bare-metal.md +++ b/docs/cl/bare-metal.md @@ -374,6 +374,7 @@ Check the [variables.tf](https://github.com/poseidon/typhoon/blob/master/bare-me | container_linux_oem | Specify alternative OEM image ids for the disk install | "" | "vmware_raw", "xen" | | networking | Choice of networking provider | "calico" | "calico" or "flannel" | | network_mtu | CNI interface MTU (calico-only) | 1480 | - | +| network_ip_autodetection_method | Method to detect host IPv4 address (calico-only) | first-found | can-reach=10.0.0.1 | | pod_cidr | CIDR IPv4 range to assign to Kubernetes pods | "10.2.0.0/16" | "10.22.0.0/16" | | service_cidr | CIDR IPv4 range to assign to Kubernetes services | "10.3.0.0/16" | "10.3.0.0/24" | | cluster_domain_suffix | FQDN suffix for Kubernetes services answered by kube-dns. | "cluster.local" | "k8s.example.com" |