Files
kubernetes/pkg/api
Kubernetes Submit Queue 4dc5d44879 Merge pull request #30304 from screeley44/k8-validate-pv
Automatic merge from submit-queue

add validation for PV spec to ensure correct values are used for ReclaimPolicy on initial create

k8 currently allows invalid values for ReclaimPolicy (i.e. "scotto") - this allows the PV to be created and even bound, however, when the pvc or pod is deleted and the recycler is triggered, an error is thrown

```
Events:
  FirstSeen	LastSeen	Count	From				SubobjectPath	Type		Reason				Message
  ---------	--------	-----	----				-------------	--------	------				-------
  36s		36s		1	{persistentvolume-controller }			Warning		VolumeUnknownReclaimPolicy	Volume has unrecognized PersistentVolumeReclaimPolicy
```

New behavior will not allow the user to create the PV:

```
[root@k8dev nfs]# kubectl create -f nfs-pv-bad.yaml 
The PersistentVolume "pv-gce" is invalid: spec.persistentVolumeReclaimPolicy: Unsupported value: "scotto": supported values: Delete, Recycle, Retain
```
2016-08-26 16:24:25 -07:00
..
2016-07-16 13:48:21 -04:00
2016-08-19 14:19:19 -07:00
2016-08-22 21:09:57 -07:00
2016-08-23 13:23:07 +00:00
2016-08-23 13:23:07 +00:00
2016-07-16 13:48:21 -04:00
2016-07-30 00:07:02 -04:00
2016-08-22 21:09:57 -07:00
2016-03-02 20:46:32 -05:00
2016-07-12 21:52:00 -07:00
2016-08-25 13:22:01 +02:00