refactor: keep storage rebalance plan-only
This commit is contained in:
parent
44656ca29c
commit
556bd168af
|
|
@ -3498,8 +3498,15 @@ EOF
|
|||
kubectl --kubeconfig "${kubeconfig}" -n "${namespace}" patch pvc "${pvc}" --type merge -p "{\"spec\":{\"resources\":{\"requests\":{\"storage\":\"${size}\"}}}}"
|
||||
;;
|
||||
rebalance)
|
||||
if (($# > 0)); then
|
||||
echo "Storage rebalance accepts no mutation flags; it is intentionally plan-only." >&2
|
||||
return 2
|
||||
fi
|
||||
echo "Storage rebalance is plan-only: OpenEBS LocalPV volumes are node-local and cannot be moved safely by a generic command."
|
||||
kubectl --kubeconfig "${kubeconfig}" get pv -o wide 2>/dev/null || true
|
||||
kubectl --kubeconfig "${kubeconfig}" get blockdevice -A \
|
||||
-o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,NODE:.spec.nodeAttributes.nodeName,CLAIMED:.status.claimState,SIZE:.spec.capacity.storage,STATE:.status.state' \
|
||||
2>/dev/null || true
|
||||
echo "Use an explicit migration plan after identifying the owning workload and a target node."
|
||||
;;
|
||||
*)
|
||||
|
|
|
|||
Loading…
Reference in New Issue