Skip to content

Add JuiceFS WebDAV server support#110

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/support-juicefs-webdav
Draft

Add JuiceFS WebDAV server support#110
Copilot wants to merge 2 commits into
mainfrom
copilot/support-juicefs-webdav

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

Adds a new WebDAV CRD that manages a JuiceFS WebDAV server deployment, exposing a JuiceFS filesystem over the WebDAV protocol via a Kubernetes Deployment + Service.

New API

apiVersion: juicefs.io/v1
kind: WebDAV
metadata:
  name: webdav-example
spec:
  image: juicedata/mount:ee-5.3.6-c8ec652
  replicas: 1
  secretRef:
    name: juicefs-secret   # same secret format as CacheGroup
  port: 9007               # default
  serviceType: ClusterIP   # default
  options:
    - gzip

Key design decisions

  • EE mode (secret contains name + token): runs juicefs auth <volume> then exec juicefs webdav <volume> 0.0.0.0:<port>
  • CE mode (secret contains metaurl): skips auth, runs exec juicefs webdav <metaurl> 0.0.0.0:<port> directly; env-var injection for stripped secrets is skipped to avoid missing-key pod failures
  • Reuses shared secret parsing infrastructure (secretKeys, secretStrippedEnvs, initconfig) from the CacheGroup builder
  • Status tracks Pending / Progressing / Ready phases derived from Deployment.Status.ReadyReplicas

Changes

  • api/v1/webdav_types.goWebDAV / WebDAVList CRD schema; short name wdav
  • api/v1/zz_generated.deepcopy.go — generated DeepCopy methods
  • pkg/builder/webdav.goWebDAVBuilder: generates Deployment and Service
  • pkg/builder/webdav_test.go — 12 unit tests covering EE/CE modes, option parsing, Deployment/Service generation
  • internal/controller/webdav_controller.go — reconciler managing Deployment + Service lifecycle and status sync
  • cmd/app/controller.go — registers WebDAVReconciler
  • pkg/common/common.goKindWebDAV, LabelWebDAV, LabelWebDAVValue, MaxWebDAVConcurrentReconciles, GenWebDAVName
  • config/crd/bases/juicefs.io_webdavs.yaml — generated CRD manifest (via make manifests)
  • config/rbac/role.yaml — auto-generated RBAC rules for webdavs resources

Copilot AI linked an issue May 12, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add support for JuiceFS WebDAV Add JuiceFS WebDAV server support May 12, 2026
Copilot finished work on behalf of zxh326 May 12, 2026 03:46
Copilot AI requested a review from zxh326 May 12, 2026 03:46
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.

support juicefs webdav

2 participants