Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package k0sctl for openSUSE:Factory checked in at 2025-12-17 18:37:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/k0sctl (Old) and /work/SRC/openSUSE:Factory/.k0sctl.new.1939 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "k0sctl" Wed Dec 17 18:37:38 2025 rev:18 rq:1323257 version:0.28.0 Changes: -------- --- /work/SRC/openSUSE:Factory/k0sctl/k0sctl.changes 2025-12-11 18:41:44.870497814 +0100 +++ /work/SRC/openSUSE:Factory/.k0sctl.new.1939/k0sctl.changes 2025-12-17 18:37:40.121794773 +0100 @@ -1,0 +2,12 @@ +Wed Dec 17 06:22:38 UTC 2025 - Johannes Kastl <[email protected]> + +- Update to version 0.28.0: + * Add host.useExistingK0s to use preinstalled k0s binary on node + (#996) + * Bump github.com/go-playground/validator/v10 from 10.28.0 to + 10.29.0 (#994) + * Bump k8s.io/client-go from 0.34.2 to 0.34.3 (#993) + * Bump actions/upload-artifact from 5 to 6 (#995) + * Bump k8s.io/apimachinery from 0.34.2 to 0.34.3 (#992) + +------------------------------------------------------------------- Old: ---- k0sctl-0.27.1.obscpio New: ---- k0sctl-0.28.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ k0sctl.spec ++++++ --- /var/tmp/diff_new_pack.v4aDYE/_old 2025-12-17 18:37:41.025832692 +0100 +++ /var/tmp/diff_new_pack.v4aDYE/_new 2025-12-17 18:37:41.025832692 +0100 @@ -18,7 +18,7 @@ Name: k0sctl -Version: 0.27.1 +Version: 0.28.0 Release: 0 Summary: A bootstrapping and management tool for k0s clusters License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.v4aDYE/_old 2025-12-17 18:37:41.065834369 +0100 +++ /var/tmp/diff_new_pack.v4aDYE/_new 2025-12-17 18:37:41.069834537 +0100 @@ -2,7 +2,7 @@ <service name="obs_scm" mode="manual"> <param name="url">https://github.com/k0sproject/k0sctl.git</param> <param name="scm">git</param> - <param name="revision">v0.27.1</param> + <param name="revision">v0.28.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.v4aDYE/_old 2025-12-17 18:37:41.093835544 +0100 +++ /var/tmp/diff_new_pack.v4aDYE/_new 2025-12-17 18:37:41.097835712 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/k0sproject/k0sctl.git</param> - <param name="changesrevision">c7ee91b2f1a36c447590993cbb133028882271df</param></service></servicedata> + <param name="changesrevision">bad9a8d3e83de317c65638681c7a895f1af81614</param></service></servicedata> (No newline at EOF) ++++++ k0sctl-0.27.1.obscpio -> k0sctl-0.28.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/.github/workflows/smoke.yml new/k0sctl-0.28.0/.github/workflows/smoke.yml --- old/k0sctl-0.27.1/.github/workflows/smoke.yml 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/.github/workflows/smoke.yml 2025-12-16 13:19:47.000000000 +0100 @@ -28,7 +28,7 @@ run: make k0sctl - name: Stash the compiled binary for further testing - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: k0sctl path: k0sctl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/README.md new/k0sctl-0.28.0/README.md --- old/k0sctl-0.27.1/README.md 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/README.md 2025-12-16 13:19:47.000000000 +0100 @@ -315,6 +315,10 @@ When `true`, the k0s binaries for target host will be downloaded and cached on the local host and uploaded to the target. When `false`, the k0s binary downloading is performed on the target host itself +###### `spec.hosts[*].useExistingK0s` <boolean> (optional) (default: `false`) + +When `true`, k0sctl reuses the k0s binary that already exists on the host. No binary downloads or uploads are performed, and upgrades for the host are skipped. This option cannot be combined with `uploadBinary`, `k0sBinaryPath`, or `k0sDownloadURL`. + ###### `spec.hosts[*].k0sBinaryPath` <string> (optional) A path to a file on the local host that contains a k0s binary to be uploaded to the host. Can be used to test drive a custom development build of k0s. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/go.mod new/k0sctl-0.28.0/go.mod --- old/k0sctl-0.27.1/go.mod 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/go.mod 2025-12-16 13:19:47.000000000 +0100 @@ -34,12 +34,12 @@ require ( al.essio.dev/pkg/shellescape v1.6.0 github.com/carlmjohnson/versioninfo v0.22.5 - github.com/go-playground/validator/v10 v10.28.0 + github.com/go-playground/validator/v10 v10.29.0 github.com/jellydator/validation v1.2.0 github.com/k0sproject/version v0.8.0 github.com/sergi/go-diff v1.4.0 - k8s.io/apimachinery v0.34.2 - k8s.io/client-go v0.34.2 + k8s.io/apimachinery v0.34.3 + k8s.io/client-go v0.34.3 ) require ( @@ -52,7 +52,7 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidmz/go-pageant v1.0.2 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.10 // indirect + github.com/gabriel-vasile/mimetype v1.4.11 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/go.sum new/k0sctl-0.28.0/go.sum --- old/k0sctl-0.27.1/go.sum 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/go.sum 2025-12-16 13:19:47.000000000 +0100 @@ -44,8 +44,8 @@ github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0= -github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/gabriel-vasile/mimetype v1.4.11 h1:AQvxbp830wPhHTqc1u7nzoLT+ZFxGY7emj5DR5DYFik= +github.com/gabriel-vasile/mimetype v1.4.11/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= @@ -60,8 +60,8 @@ github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688= -github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU= +github.com/go-playground/validator/v10 v10.29.0 h1:lQlF5VNJWNlRbRZNeOIkWElR+1LL/OuHcc0Kp14w1xk= +github.com/go-playground/validator/v10 v10.29.0/go.mod h1:D6QxqeMlgIPuT02L66f2ccrZ7AGgHkzKmmTMZhk/Kc4= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -276,12 +276,12 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= -k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= -k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= -k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= -k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= -k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= +k8s.io/api v0.34.3 h1:D12sTP257/jSH2vHV2EDYrb16bS7ULlHpdNdNhEw2S4= +k8s.io/api v0.34.3/go.mod h1:PyVQBF886Q5RSQZOim7DybQjAbVs8g7gwJNhGtY5MBk= +k8s.io/apimachinery v0.34.3 h1:/TB+SFEiQvN9HPldtlWOTp0hWbJ+fjU+wkxysf/aQnE= +k8s.io/apimachinery v0.34.3/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/client-go v0.34.3 h1:wtYtpzy/OPNYf7WyNBTj3iUA0XaBHVqhv4Iv3tbrF5A= +k8s.io/client-go v0.34.3/go.mod h1:OxxeYagaP9Kdf78UrKLa3YZixMCfP6bgPwPwNBQBzpM= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/phase/download_binaries.go new/k0sctl-0.28.0/phase/download_binaries.go --- old/k0sctl-0.27.1/phase/download_binaries.go 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/phase/download_binaries.go 2025-12-16 13:19:47.000000000 +0100 @@ -31,7 +31,7 @@ func (p *DownloadBinaries) Prepare(config *v1beta1.Cluster) error { p.Config = config p.hosts = p.Config.Spec.Hosts.Filter(func(h *cluster.Host) bool { - return !h.Reset && h.UploadBinary && !h.Metadata.K0sBinaryVersion.Equal(config.Spec.K0s.Version) + return !h.Reset && h.UploadBinary && !h.UseExistingK0s && !h.Metadata.K0sBinaryVersion.Equal(config.Spec.K0s.Version) }) return nil } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/phase/download_k0s.go new/k0sctl-0.28.0/phase/download_k0s.go --- old/k0sctl-0.27.1/phase/download_k0s.go 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/phase/download_k0s.go 2025-12-16 13:19:47.000000000 +0100 @@ -28,6 +28,9 @@ p.Config = config p.hosts = p.Config.Spec.Hosts.Filter(func(h *cluster.Host) bool { + if h.UseExistingK0s { + return false + } // Nothing to download if h.UploadBinary { return false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/phase/gather_k0s_facts.go new/k0sctl-0.28.0/phase/gather_k0s_facts.go --- old/k0sctl-0.27.1/phase/gather_k0s_facts.go 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/phase/gather_k0s_facts.go 2025-12-16 13:19:47.000000000 +0100 @@ -91,6 +91,59 @@ return err } + if err := p.reportUseExistingHosts(); err != nil { + return err + } + + return nil +} + +func (p *GatherK0sFacts) reportUseExistingHosts() error { + if p.manager == nil || p.Config == nil || p.Config.Spec == nil { + return nil + } + + for _, h := range p.Config.Spec.Hosts { + if !h.UseExistingK0s { + continue + } + + hostVersion := h.Metadata.K0sRunningVersion + if hostVersion == nil { + hostVersion = h.Metadata.K0sBinaryVersion + } + + if hostVersion == nil { + return fmt.Errorf("%s: useExistingK0s=true but no k0s binary found on host", h) + } + + if hostVersion != nil { + log.Infof("%s: useExistingK0s=true, reusing existing k0s %s", h, hostVersion) + } + + if !p.IsWet() { + msg := "reuse existing k0s binary; skip downloads/uploads/upgrades" + if hostVersion != nil { + msg = fmt.Sprintf("reuse existing k0s %s; skip downloads/uploads/upgrades", hostVersion) + } + p.DryMsg(h, msg) + } + + var desired *version.Version + if p.Config.Spec.K0s != nil { + desired = p.Config.Spec.K0s.Version + } + + if desired == nil || desired.Equal(hostVersion) { + continue + } + + log.Warnf("%s: spec.k0s.version is %s but host will remain on %s because useExistingK0s=true", h, desired, hostVersion) + if !p.IsWet() { + p.DryMsgf(h, "WARNING: host would remain on k0s %s while spec.k0s.version=%s (useExistingK0s=true)", hostVersion, desired) + } + } + return nil } @@ -360,6 +413,9 @@ if h.Reset { return false } + if h.UseExistingK0s { + return false + } // If supplimental files or a k0s binary have been specified explicitly, // always upgrade. This covers the scenario where a user moves from a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/phase/gather_k0s_facts_test.go new/k0sctl-0.28.0/phase/gather_k0s_facts_test.go --- old/k0sctl-0.27.1/phase/gather_k0s_facts_test.go 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/phase/gather_k0s_facts_test.go 2025-12-16 13:19:47.000000000 +0100 @@ -30,4 +30,43 @@ require.False(t, p.needsUpgrade(h)) h.Metadata.K0sRunningVersion = version.MustParse("1.23.3+k0s.0") require.True(t, p.needsUpgrade(h)) + h.UseExistingK0s = true + require.False(t, p.needsUpgrade(h)) +} + +func TestReportUseExistingHostsDryMessages(t *testing.T) { + clusterVersion := version.MustParse("1.24.0+k0s.0") + h := &cluster.Host{ + UseExistingK0s: true, + Metadata: cluster.HostMetadata{ + K0sBinaryVersion: version.MustParse("1.23.0+k0s.0"), + }, + } + cfg := &v1beta1.Cluster{ + Spec: &cluster.Spec{ + Hosts: cluster.Hosts{h}, + K0s: &cluster.K0s{Version: clusterVersion}, + }, + } + p := GatherK0sFacts{GenericPhase: GenericPhase{Config: cfg}} + mgr := &Manager{DryRun: true, Config: cfg} + p.SetManager(mgr) + require.NoError(t, p.reportUseExistingHosts()) + require.Len(t, mgr.dryMessages, 1) + for _, msgs := range mgr.dryMessages { + require.Len(t, msgs, 2) + require.Contains(t, msgs[0], "reuse existing k0s v1.23.0+k0s.0") + require.Contains(t, msgs[1], "WARNING") + } +} + +func TestReportUseExistingHostsFailsWithoutBinary(t *testing.T) { + h := &cluster.Host{UseExistingK0s: true} + cfg := &v1beta1.Cluster{ + Spec: &cluster.Spec{Hosts: cluster.Hosts{h}}, + } + p := GatherK0sFacts{GenericPhase: GenericPhase{Config: cfg}} + mgr := &Manager{Config: cfg} + p.SetManager(mgr) + require.ErrorContains(t, p.reportUseExistingHosts(), "useExistingK0s=true but no k0s binary found on host") } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/phase/install_binaries.go new/k0sctl-0.28.0/phase/install_binaries.go --- old/k0sctl-0.27.1/phase/install_binaries.go 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/phase/install_binaries.go 2025-12-16 13:19:47.000000000 +0100 @@ -34,6 +34,9 @@ return false } + if h.UseExistingK0s { + return false + } return h.Metadata.K0sBinaryTempFile != "" }) return nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/phase/upload_k0s.go new/k0sctl-0.28.0/phase/upload_k0s.go --- old/k0sctl-0.27.1/phase/upload_k0s.go 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/phase/upload_k0s.go 2025-12-16 13:19:47.000000000 +0100 @@ -28,6 +28,9 @@ func (p *UploadK0s) Prepare(config *v1beta1.Cluster) error { p.Config = config p.hosts = p.Config.Spec.Hosts.Filter(func(h *cluster.Host) bool { + if h.UseExistingK0s { + return false + } // Nothing to upload if h.UploadBinaryPath == "" { return false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go new/k0sctl-0.28.0/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go --- old/k0sctl-0.27.1/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go 2025-12-16 13:19:47.000000000 +0100 @@ -37,6 +37,7 @@ KubeletRootDir string `yaml:"kubeletRootDir,omitempty"` Environment map[string]string `yaml:"environment,flow,omitempty"` UploadBinary bool `yaml:"uploadBinary,omitempty"` + UseExistingK0s bool `yaml:"useExistingK0s,omitempty"` K0sBinaryPath string `yaml:"k0sBinaryPath,omitempty"` K0sInstallPath string `yaml:"k0sInstallPath,omitempty"` K0sDownloadURL string `yaml:"k0sDownloadURL,omitempty"` @@ -123,13 +124,33 @@ return err } - return validation.ValidateStruct(h, + if err := validation.ValidateStruct(h, validation.Field(&h.Role, validation.In("controller", "worker", "controller+worker", "single").Error("unknown role "+h.Role)), validation.Field(&h.PrivateAddress, is.IP), validation.Field(&h.Files), validation.Field(&h.NoTaints, validation.When(h.Role != "controller+worker", validation.NotIn(true).Error("noTaints can only be true for controller+worker role"))), validation.Field(&h.InstallFlags, validation.Each(validation.By(validateBalancedQuotes))), - ) + ); err != nil { + return err + } + + if h.UseExistingK0s { + errs := validation.Errors{} + if h.UploadBinary { + errs["uploadBinary"] = fmt.Errorf("uploadBinary cannot be true when useExistingK0s is true") + } + if h.K0sBinaryPath != "" { + errs["k0sBinaryPath"] = fmt.Errorf("k0sBinaryPath cannot be set when useExistingK0s is true") + } + if h.K0sDownloadURL != "" { + errs["k0sDownloadURL"] = fmt.Errorf("k0sDownloadURL cannot be set when useExistingK0s is true") + } + if len(errs) > 0 { + return errs + } + } + + return nil } // ResolveUploadFiles resolves host file sources relative to baseDir. @@ -219,6 +240,8 @@ } // UnmarshalYAML sets in some sane defaults when unmarshaling the data from yaml + +// UnmarshalYAML sets in some sane defaults when unmarshaling the data from yaml func (h *Host) UnmarshalYAML(unmarshal func(interface{}) error) error { type host Host yh := (*host)(h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/k0sctl-0.27.1/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host_test.go new/k0sctl-0.28.0/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host_test.go --- old/k0sctl-0.27.1/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host_test.go 2025-12-09 10:38:28.000000000 +0100 +++ new/k0sctl-0.28.0/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host_test.go 2025-12-16 13:19:47.000000000 +0100 @@ -142,6 +142,18 @@ h.InstallFlags = []string{"--bar='"} require.ErrorContains(t, h.Validate(), "unbalanced quotes") }) + t.Run("useExistingK0s", func(t *testing.T) { + h := Host{Role: "worker", UseExistingK0s: true, UploadBinary: true} + require.ErrorContains(t, h.Validate(), "uploadBinary cannot be true") + h.UploadBinary = false + h.K0sBinaryPath = "/tmp/k0s" + require.ErrorContains(t, h.Validate(), "k0sBinaryPath cannot be set") + h.K0sBinaryPath = "" + h.K0sDownloadURL = "https://example.test/k0s" + require.ErrorContains(t, h.Validate(), "k0sDownloadURL cannot be set") + h.K0sDownloadURL = "" + require.NoError(t, h.Validate()) + }) } func TestBinaryPath(t *testing.T) { ++++++ k0sctl.obsinfo ++++++ --- /var/tmp/diff_new_pack.v4aDYE/_old 2025-12-17 18:37:41.385847792 +0100 +++ /var/tmp/diff_new_pack.v4aDYE/_new 2025-12-17 18:37:41.405848631 +0100 @@ -1,5 +1,5 @@ name: k0sctl -version: 0.27.1 -mtime: 1765273108 -commit: c7ee91b2f1a36c447590993cbb133028882271df +version: 0.28.0 +mtime: 1765887587 +commit: bad9a8d3e83de317c65638681c7a895f1af81614 ++++++ vendor.tar.gz ++++++ ++++ 2784 lines of diff (skipped)
