Skip to content

fix: reject ddc compute group storage template changes#496

Merged
morningman merged 1 commit into
apache:masterfrom
Al-assad:codex/ddc-file-cache-immutable
Jun 17, 2026
Merged

fix: reject ddc compute group storage template changes#496
morningman merged 1 commit into
apache:masterfrom
Al-assad:codex/ddc-file-cache-immutable

Conversation

@Al-assad

@Al-assad Al-assad commented Jun 17, 2026

Copy link
Copy Markdown
Member

Motivation

Changing BE file cache paths or persistent volume settings after a DDC compute group has been created changes the generated StatefulSet volume claim templates. Kubernetes does not allow updating StatefulSet volumeClaimTemplates in place, so the reconcile currently fails later with a low-level immutable field error. This makes the failure hard to understand and can look like a generic StatefulSet apply problem.

This change detects the storage template change before applying the StatefulSet and returns a clear operator event telling users to recreate the compute group for this kind of storage layout change.

Summary

  • reject DDC compute group storage template changes before applying StatefulSet
  • return a clear CGStorageTemplateImmutable event for file_cache_path / persistent volume changes
  • add unit coverage for immutable storage template detection and default volumeMode normalization

Tests

  • go test ./pkg/controller/sub_controller/disaggregated_cluster/computegroups

Notes

  • go test ./pkg/controller/sub_controller/... currently requires local envtest binaries; this environment is missing bin/k8s/1.26.1-darwin-arm64/etcd.

@morningman morningman merged commit 9336613 into apache:master Jun 17, 2026
1 check passed
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.

2 participants