diff --git a/platforms/metal/cl/bootkube-controller.yaml.tmpl b/platforms/metal/cl/bootkube-controller.yaml.tmpl index 0a9d7eb6b2..e5b525c246 100644 --- a/platforms/metal/cl/bootkube-controller.yaml.tmpl +++ b/platforms/metal/cl/bootkube-controller.yaml.tmpl @@ -7,7 +7,7 @@ systemd: - name: 40-etcd-cluster.conf contents: | [Service] - Environment="ETCD_IMAGE_TAG=v3.1.0" + Environment="ETCD_IMAGE_TAG={{.etcd_image_tag}}" Environment="ETCD_NAME={{.etcd_name}}" Environment="ETCD_ADVERTISE_CLIENT_URLS=http://{{.domain_name}}:2379" Environment="ETCD_INITIAL_ADVERTISE_PEER_URLS=http://{{.domain_name}}:2380" @@ -50,7 +50,7 @@ systemd: [Unit] Description=Kubelet via Hyperkube ACI [Service] - Environment="RKT_OPTS=--uuid-file-save=/var/run/kubelet-pod.uuid \ + Environment="RKT_RUN_ARGS=--uuid-file-save=/var/run/kubelet-pod.uuid \ --volume=resolv,kind=host,source=/etc/resolv.conf \ --mount volume=resolv,target=/etc/resolv.conf \ --volume var-lib-cni,kind=host,source=/var/lib/cni \ @@ -124,8 +124,8 @@ storage: mode: 0644 contents: inline: | - KUBELET_ACI=quay.io/coreos/hyperkube - KUBELET_VERSION=v1.6.1_coreos.0 + KUBELET_IMAGE_URL={{.kubelet_image_url}} + KUBELET_IMAGE_TAG={{.kubelet_image_tag}} - path: /etc/hostname filesystem: root mode: 0644 diff --git a/platforms/metal/cl/bootkube-worker.yaml.tmpl b/platforms/metal/cl/bootkube-worker.yaml.tmpl index cc2c5b68f5..c0d646da2f 100644 --- a/platforms/metal/cl/bootkube-worker.yaml.tmpl +++ b/platforms/metal/cl/bootkube-worker.yaml.tmpl @@ -7,7 +7,7 @@ systemd: - name: 40-etcd-cluster.conf contents: | [Service] - Environment="ETCD_IMAGE_TAG=v3.1.0" + Environment="ETCD_IMAGE_TAG={{.etcd_image_tag}}" ExecStart= ExecStart=/usr/lib/coreos/etcd-wrapper gateway start \ --listen-addr=127.0.0.1:2379 \ @@ -47,7 +47,7 @@ systemd: [Unit] Description=Kubelet via Hyperkube ACI [Service] - Environment="RKT_OPTS=--uuid-file-save=/var/run/kubelet-pod.uuid \ + Environment="RKT_RUN_ARGS=--uuid-file-save=/var/run/kubelet-pod.uuid \ --volume=resolv,kind=host,source=/etc/resolv.conf \ --mount volume=resolv,target=/etc/resolv.conf \ --volume var-lib-cni,kind=host,source=/var/lib/cni \ @@ -84,30 +84,14 @@ systemd: WantedBy=multi-user.target storage: - {{ if index . "pxe" }} - disks: - - device: /dev/sda - wipe_table: true - partitions: - - label: ROOT - filesystems: - - name: root - mount: - device: "/dev/sda1" - format: "ext4" - create: - force: true - options: - - "-LROOT" - {{end}} files: - path: /etc/kubernetes/kubelet.env filesystem: root mode: 0644 contents: inline: | - KUBELET_ACI=quay.io/coreos/hyperkube - KUBELET_VERSION=v1.6.1_coreos.0 + KUBELET_IMAGE_URL={{.kubelet_image_url}} + KUBELET_IMAGE_TAG={{.kubelet_image_tag}} - path: /etc/hostname filesystem: root mode: 0644 diff --git a/platforms/metal/matchers.tf b/platforms/metal/matchers.tf index 6b34fdd387..ce92ed741f 100644 --- a/platforms/metal/matchers.tf +++ b/platforms/metal/matchers.tf @@ -35,6 +35,11 @@ resource "matchbox_group" "controller" { etcd_initial_cluster = "${join(",", formatlist("%s=http://%s:2380", var.tectonic_metal_controller_names, var.tectonic_metal_controller_domains))}" k8s_dns_service_ip = "${var.tectonic_kube_dns_service_ip}" ssh_authorized_key = "${var.tectonic_ssh_authorized_key}" + + # extra data + etcd_image_tag = "${var.tectonic_versions["etcd"]}" + kubelet_image_url = "${element(split(":", var.tectonic_container_images["hyperkube"]), 0)}" + kubelet_image_tag = "${element(split(":", var.tectonic_container_images["hyperkube"]), 1)}" } } @@ -53,5 +58,10 @@ resource "matchbox_group" "worker" { etcd_endpoints = "${join(",", formatlist("%s:2379", var.tectonic_metal_controller_domains))}" k8s_dns_service_ip = "${var.tectonic_kube_dns_service_ip}" ssh_authorized_key = "${var.tectonic_ssh_authorized_key}" + + # extra data + etcd_image_tag = "${var.tectonic_versions["etcd"]}" + kubelet_image_url = "${element(split(":", var.tectonic_container_images["hyperkube"]), 0)}" + kubelet_image_tag = "${element(split(":", var.tectonic_container_images["hyperkube"]), 1)}" } }