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 added this to In progress in Convenience Features via automation Jan 5, 2022
@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
Convenience Features automation moved this from In progress to Done 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