Skip to content

eve-k: Enable local-path storage for CLUSTER_TYPE_K3S_BASE#5622

Merged
eriknordmark merged 1 commit into
lf-edge:masterfrom
andrewd-zededa:eve-k-enable-local-path
Mar 6, 2026
Merged

eve-k: Enable local-path storage for CLUSTER_TYPE_K3S_BASE#5622
eriknordmark merged 1 commit into
lf-edge:masterfrom
andrewd-zededa:eve-k-enable-local-path

Conversation

@andrewd-zededa
Copy link
Copy Markdown
Contributor

@andrewd-zededa andrewd-zededa commented Feb 19, 2026

Description

CLUSTER_TYPE_K3S_BASE requires local-path storage installed by default so the default
k3s config will allow it in base config.yaml. CLUSTER_TYPE_REPLICATED_STORAGE will copy
in an override k3s config file which disables it.

Local-path storage is configured in the k3s config.yaml base config file to place all volumes in /persist/vault/volumes by default.

PR dependencies

None

How to test and validate this PR

  • deploy an HV=k eve node
  • eve enter kube
  • Check /persist/status/zedagent/EdgeNodeClusterConfig/global.json .ClusterType field.
  • If .ClusterType is k3s base (CLUSTER_TYPE_K3S_BASE=1) verify storage class exists:
$ kubectl get sc/local-path
NAME                   PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path   Delete          WaitForFirstConsumer   false                  18h
  • If .ClusterType is replicated storage (CLUSTER_TYPE_REPLICATED_STORAGE=2) verify storage class does not exist:
$ kubectl get sc/local-path
Error from server (NotFound): storageclasses.storage.k8s.io "local-path" not found

Changelog notes

Enable local-path storage for HV=k

PR Backports

  • 16.0-stable: If requested?
  • 14.5-stable: No, as the feature is not available there.
  • 13.4-stable: No, as the feature is not available there.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

And the last but not least:

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

Please, check the boxes above after submitting the PR in interactive mode.

Copy link
Copy Markdown

@zedi-pramodh zedi-pramodh left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewd-zededa andrewd-zededa force-pushed the eve-k-enable-local-path branch from eb06b7d to 9eb6b78 Compare February 23, 2026 14:07
@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Rebased on latest master

@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Added some details in docs/EVE-K.md under "Modes" and "User Volumes - Default PVC Options" headings.

@andrewd-zededa andrewd-zededa force-pushed the eve-k-enable-local-path branch from 5f632b0 to 57b0211 Compare February 23, 2026 16:00
@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Latest push to resolve yetus on docs/EVE-K.md.

Looks like the eve scanner had issues running:

Error: 2-23 16:01:10] [ERROR] Failed to get cvss-bt download URL
Error: Process completed with exit code 1.

@andrewd-zededa andrewd-zededa marked this pull request as ready for review February 23, 2026 16:04
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 29.49%. Comparing base (2281599) to head (f787142).
⚠️ Report is 331 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5622      +/-   ##
==========================================
+ Coverage   19.52%   29.49%   +9.96%     
==========================================
  Files          19       18       -1     
  Lines        3021     2417     -604     
==========================================
+ Hits          590      713     +123     
+ Misses       2310     1552     -758     
- Partials      121      152      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@zedi-pramodh zedi-pramodh left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewd-zededa andrewd-zededa marked this pull request as draft February 27, 2026 19:57
@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Converted back to draft to resolve cdi upload scratch volumes using local-path

@andrewd-zededa andrewd-zededa force-pushed the eve-k-enable-local-path branch from 57b0211 to 5c5c22d Compare March 4, 2026 18:24
@github-actions github-actions Bot requested a review from zedi-pramodh March 4, 2026 18:25
@andrewd-zededa andrewd-zededa force-pushed the eve-k-enable-local-path branch from 5c5c22d to 99172ce Compare March 4, 2026 19:18
@andrewd-zededa andrewd-zededa changed the title Enable local-path storage for all cluster types. Enable local-path storage for CLUSTER_TYPE_K3S_BASE Mar 4, 2026
Some K3S_BASE mode use cases require local-path storage,
for simplicity just enable it for all modes.

Single node and CLUSTER_TYPE_REPLICATED_STORAGE continue
to define all PVCs as longhorn.
CLUSTER_TYPE_K3S_BASE will now allow for local volumes.

Local-path storage is configured in the k3s config.yaml
base config file to place all volumes in
/persist/vault/volumes by default.

Signed-off-by: Andrew Durbin <andrewd@zededa.com>
@andrewd-zededa andrewd-zededa force-pushed the eve-k-enable-local-path branch from 99172ce to f787142 Compare March 4, 2026 19:31
@andrewd-zededa andrewd-zededa changed the title Enable local-path storage for CLUSTER_TYPE_K3S_BASE eve-k: Enable local-path storage for CLUSTER_TYPE_K3S_BASE Mar 4, 2026
@andrewd-zededa andrewd-zededa marked this pull request as ready for review March 4, 2026 23:45
@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

Issues running CVE PR Gate:

Error: 3-04 19:31:54] [ERROR] Failed to get cvss-bt download URL
Error: Process completed with exit code 1.

@andrewd-zededa
Copy link
Copy Markdown
Contributor Author

/rerun red

Copy link
Copy Markdown
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread docs/EVE-K.md
The available default storage classes will vary depending on the mode which eve-k is
running as. All storage classes installed by EVE will place volumes in /persist/vault/volumes/... by default.

- Default single node 'First-Boot' Mode (No EdgeNodeCluster eve-api config): Longhorn and Local-Path
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a possibility for a race if the project auto-deploys applications such that the first time the device is fetching the EdgeNodeConfig from the controller it receives both a set of applications to download and deploy, and in the same config receives EdgeNodeCluster.ClusterType? That means it might need to change the CLUSTER_TYPE while it is downloading to /persist/vault and later will create objects under /persist/vault/volumes/

Do we need to verify that wehave received and completely processed the EdgeNodeCluster.ClusterType before we start using /persist/vault/volumes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

At first boot when the node is running as single node it will enforce PVC creation using the longhorn storage class which uses /persist/vault/volumes/replicas. The user ability to deploy volumes in local-path is not available until after convert to k3s_basemode with the cluster config.

@eriknordmark eriknordmark merged commit 82777e4 into lf-edge:master Mar 6, 2026
48 of 51 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