Skip to content

Commit

Permalink
Merge pull request #116469 from RomanBednar/pv-phase-transition-time
Browse files Browse the repository at this point in the history
PersistentVolume last phase transition time

Kubernetes-commit: f3a070f9c684d9335b6df91ef2f3ce207629882c
  • Loading branch information
k8s-publishing-bot committed Jul 22, 2023
2 parents 6ff1b21 + 43c3eb6 commit 2859edb
Show file tree
Hide file tree
Showing 8 changed files with 951 additions and 876 deletions.
1,795 changes: 925 additions & 870 deletions core/v1/generated.pb.go

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions core/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions core/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions core/v1/types_swagger_doc_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -1446,10 +1446,11 @@ func (PersistentVolumeSpec) SwaggerDoc() map[string]string {
}

var map_PersistentVolumeStatus = map[string]string{
"": "PersistentVolumeStatus is the current status of a persistent volume.",
"phase": "phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase",
"message": "message is a human-readable message indicating details about why the volume is in this state.",
"reason": "reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.",
"": "PersistentVolumeStatus is the current status of a persistent volume.",
"phase": "phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase",
"message": "message is a human-readable message indicating details about why the volume is in this state.",
"reason": "reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.",
"lastPhaseTransitionTime": "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.",
}

func (PersistentVolumeStatus) SwaggerDoc() map[string]string {
Expand Down
6 changes: 5 additions & 1 deletion core/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion testdata/HEAD/core.v1.PersistentVolume.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@
"status": {
"phase": "phaseValue",
"message": "messageValue",
"reason": "reasonValue"
"reason": "reasonValue",
"lastPhaseTransitionTime": "2004-01-01T01:01:01Z"
}
}
Binary file modified testdata/HEAD/core.v1.PersistentVolume.pb
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/HEAD/core.v1.PersistentVolume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ spec:
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
status:
lastPhaseTransitionTime: "2004-01-01T01:01:01Z"
message: messageValue
phase: phaseValue
reason: reasonValue

0 comments on commit 2859edb

Please sign in to comment.