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 and k3d-managed volumes #916

Merged
merged 3 commits into from
Jan 8, 2022

Conversation

iwilltry42
Copy link
Member

@iwilltry42 iwilltry42 commented Jan 5, 2022

Changes

Added

  • Volumemount-Shortcuts
    • Use some destination shortcuts with the --volume/-v flag that k3d automatically expands
      • k3s-storage -> /var/lib/rancher/k3s/storage
      • k3s-manifests -> /var/lib/rancher/k3s/server/manifests
      • k3s-manifests-custom -> /var/lib/rancher/k3s/server/manifests/custom (not K3s default: this is just some sub-directory inside the auto-deploy manifests directory which will also be parsed)
      • k3s-containerd -> /var/lib/rancher/k3s/agent/etc/containerd/config.toml (use with caution, K3s generates this file!)
      • k3s-containerd-tmpl -> /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl (used by K3s to generate the real config above)
      • k3s-registry-config -> /etc/rancher/k3s/registries.yaml (or just use --registry-config)
  • k3d-managed volumes
    • non-existing named volumes starting with a k3d- prefix will now be created and managed by k3d

Links

fixes #905

@iwilltry42 iwilltry42 added enhancement New feature or request scope/package pkg/ labels Jan 5, 2022
@iwilltry42 iwilltry42 added this to the v5.3.0 milestone Jan 5, 2022
@iwilltry42 iwilltry42 self-assigned this Jan 5, 2022
@iwilltry42 iwilltry42 force-pushed the feature/magic-volumes branch from 3fcc2eb to a8fe659 Compare January 5, 2022 20:45
@iwilltry42 iwilltry42 force-pushed the main branch 2 times, most recently from 109ab06 to 280de52 Compare January 6, 2022 06:58
@iwilltry42 iwilltry42 force-pushed the feature/magic-volumes branch from a8fe659 to b3b51dc Compare January 6, 2022 06:59
@iwilltry42 iwilltry42 force-pushed the feature/magic-volumes branch from b3b51dc to f9b5621 Compare January 8, 2022 10:01
@iwilltry42 iwilltry42 changed the title [Feature] Volume Shortcuts + Cleanup [Feature] Volume Shortcuts and k3d-managed volumes Jan 8, 2022
@iwilltry42 iwilltry42 merged commit 5a00a39 into main Jan 8, 2022
@iwilltry42 iwilltry42 deleted the feature/magic-volumes branch January 8, 2022 10:02
@bayeslearner
Copy link

Need actual examples. Tried this and 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

Fix provided, see #905 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope/package pkg/
Projects
Development

Successfully merging this pull request may close these issues.

[Feature] Volume Shortcuts
2 participants