Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package k0sctl for openSUSE:Factory checked 
in at 2026-09-22 15:51:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/k0sctl (Old)
 and      /work/SRC/openSUSE:Factory/.k0sctl.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "k0sctl"

Tue Sep 22 15:51:28 2026 rev:28 rq:1379564 version:0.33.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/k0sctl/k0sctl.changes    2026-09-18 
22:07:32.158101572 +0200
+++ /work/SRC/openSUSE:Factory/.k0sctl.new.383539/k0sctl.changes        
2026-09-22 15:52:16.659893783 +0200
@@ -1,0 +2,21 @@
+Tue Sep 22 04:39:25 UTC 2026 - Johannes Kastl 
<[email protected]>
+
+- Update to version 0.33.1:
+  * build(deps): bump github.com/k0sproject/rig/v2 from 2.2.0 to
+    2.2.1 (#1194)
+  * build(deps): bump github.com/creasty/defaults from 1.10.0 to
+    1.11.0 (#1192)
+  * chore(deps): reduce rig dependabot cooldown to 0 days and
+    others to 2 (#1193)
+  * fix(phase): create temp files as root when they are written as
+    root (#1187)
+  * build(deps): bump github.com/creasty/defaults from 1.9.0 to
+    1.10.0 (#1182)
+  * Add tests for KubeNodeReadyFunc and K0sDynamicConfigReadyFunc
+    (#1158)
+  * build(deps): bump github.com/creasty/defaults from 1.8.0 to
+    1.9.0 (#1178)
+  * Dedupe initLogging and initSilentLogging (#1153)
+  * Add test for GetResources not-found error path (#1157)
+
+-------------------------------------------------------------------

Old:
----
  k0sctl-0.33.0.obscpio

New:
----
  k0sctl-0.33.1.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ k0sctl.spec ++++++
--- /var/tmp/diff_new_pack.8CcWHs/_old  2026-09-22 15:52:17.749938949 +0200
+++ /var/tmp/diff_new_pack.8CcWHs/_new  2026-09-22 15:52:17.751939032 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           k0sctl
-Version:        0.33.0
+Version:        0.33.1
 Release:        0
 Summary:        A bootstrapping and management tool for k0s clusters
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.8CcWHs/_old  2026-09-22 15:52:17.813941601 +0200
+++ /var/tmp/diff_new_pack.8CcWHs/_new  2026-09-22 15:52:17.820941891 +0200
@@ -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">refs/tags/v0.33.0</param>
+    <param name="revision">refs/tags/v0.33.1</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
     <param name="changesgenerate">enable</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.8CcWHs/_old  2026-09-22 15:52:17.859943507 +0200
+++ /var/tmp/diff_new_pack.8CcWHs/_new  2026-09-22 15:52:17.863943673 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/k0sproject/k0sctl.git</param>
-              <param 
name="changesrevision">2c1aef3f3733e6d76eebc95346e627b0026ac344</param></service></servicedata>
+              <param 
name="changesrevision">c4bfa9541ca05edd8a2d143fd50290fbc9243d0b</param></service></servicedata>
 (No newline at EOF)
 

++++++ k0sctl-0.33.0.obscpio -> k0sctl-0.33.1.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/.github/dependabot.yml 
new/k0sctl-0.33.1/.github/dependabot.yml
--- old/k0sctl-0.33.0/.github/dependabot.yml    2026-09-11 15:43:13.000000000 
+0200
+++ new/k0sctl-0.33.1/.github/dependabot.yml    2026-09-21 13:44:17.000000000 
+0200
@@ -5,8 +5,16 @@
     schedule:
       interval: "daily"
     open-pull-requests-limit: 5
+    # Dependabot applies a 3 day cooldown to version updates by default. Spell
+    # out a shorter one and let rig through immediately, as rig releases are
+    # usually cut with a k0sctl bump already in mind.
+    cooldown:
+      default-days: 2
+      exclude:
+        - "github.com/k0sproject/rig/v2"
   - package-ecosystem: github-actions
     directory: /
     schedule:
       interval: daily
-      
+    cooldown:
+      default-days: 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/.github/workflows/actionlint.yml 
new/k0sctl-0.33.1/.github/workflows/actionlint.yml
--- old/k0sctl-0.33.0/.github/workflows/actionlint.yml  2026-09-11 
15:43:13.000000000 +0200
+++ new/k0sctl-0.33.1/.github/workflows/actionlint.yml  2026-09-21 
13:44:17.000000000 +0200
@@ -14,7 +14,7 @@
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
-      - uses: 
reviewdog/action-actionlint@d290e336d5a743810aef4404f757dc862276d2ae # v1.73.4
+      - uses: 
reviewdog/action-actionlint@320fcdd9c860767cf17fab3b20e22e739d5d02b8 # v1.76.0
         with:
           fail_on_error: true
           level: warning
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/.github/workflows/codeql-analysis.yml 
new/k0sctl-0.33.1/.github/workflows/codeql-analysis.yml
--- old/k0sctl-0.33.0/.github/workflows/codeql-analysis.yml     2026-09-11 
15:43:13.000000000 +0200
+++ new/k0sctl-0.33.1/.github/workflows/codeql-analysis.yml     2026-09-21 
13:44:17.000000000 +0200
@@ -50,7 +50,7 @@
 
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 
# v4.37.9
+      uses: github/codeql-action/init@1c5b675653bb5c22dbe9b12b556ec555138e09fd 
# v4.38.1
       with:
         languages: ${{ matrix.language }}
         # If you wish to specify custom queries, you can do so here or in a 
config file.
@@ -64,7 +64,7 @@
     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
     # If this step fails, then you should remove it and run the build manually 
(see below)
     - name: Autobuild
-      uses: 
github/codeql-action/autobuild@cdf488f595d80d6e07e03d4674febd5ab45fa938 # 
v4.37.9
+      uses: 
github/codeql-action/autobuild@1c5b675653bb5c22dbe9b12b556ec555138e09fd # 
v4.38.1
 
     # â„šī¸ Command-line programs to run using the OS shell.
     # 📚 See 
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -77,4 +77,4 @@
     #   ./location_of_script_within_repo/buildscript.sh
 
     - name: Perform CodeQL Analysis
-      uses: 
github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
+      uses: 
github/codeql-action/analyze@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/.github/workflows/release.yml 
new/k0sctl-0.33.1/.github/workflows/release.yml
--- old/k0sctl-0.33.0/.github/workflows/release.yml     2026-09-11 
15:43:13.000000000 +0200
+++ new/k0sctl-0.33.1/.github/workflows/release.yml     2026-09-21 
13:44:17.000000000 +0200
@@ -28,11 +28,11 @@
           password: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Set up QEMU
-        uses: 
docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
+        uses: 
docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
 
       - name: Set up Docker Buildx
         id: buildx
-        uses: 
docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
+        uses: 
docker/setup-buildx-action@594f3bf4285d9ea8dc53c9a0c9c4092420091003 # v4.4.0
         with:
           driver: docker-container
 
@@ -62,7 +62,7 @@
           prerelease: ${{ contains(steps.tag-name.outputs.tag, '-') }} # 
v0.1.2-beta1, 1.2.3-rc1
 
       - name: Build image and push to GitHub image registry
-        uses: 
docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
+        uses: 
docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
         if: startsWith(github.ref, 'refs/tags/')
         with:
           builder: ${{ steps.buildx.outputs.name }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/k0sctl-0.33.0/.github/workflows/smoke-triage.lock.yml 
new/k0sctl-0.33.1/.github/workflows/smoke-triage.lock.yml
--- old/k0sctl-0.33.0/.github/workflows/smoke-triage.lock.yml   2026-09-11 
15:43:13.000000000 +0200
+++ new/k0sctl-0.33.1/.github/workflows/smoke-triage.lock.yml   2026-09-21 
13:44:17.000000000 +0200
@@ -110,7 +110,7 @@
     steps:
       - name: Setup Scripts
         id: setup
-        uses: 
github/gh-aw-actions/setup@5e508589e03a7757a7e05b26e834292f5445bfb6 # v0.88.7
+        uses: 
github/gh-aw-actions/setup@f3b81cdb3070066a47faa9bdf440f4f1dc78b1f0 # v0.89.17
         with:
           destination: ${{ runner.temp }}/gh-aw/actions
           job-name: ${{ github.job }}
@@ -432,7 +432,7 @@
     steps:
       - name: Setup Scripts
         id: setup
-        uses: 
github/gh-aw-actions/setup@5e508589e03a7757a7e05b26e834292f5445bfb6 # v0.88.7
+        uses: 
github/gh-aw-actions/setup@f3b81cdb3070066a47faa9bdf440f4f1dc78b1f0 # v0.89.17
         with:
           destination: ${{ runner.temp }}/gh-aw/actions
           job-name: ${{ github.job }}
@@ -1182,7 +1182,7 @@
     steps:
       - name: Setup Scripts
         id: setup
-        uses: 
github/gh-aw-actions/setup@5e508589e03a7757a7e05b26e834292f5445bfb6 # v0.88.7
+        uses: 
github/gh-aw-actions/setup@f3b81cdb3070066a47faa9bdf440f4f1dc78b1f0 # v0.89.17
         with:
           destination: ${{ runner.temp }}/gh-aw/actions
           job-name: ${{ github.job }}
@@ -1459,7 +1459,7 @@
     steps:
       - name: Setup Scripts
         id: setup
-        uses: 
github/gh-aw-actions/setup@5e508589e03a7757a7e05b26e834292f5445bfb6 # v0.88.7
+        uses: 
github/gh-aw-actions/setup@f3b81cdb3070066a47faa9bdf440f4f1dc78b1f0 # v0.89.17
         with:
           destination: ${{ runner.temp }}/gh-aw/actions
           job-name: ${{ github.job }}
@@ -1790,7 +1790,7 @@
     steps:
       - name: Setup Scripts
         id: setup
-        uses: 
github/gh-aw-actions/setup@5e508589e03a7757a7e05b26e834292f5445bfb6 # v0.88.7
+        uses: 
github/gh-aw-actions/setup@f3b81cdb3070066a47faa9bdf440f4f1dc78b1f0 # v0.89.17
         with:
           destination: ${{ runner.temp }}/gh-aw/actions
           job-name: ${{ github.job }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/cmd/flags.go 
new/k0sctl-0.33.1/cmd/flags.go
--- old/k0sctl-0.33.0/cmd/flags.go      2026-09-11 15:43:13.000000000 +0200
+++ new/k0sctl-0.33.1/cmd/flags.go      2026-09-21 13:44:17.000000000 +0200
@@ -396,20 +396,23 @@
 
 // initLogging initializes the logger
 func initLogging(ctx *cli.Context) error {
-       log.SetLevel(log.TraceLevel)
-       log.SetOutput(io.Discard)
-       initScreenLogger(ctx, logLevelFromCtx(ctx, log.InfoLevel))
-       cmd.DisableRedact = ctx.Bool("no-redact")
-       return initFileLogger(ctx)
+       return initLoggingWithDefaultLevel(ctx, log.InfoLevel)
 }
 
-// initSilentLogging initializes the logger in silent mode
-// TODO too similar to initLogging
+// initSilentLogging initializes the logger in silent mode, i.e. only
+// logging to the screen at the fatal level by default.
 func initSilentLogging(ctx *cli.Context) error {
+       return initLoggingWithDefaultLevel(ctx, log.FatalLevel)
+}
+
+// initLoggingWithDefaultLevel sets up the logger shared by initLogging and
+// initSilentLogging. defaultLevel is the screen log level used when neither
+// --debug nor --trace is set.
+func initLoggingWithDefaultLevel(ctx *cli.Context, defaultLevel log.Level) 
error {
        log.SetLevel(log.TraceLevel)
        log.SetOutput(io.Discard)
+       initScreenLogger(ctx, logLevelFromCtx(ctx, defaultLevel))
        cmd.DisableRedact = ctx.Bool("no-redact")
-       initScreenLogger(ctx, logLevelFromCtx(ctx, log.FatalLevel))
        return initFileLogger(ctx)
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/go.mod new/k0sctl-0.33.1/go.mod
--- old/k0sctl-0.33.0/go.mod    2026-09-11 15:43:13.000000000 +0200
+++ new/k0sctl-0.33.1/go.mod    2026-09-21 13:44:17.000000000 +0200
@@ -10,10 +10,10 @@
        github.com/adrg/xdg v0.5.3
        github.com/bmatcuk/doublestar/v4 v4.10.0
        github.com/carlmjohnson/versioninfo v0.22.5
-       github.com/creasty/defaults v1.8.0
+       github.com/creasty/defaults v1.11.0
        github.com/jellydator/validation v1.2.0
        github.com/k0sproject/dig v0.4.0
-       github.com/k0sproject/rig/v2 v2.2.0
+       github.com/k0sproject/rig/v2 v2.2.1
        github.com/k0sproject/version v0.8.0
        github.com/logrusorgru/aurora v2.0.3+incompatible
        github.com/mattn/go-isatty v0.0.24
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/go.sum new/k0sctl-0.33.1/go.sum
--- old/k0sctl-0.33.0/go.sum    2026-09-11 15:43:13.000000000 +0200
+++ new/k0sctl-0.33.1/go.sum    2026-09-21 13:44:17.000000000 +0200
@@ -27,8 +27,8 @@
 github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod 
h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
 github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
 github.com/creack/pty v1.1.17/go.mod 
h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
-github.com/creasty/defaults v1.8.0 
h1:z27FJxCAa0JKt3utc0sCImAEb+spPucmKoOdLHvHYKk=
-github.com/creasty/defaults v1.8.0/go.mod 
h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM=
+github.com/creasty/defaults v1.11.0 
h1:lZ8c5bHZGtyIeumdTPXKOKkHtNL+qQWVrGhNPGqeFww=
+github.com/creasty/defaults v1.11.0/go.mod 
h1:TGHvg4OCP/fVv+yotLzg97i5PKrF+iZSvg6Kmm7Y12Y=
 github.com/davecgh/go-spew v1.1.0/go.mod 
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1/go.mod 
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc 
h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
@@ -107,8 +107,8 @@
 github.com/json-iterator/go v1.1.12/go.mod 
h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
 github.com/k0sproject/dig v0.4.0 
h1:yBxFUUxNXAMGBg6b7c6ypxdx/o3RmhoI5v5ABOw5tn0=
 github.com/k0sproject/dig v0.4.0/go.mod 
h1:rlZ7N7ZEcB4Fi96TPXkZ4dqyAiDWOGLapyL9YpZ7Qz4=
-github.com/k0sproject/rig/v2 v2.2.0 
h1:Nu/T73fzygFpT+JbHXAKbp37eP+9919eyobOsuJJCmw=
-github.com/k0sproject/rig/v2 v2.2.0/go.mod 
h1:gSZunOCuZCfnD+HqxQsyHVyuNZHq4pE8sDI8jRY6MmY=
+github.com/k0sproject/rig/v2 v2.2.1 
h1:RG/WdtN9qe6XFWTr4FO8uYK6URvTnT3o8lnjMqRCRsQ=
+github.com/k0sproject/rig/v2 v2.2.1/go.mod 
h1:mioiuQgsFdOz22nx09XWJGs6YDHf+6XM2vSTZfcrk3U=
 github.com/k0sproject/version v0.8.0 
h1:Yh1SFDeBqQ7etrGwffY8bWKdbAUjeBOhiZ6oQuuz4sM=
 github.com/k0sproject/version v0.8.0/go.mod 
h1:iNV3O8blndsQhxZ8zACfpQhrLDlrTvDlCzx+vgCFtSI=
 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 
h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/phase/configure_k0s.go 
new/k0sctl-0.33.1/phase/configure_k0s.go
--- old/k0sctl-0.33.0/phase/configure_k0s.go    2026-09-11 15:43:13.000000000 
+0200
+++ new/k0sctl-0.33.1/phase/configure_k0s.go    2026-09-21 13:44:17.000000000 
+0200
@@ -293,7 +293,7 @@
 // validateConfigWithTempFile writes cfg to a temporary file on the host,
 // runs k0s config validation against it and removes the file afterwards.
 func (p *ConfigureK0s) validateConfigWithTempFile(c *cluster.Host, cfg string) 
error {
-       tempConfigPath, err := c.FS().CreateTemp("", "")
+       tempConfigPath, err := c.Sudo().FS().CreateTemp("", "")
        if err != nil {
                return fmt.Errorf("failed to create temporary file for config: 
%w", err)
        }
@@ -363,7 +363,7 @@
        }
 
        log.Debugf("%s: writing k0s configuration", h)
-       tempConfigPath, err := h.FS().CreateTemp("", "")
+       tempConfigPath, err := h.Sudo().FS().CreateTemp("", "")
        if err != nil {
                return fmt.Errorf("failed to create temporary file for config: 
%w", err)
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/phase/install_workers.go 
new/k0sctl-0.33.1/phase/install_workers.go
--- old/k0sctl-0.33.0/phase/install_workers.go  2026-09-11 15:43:13.000000000 
+0200
+++ new/k0sctl-0.33.1/phase/install_workers.go  2026-09-21 13:44:17.000000000 
+0200
@@ -165,7 +165,7 @@
 
                err = p.Wet(h, "validate api connection to control plane", 
func() error {
                        log.Infof("%s: validating api connection to %s using 
join token", h, h.Metadata.K0sTokenData.URL)
-                       tempfile, err := h.FS().CreateTemp("", "")
+                       tempfile, err := h.Sudo().FS().CreateTemp("", "")
                        if err != nil {
                                return fmt.Errorf("failed to create temp file 
for kubeconfig: %w", err)
                        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/pkg/manifest/reader_test.go 
new/k0sctl-0.33.1/pkg/manifest/reader_test.go
--- old/k0sctl-0.33.0/pkg/manifest/reader_test.go       2026-09-11 
15:43:13.000000000 +0200
+++ new/k0sctl-0.33.1/pkg/manifest/reader_test.go       2026-09-21 
13:44:17.000000000 +0200
@@ -151,6 +151,22 @@
        assert.Len(t, services, 1, "Expected 1 Service to be returned")
 }
 
+func TestReader_GetResources_NotFound(t *testing.T) {
+       input := `
+apiVersion: v1
+kind: Pod
+metadata:
+  name: pod1
+`
+       r := &manifest.Reader{}
+       require.NoError(t, r.Parse(strings.NewReader(input)))
+
+       services, err := r.GetResources("v1", "Service")
+       require.Error(t, err, "GetResources should return an error when nothing 
matches")
+       assert.Nil(t, services)
+       assert.Contains(t, err.Error(), "apiVersion=v1, kind=Service")
+}
+
 func TestReader_ParseHandlesLargeManifest(t *testing.T) {
        largeData := strings.Repeat("x", 70*1024)
        manifestStr := fmt.Sprintf(`apiVersion: v1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.33.0/pkg/node/statusfunc_test.go 
new/k0sctl-0.33.1/pkg/node/statusfunc_test.go
--- old/k0sctl-0.33.0/pkg/node/statusfunc_test.go       1970-01-01 
01:00:00.000000000 +0100
+++ new/k0sctl-0.33.1/pkg/node/statusfunc_test.go       2026-09-21 
13:44:17.000000000 +0200
@@ -0,0 +1,106 @@
+package node
+
+import (
+       "context"
+       "errors"
+       "testing"
+
+       "github.com/k0sproject/k0sctl/configurer/linux"
+       
"github.com/k0sproject/k0sctl/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster"
+       "github.com/k0sproject/k0sctl/pkg/retry"
+       rig "github.com/k0sproject/rig/v2"
+       "github.com/k0sproject/rig/v2/cmd"
+       "github.com/k0sproject/rig/v2/protocol"
+       "github.com/k0sproject/rig/v2/remotefs"
+       "github.com/k0sproject/rig/v2/rigtest"
+       "github.com/stretchr/testify/require"
+)
+
+// newTestHost returns a *cluster.Host backed by a mock runner. Commands that
+// aren't explicitly matched fail, which also makes the KubeconfigPath lookup's
+// `test -f` probe report the admin.conf as absent, so KubectlCmdf resolves to
+// the kubelet.conf fallback path consistently across tests.
+func newTestHost(t *testing.T, addOutput func(mr *rigtest.MockRunner)) 
*cluster.Host {
+       t.Helper()
+       mr := rigtest.NewMockRunner()
+       mr.ErrDefault = errors.New("no such file")
+       mr.AddCommand(rigtest.Match("sudo.*true"), func(a *rigtest.A) error { 
return nil })
+       addOutput(mr)
+       posixFS := remotefs.NewPosixFS(mr)
+       client, err := rig.NewClient(
+               rig.WithConnection(mr.MockConnection),
+               rig.WithRemoteFSProvider(func(_ cmd.Runner) (remotefs.FS, 
error) {
+                       return posixFS, nil
+               }),
+       )
+       require.NoError(t, err)
+       return &cluster.Host{
+               Client:     client,
+               Configurer: &linux.Ubuntu{},
+               Metadata:   cluster.HostMetadata{Hostname: "node1"},
+       }
+}
+
+func TestKubeNodeReadyFunc(t *testing.T) {
+       t.Run("ready", func(t *testing.T) {
+               h := newTestHost(t, func(mr *rigtest.MockRunner) {
+                       mr.AddCommandOutput(rigtest.Contains("kubectl"), 
`{"status":{"conditions":[{"type":"Ready","status":"True"}]}}`)
+               })
+               require.NoError(t, KubeNodeReadyFunc(h)(context.Background()))
+       })
+
+       t.Run("not ready", func(t *testing.T) {
+               h := newTestHost(t, func(mr *rigtest.MockRunner) {
+                       mr.AddCommandOutput(rigtest.Contains("kubectl"), 
`{"status":{"conditions":[{"type":"Ready","status":"False"}]}}`)
+               })
+               err := KubeNodeReadyFunc(h)(context.Background())
+               require.ErrorContains(t, err, "not ready")
+       })
+
+       t.Run("no ready condition", func(t *testing.T) {
+               h := newTestHost(t, func(mr *rigtest.MockRunner) {
+                       mr.AddCommandOutput(rigtest.Contains("kubectl"), 
`{"status":{"conditions":[]}}`)
+               })
+               err := KubeNodeReadyFunc(h)(context.Background())
+               require.ErrorContains(t, err, "'Ready' condition not found")
+       })
+
+       t.Run("invalid json", func(t *testing.T) {
+               h := newTestHost(t, func(mr *rigtest.MockRunner) {
+                       mr.AddCommandOutput(rigtest.Contains("kubectl"), `not 
json`)
+               })
+               err := KubeNodeReadyFunc(h)(context.Background())
+               require.ErrorContains(t, err, "failed to decode")
+       })
+
+       t.Run("non-retryable exec error", func(t *testing.T) {
+               h := newTestHost(t, func(mr *rigtest.MockRunner) {
+                       mr.AddCommandFailure(rigtest.Contains("kubectl"), 
protocol.ErrNonRetryable)
+               })
+               err := KubeNodeReadyFunc(h)(context.Background())
+               require.ErrorIs(t, err, retry.ErrAbort)
+       })
+}
+
+func TestK0sDynamicConfigReadyFunc(t *testing.T) {
+       t.Run("reconciled", func(t *testing.T) {
+               h := newTestHost(t, func(mr *rigtest.MockRunner) {
+                       mr.AddCommandOutput(rigtest.Contains("kubectl"), 
`{"items":[{"reason":"SuccessfulReconcile"}]}`)
+               })
+               require.NoError(t, 
K0sDynamicConfigReadyFunc(h)(context.Background()))
+       })
+
+       t.Run("not yet reconciled", func(t *testing.T) {
+               h := newTestHost(t, func(mr *rigtest.MockRunner) {
+                       mr.AddCommandOutput(rigtest.Contains("kubectl"), 
`{"items":[]}`)
+               })
+               err := K0sDynamicConfigReadyFunc(h)(context.Background())
+               require.ErrorContains(t, err, "dynamic config not ready")
+       })
+
+       t.Run("exec error", func(t *testing.T) {
+               h := newTestHost(t, func(_ *rigtest.MockRunner) {})
+               err := K0sDynamicConfigReadyFunc(h)(context.Background())
+               require.ErrorContains(t, err, "failed to get k0s config status 
events")
+       })
+}

++++++ k0sctl.obsinfo ++++++
--- /var/tmp/diff_new_pack.8CcWHs/_old  2026-09-22 15:52:18.062951919 +0200
+++ /var/tmp/diff_new_pack.8CcWHs/_new  2026-09-22 15:52:18.065952043 +0200
@@ -1,5 +1,5 @@
 name: k0sctl
-version: 0.33.0
-mtime: 1789134193
-commit: 2c1aef3f3733e6d76eebc95346e627b0026ac344
+version: 0.33.1
+mtime: 1789991057
+commit: c4bfa9541ca05edd8a2d143fd50290fbc9243d0b
 

++++++ vendor.tar.gz ++++++
++++ 2649 lines of diff (skipped)

Reply via email to