From 295a63503eba47f6e81b47863584fcb896360001 Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Fri, 23 Feb 2024 17:29:15 -0500 Subject: [PATCH] return the embedded cluster version with the node join response --- pkg/handlers/embedded_cluster_node_join_command.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/handlers/embedded_cluster_node_join_command.go b/pkg/handlers/embedded_cluster_node_join_command.go index 12cb8f1b49..b13373b628 100644 --- a/pkg/handlers/embedded_cluster_node_join_command.go +++ b/pkg/handlers/embedded_cluster_node_join_command.go @@ -23,6 +23,7 @@ type GetEmbeddedClusterNodeJoinCommandResponse struct { K0sUnsupportedOverrides string `json:"k0sUnsupportedOverrides"` EndUserK0sConfigOverrides string `json:"endUserK0sConfigOverrides"` MetricsBaseURL string `json:"metricsBaseURL"` + ECVersion string `json:"ecVersion"` } type GenerateEmbeddedClusterNodeJoinCommandRequest struct { @@ -142,9 +143,10 @@ func (h *Handler) GetEmbeddedClusterNodeJoinCommand(w http.ResponseWriter, r *ht return } endUserK0sConfigOverrides := install.Spec.EndUserK0sConfigOverrides - var k0sUnsupportedOverrides string + var k0sUnsupportedOverrides, ecVersion string if install.Spec.Config != nil { k0sUnsupportedOverrides = install.Spec.Config.UnsupportedOverrides.K0s + ecVersion = install.Spec.Config.Version } JSON(w, http.StatusOK, GetEmbeddedClusterNodeJoinCommandResponse{ @@ -154,5 +156,6 @@ func (h *Handler) GetEmbeddedClusterNodeJoinCommand(w http.ResponseWriter, r *ht K0sUnsupportedOverrides: k0sUnsupportedOverrides, EndUserK0sConfigOverrides: endUserK0sConfigOverrides, MetricsBaseURL: install.Spec.MetricsBaseURL, + ECVersion: ecVersion, }) }