feat(oss): implement version-aware ResourceVersion strategy for fuse pod delete - #1682
Conversation
…pod delete Implement intelligent ResourceVersion selection based on Kubernetes version to balance data consistency and etcd pressure in large-scale clusters.
df75c92 to
9e2aacb
Compare
…ete RV strategy Use ConstrainFusePodDeleteRV feature gate instead of OSS_FUSE_CONSTRAIN_RV env var, allowing UI-based configuration. Only explicitly set feature gate values override the k8s version-based default behavior.
From AI:
The PR adds k8sVersion *k8sver.Version to both the OSS struct (pkg/oss/oss.go) and controllerServer struct (pkg/oss/controllerserver.go), stores the value, but never reads it from either struct. The version is
In ShouldConstrainResourceVersion(): This is a degraded-mode fallback, not an error. In main.go, the same condition (failed version detection) is logged as klog.Warningf. Should be consistent — use klog.Warningf here too.
kubeClient is hoisted to the outer scope (var kubeClient kubernetes.Interface) but is never used outside the else block. Only k8sVersion needs the outer scope. kubeClient could remain a block-scoped := inside the var k8sVersion *k8sversion.Version |
…ead k8sVersion fields, and fix log level/variable scoping per review comments
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlbeeSo, mowangdk The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Implement intelligent ResourceVersion selection based on Kubernetes version to balance data consistency and etcd pressure in large-scale clusters.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Key Changes:
Design Decisions:
and performance (reads from cache instead of etcd)
cause mount/unmount hangs in large clusters
to avoid repeated version checks in hot path
Logging Levels:
Testing:
Files Modified:
ShouldConstrainResourceVersion() with Featuregate support
Use constrainResourceVersion flag in Delete()
Update constructor signature
Impact:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: