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

[Feature] Volume Shortcuts #905

Closed
iwilltry42 opened this issue Dec 20, 2021 · 2 comments · Fixed by #916
Closed

[Feature] Volume Shortcuts #905

iwilltry42 opened this issue Dec 20, 2021 · 2 comments · Fixed by #916
Assignees
Labels
Milestone

Comments

@iwilltry42
Copy link
Member

iwilltry42 commented Dec 20, 2021

Introducing two things:

  • automatic volume creation for k3d- prefixed volumes using the --volume flag -> k3d will handle creation + deletion
  • magic mount destination keywords: e.g. --volume /some/path:k3s-storage will internally be handled as /some/path:/var/lib/rancher/k3s/storage

Originally posted by @iwilltry42 in #865 (comment)

EDIT: actually, bullet point 1 is already a docker feature: if the source part of the volume mount is not a path on the local filesystem and not an existing named volume, docker will create it (k3d will still print a warning though).

@bayeslearner
Copy link

bayeslearner commented Feb 12, 2022

Tried latest version, still got error:

(base) ~ k3d cluster create --servers 2 -v k3d-data:k3s-storage foobar
WARN[0000] No node filter specified
FATA[0000] Failed Cluster Configuration Validation:  failed to validate volume mount 'k3d-data:k3s-storage': volume mount destination doesn't appear to be an absolute path: 'k3s-storage' in 'k3d-data:k3s-storage'
(base) ~

@iwilltry42
Copy link
Member Author

@bayeslearner , damn.. didn't put the new function to use apparently 🙄
Fixed in b208c1f ... Sorry for that! (To be released with next patch/minor release)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants