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

Elaborate more on Local Path Provider #189

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

aragilar
Copy link

Closes #184.

This mentiones the use of --default-local-storage-path and how to override the default config that comes with k3s.

Signed-off-by: James Tocknell <aragilar+github@gmail.com>
Add note that /var/lib/rancher/k3s/storage is the default storage location.

Signed-off-by: James Tocknell <aragilar+github@gmail.com>

Below we provide a simple example using a PV and PVC. For more details on the usage of the Local Path Provisioner please reference the official documentation [here](https://github.com/rancher/local-path-provisioner/blob/master/README.md#usage).

K3s allows for overriding the path used on nodes via `--default-local-storage-path` (see the [Server CLI options](../cli/server.md) for more details including defaults), and further changes to Local Path Provisioner can be made via overriding the provided ConfigMap using [HelmChartConfig](../helm/helm#customizing-packaged-components-with-helmchartconfig). The contents of this ConfigMap is detailed [here](https://github.com/rancher/local-path-provisioner/blob/master/README.md#configuration)
Copy link
Contributor

Choose a reason for hiding this comment

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

unfortunately this isn't true. it's not packaged as a helm chart, so you can't configure it as such. The only way to modify it is to start k3s with --disable=local-storage and provide your own deployment.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, OK. I'll look at rewording this to explain that you need to use your own deployment. Is there a reason that local-path-provisioner wasn't set up via helm, and is there anything stopping the switch being made?

Copy link
Contributor

Choose a reason for hiding this comment

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

Historical reasons mostly. Things that we bundled before adding the embedded helm controller were all managed as flat manifests. When time came to add traefik, it was only available as a helm chart, so we added the helm controller. We added HelmChartConfig support some time later. It's somewhat non-trivial to have helm "take over" existing resources in a nondisruprive way, so we've not prioritized migrating things.

docs/storage/storage.md Outdated Show resolved Hide resolved
docs/storage/storage.md Outdated Show resolved Hide resolved
aragilar and others added 2 commits October 19, 2023 10:07
Co-authored-by: Brad Davidson <brad@oatmail.org>
Signed-off-by: James Tocknell <aragilar+github@gmail.com>
Co-authored-by: Brad Davidson <brad@oatmail.org>
Signed-off-by: James Tocknell <aragilar+github@gmail.com>
@dereknola
Copy link
Contributor

You can rebase of master to fix the codespelling CI. Or just ignore it. The test deployment failures must be addresses however.

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.

Document the default(?) path used by local-path-provisioner for --default-local-storage-path
3 participants