diff --git a/pkg/api/testing/fuzzer.go b/pkg/api/testing/fuzzer.go index 052ce3f4957..5f8dadc5175 100644 --- a/pkg/api/testing/fuzzer.go +++ b/pkg/api/testing/fuzzer.go @@ -339,7 +339,7 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source) }, func(pvc *api.PersistentVolumeClaim, c fuzz.Continue) { c.FuzzNoCustom(pvc) // fuzz self without calling this function again - types := []api.PersistentVolumeClaimPhase{api.ClaimBound, api.ClaimPending} + types := []api.PersistentVolumeClaimPhase{api.ClaimBound, api.ClaimPending, api.ClaimLost} pvc.Status.Phase = types[c.Rand.Intn(len(types))] }, func(s *api.NamespaceSpec, c fuzz.Continue) { diff --git a/pkg/api/types.go b/pkg/api/types.go index 4b6ec153b89..ed568439260 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -411,6 +411,10 @@ const ( ClaimPending PersistentVolumeClaimPhase = "Pending" // used for PersistentVolumeClaims that are bound ClaimBound PersistentVolumeClaimPhase = "Bound" + // used for PersistentVolumeClaims that lost their underlying + // PersistentVolume. The claim was bound to a PersistentVolume and this + // volume does not exist any longer and all data on it was lost. + ClaimLost PersistentVolumeClaimPhase = "Lost" ) // Represents a host path mapped into a pod. diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 00381d20e83..38faa6a9026 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -506,6 +506,10 @@ const ( ClaimPending PersistentVolumeClaimPhase = "Pending" // used for PersistentVolumeClaims that are bound ClaimBound PersistentVolumeClaimPhase = "Bound" + // used for PersistentVolumeClaims that lost their underlying + // PersistentVolume. The claim was bound to a PersistentVolume and this + // volume does not exist any longer and all data on it was lost. + ClaimLost PersistentVolumeClaimPhase = "Lost" ) // Represents a host path mapped into a pod.