From e1ce56f23fe12f10dd1baa283d4698cce974b8fc Mon Sep 17 00:00:00 2001 From: Roman Bednar Date: Fri, 10 Mar 2023 14:11:19 +0100 Subject: [PATCH] add LastPhaseTransitionTime field to PersistentVolume Kubernetes-commit: 1b4de065df46838e0334c57248a8e1fc4253ebc8 --- core/v1/types.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/v1/types.go b/core/v1/types.go index a2422820d1..9220876a68 100644 --- a/core/v1/types.go +++ b/core/v1/types.go @@ -411,6 +411,12 @@ type PersistentVolumeStatus struct { // for machine parsing and tidy display in the CLI. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` + // 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 `json:"lastPhaseTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastPhaseTransitionTime"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object