From a7d312be30752a4edb1b1bb36ddc17332d5dfac1 Mon Sep 17 00:00:00 2001 From: Artiom Diomin Date: Mon, 21 Sep 2020 12:09:16 +0300 Subject: [PATCH 1/2] Update machinecontroller to v1.17.2 Signed-off-by: Artiom Diomin --- pkg/templates/machinecontroller/deployment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/templates/machinecontroller/deployment.go b/pkg/templates/machinecontroller/deployment.go index 840c27c9e..530e98465 100644 --- a/pkg/templates/machinecontroller/deployment.go +++ b/pkg/templates/machinecontroller/deployment.go @@ -46,7 +46,7 @@ const ( MachineControllerNamespace = metav1.NamespaceSystem MachineControllerAppLabelKey = "app" MachineControllerAppLabelValue = "machine-controller" - MachineControllerTag = "v1.17.1" + MachineControllerTag = "v1.17.2" ) func CRDs() []runtime.Object { From 734beb8aaa4a6b8fa7cf52cc85acf8e736384ce1 Mon Sep 17 00:00:00 2001 From: Artiom Diomin Date: Mon, 21 Sep 2020 12:50:32 +0300 Subject: [PATCH 2/2] Parse image from hetzner terraform output Signed-off-by: Artiom Diomin --- examples/terraform/hetzner/output.tf | 1 + pkg/templates/machinecontroller/cloudprovider_specs.go | 1 + pkg/terraform/v1beta1/config.go | 1 + 3 files changed, 3 insertions(+) diff --git a/examples/terraform/hetzner/output.tf b/examples/terraform/hetzner/output.tf index 6ca635cf5..075db2e22 100644 --- a/examples/terraform/hetzner/output.tf +++ b/examples/terraform/hetzner/output.tf @@ -60,6 +60,7 @@ output "kubeone_workers" { # https://github.com/kubermatic/machine-controller/blob/master/examples/hetzner-machinedeployment.yaml serverType = var.worker_type location = var.datacenter + image = var.image networks = [ hcloud_network.net.id ] diff --git a/pkg/templates/machinecontroller/cloudprovider_specs.go b/pkg/templates/machinecontroller/cloudprovider_specs.go index 59a2b7478..60cb561e3 100644 --- a/pkg/templates/machinecontroller/cloudprovider_specs.go +++ b/pkg/templates/machinecontroller/cloudprovider_specs.go @@ -83,6 +83,7 @@ type HetznerSpec struct { ServerType string `json:"serverType"` Datacenter string `json:"datacenter"` Location string `json:"location"` + Image string `json:"image"` Networks []string `json:"networks"` Labels map[string]string `json:"labels,omitempty"` } diff --git a/pkg/terraform/v1beta1/config.go b/pkg/terraform/v1beta1/config.go index c3e216627..c559bb5b4 100644 --- a/pkg/terraform/v1beta1/config.go +++ b/pkg/terraform/v1beta1/config.go @@ -362,6 +362,7 @@ func (c *Config) updateHetznerWorkerset(existingWorkerSet *kubeonev1beta1.Dynami {key: "serverType", value: hetznerConfig.ServerType}, {key: "datacenter", value: hetznerConfig.Datacenter}, {key: "location", value: hetznerConfig.Location}, + {key: "image", value: hetznerConfig.Image}, {key: "networks", value: hetznerConfig.Networks}, {key: "labels", value: hetznerConfig.Labels}, }