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

PersistentVolume last phase transition time

Kubernetes-commit: f3a070f9c684d9335b6df91ef2f3ce207629882c
This commit is contained in:
Kubernetes Publisher 2023-07-21 16:10:07 -07:00
commit a98e74a6eb
4 changed files with 20 additions and 7 deletions

View File

@ -20,6 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// PersistentVolumeStatusApplyConfiguration represents an declarative configuration of the PersistentVolumeStatus type for use
@ -28,6 +29,7 @@ type PersistentVolumeStatusApplyConfiguration struct {
Phase *v1.PersistentVolumePhase `json:"phase,omitempty"`
Message *string `json:"message,omitempty"`
Reason *string `json:"reason,omitempty"`
LastPhaseTransitionTime *metav1.Time `json:"lastPhaseTransitionTime,omitempty"`
}
// PersistentVolumeStatusApplyConfiguration constructs an declarative configuration of the PersistentVolumeStatus type for use with
@ -59,3 +61,11 @@ func (b *PersistentVolumeStatusApplyConfiguration) WithReason(value string) *Per
b.Reason = &value
return b
}
// WithLastPhaseTransitionTime sets the LastPhaseTransitionTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastPhaseTransitionTime field is set to the value of the last call.
func (b *PersistentVolumeStatusApplyConfiguration) WithLastPhaseTransitionTime(value metav1.Time) *PersistentVolumeStatusApplyConfiguration {
b.LastPhaseTransitionTime = &value
return b
}

View File

@ -5991,6 +5991,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.core.v1.PersistentVolumeStatus
map:
fields:
- name: lastPhaseTransitionTime
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: message
type:
scalar: string

4
go.mod
View File

@ -23,7 +23,7 @@ require (
golang.org/x/term v0.10.0
golang.org/x/time v0.3.0
google.golang.org/protobuf v1.30.0
k8s.io/api v0.0.0-20230720224857-6ff1b210fae8
k8s.io/api v0.0.0-20230722025726-2859edb2e83e
k8s.io/apimachinery v0.0.0-20230718054246-5cb236977966
k8s.io/klog/v2 v2.100.1
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
@ -60,6 +60,6 @@ require (
)
replace (
k8s.io/api => k8s.io/api v0.0.0-20230720224857-6ff1b210fae8
k8s.io/api => k8s.io/api v0.0.0-20230722025726-2859edb2e83e
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230718054246-5cb236977966
)

4
go.sum
View File

@ -146,8 +146,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.0.0-20230720224857-6ff1b210fae8 h1:ANacNQ2bfky2VhOqsQmeRARhiDCahFJsgRJL85gCx4Y=
k8s.io/api v0.0.0-20230720224857-6ff1b210fae8/go.mod h1:DlNtgYu2BX/uM/IkiPaFRqDBVazxK5ggJs19ERbMLZ4=
k8s.io/api v0.0.0-20230722025726-2859edb2e83e h1:prokDHzsdxh5kAXMvXYUjmsdlmdGXSmy5fatv+avt9U=
k8s.io/api v0.0.0-20230722025726-2859edb2e83e/go.mod h1:DlNtgYu2BX/uM/IkiPaFRqDBVazxK5ggJs19ERbMLZ4=
k8s.io/apimachinery v0.0.0-20230718054246-5cb236977966 h1:IYMQQBHbPi6jyorsuYWXB3+kJFH/MxVyLvKJH4nITrg=
k8s.io/apimachinery v0.0.0-20230718054246-5cb236977966/go.mod h1:xhQIsaL3hXneGluH+0pzF7kr+VYuLS/VcYJxF1xQf+g=
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=