Add ClaimLost phase.

This commit is contained in:
Jan Safranek 2016-05-17 14:55:10 +02:00
parent 5949b956f5
commit 0be1512f1c
3 changed files with 9 additions and 1 deletions

View File

@ -339,7 +339,7 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source)
}, },
func(pvc *api.PersistentVolumeClaim, c fuzz.Continue) { func(pvc *api.PersistentVolumeClaim, c fuzz.Continue) {
c.FuzzNoCustom(pvc) // fuzz self without calling this function again 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))] pvc.Status.Phase = types[c.Rand.Intn(len(types))]
}, },
func(s *api.NamespaceSpec, c fuzz.Continue) { func(s *api.NamespaceSpec, c fuzz.Continue) {

View File

@ -411,6 +411,10 @@ const (
ClaimPending PersistentVolumeClaimPhase = "Pending" ClaimPending PersistentVolumeClaimPhase = "Pending"
// used for PersistentVolumeClaims that are bound // used for PersistentVolumeClaims that are bound
ClaimBound PersistentVolumeClaimPhase = "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. // Represents a host path mapped into a pod.

View File

@ -506,6 +506,10 @@ const (
ClaimPending PersistentVolumeClaimPhase = "Pending" ClaimPending PersistentVolumeClaimPhase = "Pending"
// used for PersistentVolumeClaims that are bound // used for PersistentVolumeClaims that are bound
ClaimBound PersistentVolumeClaimPhase = "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. // Represents a host path mapped into a pod.