Merge pull request #124969 from RomanBednar/pv-phase-transition-time-ga

graduate PersistentVolumeLastPhaseTransitionTime to GA in 1.31
This commit is contained in:
Kubernetes Prow Robot
2024-07-11 15:29:19 -07:00
committed by GitHub
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