graduate PersistentVolumeLastPhaseTransitionTime to GA in 1.31

This commit is contained in:
Roman Bednar
2024-05-20 13:46:24 +02:00
parent a31030543c
commit 5ea0c7be1e
14 changed files with 27 additions and 204 deletions

View File

@@ -41,14 +41,6 @@ func DropDisabledSpecFields(pvSpec *api.PersistentVolumeSpec, oldPVSpec *api.Per
}
}
// DropDisabledStatusFields removes disabled fields from the pv status.
// This should be called from PrepareForUpdate for all resources containing a pv status.
func DropDisabledStatusFields(oldStatus, newStatus *api.PersistentVolumeStatus) {
if !utilfeature.DefaultFeatureGate.Enabled(features.PersistentVolumeLastPhaseTransitionTime) && oldStatus.LastPhaseTransitionTime.IsZero() {
newStatus.LastPhaseTransitionTime = nil
}
}
func GetWarningsForPersistentVolume(pv *api.PersistentVolume) []string {
if pv == nil {
return nil