Skip to content

Commit

Permalink
Merge pull request #31005 from simonswine/feature-flocker-dyn-provisi…
Browse files Browse the repository at this point in the history
…oning

Automatic merge from submit-queue

Dynamic provisioning for flocker volume plugin

Refactor flocker volume plugin
* [x] Support provisioning beta (#29006)
* [x] Support deletion
* [x] Use bind mounts instead of /flocker in containers

* [x] support ownership management or SELinux relabeling.
* [x] adds volume specification via datasetUUID (this is guranted to be unique)

I based my refactor work to replicate pretty much GCE-PD behaviour 

**Related issues**: #29006 #26908

@jsafrane @mattbates @wallrj @wallnerryan
  • Loading branch information
Kubernetes Submit Queue authored Sep 28, 2016
2 parents 9e1960c + cd08978 commit df06488
Show file tree
Hide file tree
Showing 37 changed files with 36,930 additions and 35,924 deletions.
8 changes: 4 additions & 4 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Godeps/LICENSES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions api/swagger-spec/apps_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1813,14 +1813,15 @@
},
"v1.FlockerVolumeSource": {
"id": "v1.FlockerVolumeSource",
"description": "Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.",
"required": [
"datasetName"
],
"description": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.",
"properties": {
"datasetName": {
"type": "string",
"description": "Required: the volume name. This is going to be store on metadata -\u003e name on the payload for Flocker"
"description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated"
},
"datasetUUID": {
"type": "string",
"description": "UUID of the dataset. This is unique identifier of a Flocker dataset"
}
}
},
Expand Down
11 changes: 6 additions & 5 deletions api/swagger-spec/batch_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1818,14 +1818,15 @@
},
"v1.FlockerVolumeSource": {
"id": "v1.FlockerVolumeSource",
"description": "Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.",
"required": [
"datasetName"
],
"description": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.",
"properties": {
"datasetName": {
"type": "string",
"description": "Required: the volume name. This is going to be store on metadata -\u003e name on the payload for Flocker"
"description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated"
},
"datasetUUID": {
"type": "string",
"description": "UUID of the dataset. This is unique identifier of a Flocker dataset"
}
}
},
Expand Down
11 changes: 6 additions & 5 deletions api/swagger-spec/extensions_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -8427,14 +8427,15 @@
},
"v1.FlockerVolumeSource": {
"id": "v1.FlockerVolumeSource",
"description": "Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.",
"required": [
"datasetName"
],
"description": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.",
"properties": {
"datasetName": {
"type": "string",
"description": "Required: the volume name. This is going to be store on metadata -\u003e name on the payload for Flocker"
"description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated"
},
"datasetUUID": {
"type": "string",
"description": "UUID of the dataset. This is unique identifier of a Flocker dataset"
}
}
},
Expand Down
11 changes: 6 additions & 5 deletions api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -17638,14 +17638,15 @@
},
"v1.FlockerVolumeSource": {
"id": "v1.FlockerVolumeSource",
"description": "Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.",
"required": [
"datasetName"
],
"description": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.",
"properties": {
"datasetName": {
"type": "string",
"description": "Required: the volume name. This is going to be store on metadata -\u003e name on the payload for Flocker"
"description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated"
},
"datasetUUID": {
"type": "string",
"description": "UUID of the dataset. This is unique identifier of a Flocker dataset"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions cmd/kube-controller-manager/app/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
"k8s.io/kubernetes/pkg/volume/azure_dd"
"k8s.io/kubernetes/pkg/volume/cinder"
"k8s.io/kubernetes/pkg/volume/flexvolume"
"k8s.io/kubernetes/pkg/volume/flocker"
"k8s.io/kubernetes/pkg/volume/gce_pd"
"k8s.io/kubernetes/pkg/volume/glusterfs"
"k8s.io/kubernetes/pkg/volume/host_path"
Expand Down Expand Up @@ -108,6 +109,8 @@ func ProbeControllerVolumePlugins(cloud cloudprovider.Interface, config componen
allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, quobyte.ProbeVolumePlugins()...)

allPlugins = append(allPlugins, flocker.ProbeVolumePlugins()...)

if cloud != nil {
switch {
case aws.ProviderName == cloud.ProviderName():
Expand Down
15 changes: 11 additions & 4 deletions docs/api-reference/apps/v1alpha1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2353,7 +2353,7 @@ <h3 id="_v1_awselasticblockstorevolumesource">v1.AWSElasticBlockStoreVolumeSourc
<div class="sect2">
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
<div class="paragraph">
<p>Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.</p>
<p>Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand All @@ -2375,8 +2375,15 @@ <h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: the volume name. This is going to be store on metadata &#8594; name on the payload for Flocker</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the dataset stored as metadata &#8594; name on the dataset for Flocker should be considered as deprecated</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetUUID</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">UUID of the dataset. This is unique identifier of a Flocker dataset</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
Expand Down Expand Up @@ -4389,7 +4396,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-09-22 17:28:35 UTC
Last updated 2016-09-24 08:31:55 UTC
</div>
</div>
</body>
Expand Down
15 changes: 11 additions & 4 deletions docs/api-reference/batch/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@ <h3 id="_v1_awselasticblockstorevolumesource">v1.AWSElasticBlockStoreVolumeSourc
<div class="sect2">
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
<div class="paragraph">
<p>Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.</p>
<p>Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand All @@ -2306,8 +2306,15 @@ <h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: the volume name. This is going to be store on metadata &#8594; name on the payload for Flocker</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the dataset stored as metadata &#8594; name on the dataset for Flocker should be considered as deprecated</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetUUID</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">UUID of the dataset. This is unique identifier of a Flocker dataset</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
Expand Down Expand Up @@ -4321,7 +4328,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-09-18 23:34:31 UTC
Last updated 2016-09-24 08:32:06 UTC
</div>
</div>
</body>
Expand Down
15 changes: 11 additions & 4 deletions docs/api-reference/extensions/v1beta1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2142,7 +2142,7 @@ <h3 id="_unversioned_patch">unversioned.Patch</h3>
<div class="sect2">
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
<div class="paragraph">
<p>Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.</p>
<p>Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand All @@ -2164,8 +2164,15 @@ <h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: the volume name. This is going to be store on metadata &#8594; name on the payload for Flocker</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the dataset stored as metadata &#8594; name on the dataset for Flocker should be considered as deprecated</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetUUID</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">UUID of the dataset. This is unique identifier of a Flocker dataset</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
Expand Down Expand Up @@ -6590,7 +6597,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-09-18 23:34:24 UTC
Last updated 2016-09-24 08:32:15 UTC
</div>
</div>
</body>
Expand Down
15 changes: 11 additions & 4 deletions docs/api-reference/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2568,7 +2568,7 @@ <h3 id="_v1_namespace">v1.Namespace</h3>
<div class="sect2">
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
<div class="paragraph">
<p>Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.</p>
<p>Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand All @@ -2590,8 +2590,15 @@ <h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetName</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: the volume name. This is going to be store on metadata &#8594; name on the payload for Flocker</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the dataset stored as metadata &#8594; name on the dataset for Flocker should be considered as deprecated</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetUUID</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">UUID of the dataset. This is unique identifier of a Flocker dataset</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
Expand Down Expand Up @@ -8468,7 +8475,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-09-19 23:42:42 UTC
Last updated 2016-09-24 08:31:51 UTC
</div>
</div>
</body>
Expand Down
Loading

0 comments on commit df06488

Please sign in to comment.