Merge pull request #116469 from RomanBednar/pv-phase-transition-time
PersistentVolume last phase transition time
This commit is contained in:
@@ -380,6 +380,12 @@ type PersistentVolumeStatus struct {
|
||||
// Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI
|
||||
// +optional
|
||||
Reason string
|
||||
// LastPhaseTransitionTime is the time the phase transitioned from one to another
|
||||
// and automatically resets to current time everytime a volume phase transitions.
|
||||
// This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature.
|
||||
// +featureGate=PersistentVolumeLastPhaseTransitionTime
|
||||
// +optional
|
||||
LastPhaseTransitionTime *metav1.Time
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
2
pkg/apis/core/v1/zz_generated.conversion.go
generated
2
pkg/apis/core/v1/zz_generated.conversion.go
generated
@@ -5574,6 +5574,7 @@ func autoConvert_v1_PersistentVolumeStatus_To_core_PersistentVolumeStatus(in *v1
|
||||
out.Phase = core.PersistentVolumePhase(in.Phase)
|
||||
out.Message = in.Message
|
||||
out.Reason = in.Reason
|
||||
out.LastPhaseTransitionTime = (*metav1.Time)(unsafe.Pointer(in.LastPhaseTransitionTime))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -5586,6 +5587,7 @@ func autoConvert_core_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in *co
|
||||
out.Phase = v1.PersistentVolumePhase(in.Phase)
|
||||
out.Message = in.Message
|
||||
out.Reason = in.Reason
|
||||
out.LastPhaseTransitionTime = (*metav1.Time)(unsafe.Pointer(in.LastPhaseTransitionTime))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
6
pkg/apis/core/zz_generated.deepcopy.go
generated
6
pkg/apis/core/zz_generated.deepcopy.go
generated
@@ -2928,7 +2928,7 @@ func (in *PersistentVolume) DeepCopyInto(out *PersistentVolume) {
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
out.Status = in.Status
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3370,6 +3370,10 @@ func (in *PersistentVolumeSpec) DeepCopy() *PersistentVolumeSpec {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PersistentVolumeStatus) DeepCopyInto(out *PersistentVolumeStatus) {
|
||||
*out = *in
|
||||
if in.LastPhaseTransitionTime != nil {
|
||||
in, out := &in.LastPhaseTransitionTime, &out.LastPhaseTransitionTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user