diff --git a/digital-ocean/container-linux/kubernetes/bootkube.tf b/digital-ocean/container-linux/kubernetes/bootkube.tf index d53b2d70..a2e3a75d 100644 --- a/digital-ocean/container-linux/kubernetes/bootkube.tf +++ b/digital-ocean/container-linux/kubernetes/bootkube.tf @@ -1,11 +1,13 @@ # Self-hosted Kubernetes assets (kubeconfig, manifests) module "bootkube" { - source = "git::https://github.com/poseidon/bootkube-terraform.git?ref=v0.6.1" + source = "git::https://github.com/poseidon/bootkube-terraform.git?ref=5ffbfec46dc05721eaf9d15c3c9bbedefaead1bc" cluster_name = "${var.cluster_name}" api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"] etcd_servers = ["http://127.0.0.1:2379"] asset_dir = "${var.asset_dir}" + networking = "${var.networking}" + network_mtu = 1440 pod_cidr = "${var.pod_cidr}" service_cidr = "${var.service_cidr}" experimental_self_hosted_etcd = "true" diff --git a/digital-ocean/container-linux/kubernetes/cl/controller.yaml.tmpl b/digital-ocean/container-linux/kubernetes/cl/controller.yaml.tmpl index 8024e200..4caac8ff 100644 --- a/digital-ocean/container-linux/kubernetes/cl/controller.yaml.tmpl +++ b/digital-ocean/container-linux/kubernetes/cl/controller.yaml.tmpl @@ -124,6 +124,7 @@ storage: # Wrapper for bootkube start set -e # Move experimental manifests + [ -d /opt/bootkube/assets/manifests-* ] && mv /opt/bootkube/assets/manifests-*/* /opt/bootkube/assets/manifests && rm -rf /opt/bootkube/assets/manifests-* [ -d /opt/bootkube/assets/experimental/manifests ] && mv /opt/bootkube/assets/experimental/manifests/* /opt/bootkube/assets/manifests && rm -r /opt/bootkube/assets/experimental/manifests [ -d /opt/bootkube/assets/experimental/bootstrap-manifests ] && mv /opt/bootkube/assets/experimental/bootstrap-manifests/* /opt/bootkube/assets/bootstrap-manifests && rm -r /opt/bootkube/assets/experimental/bootstrap-manifests BOOTKUBE_ACI="$${BOOTKUBE_ACI:-quay.io/coreos/bootkube}" diff --git a/digital-ocean/container-linux/kubernetes/variables.tf b/digital-ocean/container-linux/kubernetes/variables.tf index 4260a0ad..d74331d4 100644 --- a/digital-ocean/container-linux/kubernetes/variables.tf +++ b/digital-ocean/container-linux/kubernetes/variables.tf @@ -55,6 +55,12 @@ variable "asset_dir" { type = "string" } +variable "networking" { + description = "Choice of networking provider (flannel or calico)" + type = "string" + default = "flannel" +} + variable "pod_cidr" { description = "CIDR IP range to assign Kubernetes pods" type = "string" diff --git a/google-cloud/container-linux/controllers/cl/controller.yaml.tmpl b/google-cloud/container-linux/controllers/cl/controller.yaml.tmpl index 1e04df43..b23b6168 100644 --- a/google-cloud/container-linux/controllers/cl/controller.yaml.tmpl +++ b/google-cloud/container-linux/controllers/cl/controller.yaml.tmpl @@ -120,6 +120,7 @@ storage: # Wrapper for bootkube start set -e # Move experimental manifests + [ -d /opt/bootkube/assets/manifests-* ] && mv /opt/bootkube/assets/manifests-*/* /opt/bootkube/assets/manifests && rm -rf /opt/bootkube/assets/manifests-* [ -d /opt/bootkube/assets/experimental/manifests ] && mv /opt/bootkube/assets/experimental/manifests/* /opt/bootkube/assets/manifests && rm -r /opt/bootkube/assets/experimental/manifests [ -d /opt/bootkube/assets/experimental/bootstrap-manifests ] && mv /opt/bootkube/assets/experimental/bootstrap-manifests/* /opt/bootkube/assets/bootstrap-manifests && rm -r /opt/bootkube/assets/experimental/bootstrap-manifests BOOTKUBE_ACI="$${BOOTKUBE_ACI:-quay.io/coreos/bootkube}" diff --git a/google-cloud/container-linux/controllers/variables.tf b/google-cloud/container-linux/controllers/variables.tf index 7d37d144..3244473c 100644 --- a/google-cloud/container-linux/controllers/variables.tf +++ b/google-cloud/container-linux/controllers/variables.tf @@ -59,6 +59,12 @@ variable "preemptible" { // configuration +variable "networking" { + description = "Choice of networking provider (flannel or calico)" + type = "string" + default = "flannel" +} + variable "service_cidr" { description = <