Skip to content

feat(containerd): only import local-path-provisioner when needed - #195

Merged
stevensbkang merged 2 commits into
portainer:developfrom
rothgar:feat/local-storage-image-gating
Sep 17, 2026
Merged

stevensbkang merged 2 commits into
portainer:developfrom
rothgar:feat/local-storage-image-gating

Conversation

@rothgar

@rothgar rothgar commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

When local-path storage is disabled, kubesolo no longer imports the local-path-provisioner image into containerd. This avoids requiring that image (and a registry pull) on systems that do not use local-path storage.

… storage is enabled

When local-path storage is disabled, kubesolo no longer imports the
local-path-provisioner image into containerd. This avoids requiring
that image (and a registry pull) on systems that do not use local-path
storage, such as constrained or air-gapped devices.
Copilot AI lite review requested due to automatic review settings September 15, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical golden-fixture failures and missing enabled-case coverage remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Conditionally imports the local-path-provisioner image only when local-path storage is enabled.

Changes:

  • Adds local-storage state to embedded configuration.
  • Propagates the setting to containerd.
  • Skips unnecessary image imports.
File summaries
File Reviewed change Findings
types/types.go Adds the embedded local-storage flag. Critical (1 vote): Golden fixtures omit LocalStorage, causing exact-output tests to fail; update fixtures and cover both states.
pkg/runtime/containerd/service.go Stores the local-storage setting in the containerd service. No findings.
pkg/runtime/containerd/image.go Conditionally imports the provisioner image. No findings.
internal/config/embedded.go Maps configuration into embedded runtime settings. Critical (2 votes): Golden fixtures must include LocalStorage. Moderate (1 vote): Add an enabled case to cover the new mapping and import path.
Review details

Suppressed comments (1)

internal/config/embedded.go:191

  • The goldenCases table never sets c.Storage.LocalPath.Enabled to true, so this new mapping—and the enabled path that imports the provisioner image—has no test coverage. Add an enabled case and assert that LocalStorage is true in its golden output.
		LocalStorage:        cfg.Storage.LocalPath.Enabled,
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/config/embedded.go
Comment thread types/types.go
Add explicit golden test cases for local storage enabled and disabled
so the LocalStorage mapping in BuildEmbedded is directly covered.
Regenerate all existing fixtures to include the new LocalStorage field.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Note

PR image published: portainerci/kubesolo:pr-195

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is narrowly scoped, correctly gates the image import on the existing local-path enablement flag, and updates golden fixtures to lock in the new behavior.

Review details
  • Files reviewed: 31/31 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@stevensbkang
stevensbkang merged commit a031f7d into portainer:develop Sep 17, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants