Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return the embedded cluster version with the node join response #4470

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/handlers/embedded_cluster_node_join_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type GetEmbeddedClusterNodeJoinCommandResponse struct {
K0sUnsupportedOverrides string `json:"k0sUnsupportedOverrides"`
EndUserK0sConfigOverrides string `json:"endUserK0sConfigOverrides"`
MetricsBaseURL string `json:"metricsBaseURL"`
EmbeddedClusterVersion string `json:"embeddedClusterVersion"`
}

type GenerateEmbeddedClusterNodeJoinCommandRequest struct {
Expand Down Expand Up @@ -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{
Expand All @@ -154,5 +156,6 @@ func (h *Handler) GetEmbeddedClusterNodeJoinCommand(w http.ResponseWriter, r *ht
K0sUnsupportedOverrides: k0sUnsupportedOverrides,
EndUserK0sConfigOverrides: endUserK0sConfigOverrides,
MetricsBaseURL: install.Spec.MetricsBaseURL,
EmbeddedClusterVersion: ecVersion,
})
}
Loading