Merge pull request #47987 from wongma7/reclaimpolicy

Automatic merge from submit-queue (batch tested with PRs 49869, 47987, 50211, 50804, 50583)

Add ReclaimPolicy field to StorageClass

fix https://github.com/kubernetes/kubernetes/issues/38192, enough people want this imo so going ahead and adding it according to initial suggested design

some considerations:
* No Recycle allowed, Retain (& Delete) only.
* Do we need to gate the field.
* E2E test where a Retain PV is dynamically provisioned is TODO if we agree we want this & this is the way to do it.
* Need a feature repo issue to track docs and stuff for 1.8

**Release note**:

```release-note
StorageClass has a new field to configure reclaim policy of dynamically provisioned PVs.
```
This commit is contained in:
Kubernetes Submit Queue
2017-08-17 01:32:18 -07:00
committed by GitHub
46 changed files with 757 additions and 232 deletions

View File

@@ -716,6 +716,10 @@
"parameters": {
"type": "object",
"description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class."
},
"reclaimPolicy": {
"$ref": "v1.PersistentVolumeReclaimPolicy",
"description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete."
}
}
},
@@ -957,6 +961,10 @@
}
}
},
"v1.PersistentVolumeReclaimPolicy": {
"id": "v1.PersistentVolumeReclaimPolicy",
"properties": {}
},
"v1.WatchEvent": {
"id": "v1.WatchEvent",
"required": [

View File

@@ -716,6 +716,10 @@
"parameters": {
"type": "object",
"description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class."
},
"reclaimPolicy": {
"$ref": "v1.PersistentVolumeReclaimPolicy",
"description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete."
}
}
},
@@ -957,6 +961,10 @@
}
}
},
"v1.PersistentVolumeReclaimPolicy": {
"id": "v1.PersistentVolumeReclaimPolicy",
"properties": {}
},
"v1.WatchEvent": {
"id": "v1.WatchEvent",
"required": [