Skip to content

Best practice for dragonfly on host path mount #4413

@chloeyin

Description

@chloeyin

Hi all, thanks to the greate project.

I'm using it to accelerate the k8s pulling process.
I've read the official doc and tried to deploy to the local cluster, mostly using the default value from chart. There are some questions on the best practice for the dragonfly deployment.

  1. Now the daemonset is by default mounting an empty dir, is is suggested to mount host path to the daemonset, so that when deployment is upraged, or for any reason that it is deleted, the new pod can reuse the data?
  2. Is is suggested to deploy the peer seed by also mounting the host path? Now I see it mounts an PVC if persistance enabled. If I disable it and mount a local path to the /var/lib/dragonfly/content, is there any potential problems?
    Does this all depends on the keep flag?
storage:
  # dir is the directory to store task's metadata and content.
  dir: /var/lib/dragonfly/
  # keep indicates whether keep the task's metadata and content when the dfdaemon restarts.
  keep: true

If host path is a recommaned way for seed and daemonset, how does dragonfly deal with the existant data in /var/lib/dragonfly/content when the pod was upgraded, I guess for seed and daemonset, they are doing the same thing?

Also I'm confused about cacheDir: /var/cache/dragonfly/dfdaemon/, seems not to be the data dir I see in pod(which is /var/lib/dragonfly/content)
Thanks in advance!

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions