Add temporary variables for multi-nic testing

* Accept ordered lists of controller and worker networkd configs
* Do not rely on these variables. They will be replaced with a
cleaner mechanism at a future date
This commit is contained in:
Dalton Hubble 2017-10-16 00:39:58 -07:00
parent 377e14c80b
commit fc22f04dd6
5 changed files with 23 additions and 3 deletions

View File

@ -172,6 +172,8 @@ storage:
--net=host \
--dns=host \
--exec=/bootkube -- start --asset-dir=/assets "$@"
networkd:
${networkd_content}
passwd:
users:
- name: core

View File

@ -108,6 +108,8 @@ storage:
contents:
inline: |
fs.inotify.max_user_watches=16184
networkd:
${networkd_content}
passwd:
users:
- name: core

View File

@ -87,6 +87,7 @@ data "template_file" "controller-configs" {
etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", var.controller_names, var.controller_domains))}"
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
ssh_authorized_key = "${var.ssh_authorized_key}"
networkd_content = "${element(var.controller_networkds, count.index)}"
}
}
@ -106,5 +107,6 @@ data "template_file" "worker-configs" {
domain_name = "${element(var.worker_domains, count.index)}"
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
ssh_authorized_key = "${var.ssh_authorized_key}"
networkd_content = "${element(var.worker_networkds, count.index)}"
}
}

View File

@ -111,7 +111,22 @@ variable "container_linux_oem" {
}
variable "kernel_args" {
description = "Additional kernel arguments the servers should boot with."
description = "Additional kernel arguments to provide at PXE boot."
type = "list"
default = []
}
# unofficial, undocumented, unsupported, temporary
variable "controller_networkds" {
type = "list"
description = "Controller Container Linux config networkd section"
default = []
}
variable "worker_networkds" {
type = "list"
description = "Worker Container Linux config networkd section"
default = []
}

View File

@ -57,9 +57,8 @@ variable "kube_dns_service_ip" {
# optional
variable "kernel_args" {
description = "Additional kernel arguments the server should boot with."
description = "Additional kernel arguments to provide at PXE boot."
type = "list"
default = [
"root=/dev/sda1",
]