mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Adds datasetUUID for referencing flocker datasets
* flocker datasets should be attached using an unique identifier. This is not the case for the name metadata used by datasetName * allow only one of datasetUUID / datasetName specified
This commit is contained in:
parent
15daecea7f
commit
1c11047ffb
@ -1813,14 +1813,15 @@
|
|||||||
},
|
},
|
||||||
"v1.FlockerVolumeSource": {
|
"v1.FlockerVolumeSource": {
|
||||||
"id": "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.",
|
"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.",
|
||||||
"required": [
|
|
||||||
"datasetName"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"datasetName": {
|
"datasetName": {
|
||||||
"type": "string",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1818,14 +1818,15 @@
|
|||||||
},
|
},
|
||||||
"v1.FlockerVolumeSource": {
|
"v1.FlockerVolumeSource": {
|
||||||
"id": "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.",
|
"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.",
|
||||||
"required": [
|
|
||||||
"datasetName"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"datasetName": {
|
"datasetName": {
|
||||||
"type": "string",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -8427,14 +8427,15 @@
|
|||||||
},
|
},
|
||||||
"v1.FlockerVolumeSource": {
|
"v1.FlockerVolumeSource": {
|
||||||
"id": "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.",
|
"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.",
|
||||||
"required": [
|
|
||||||
"datasetName"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"datasetName": {
|
"datasetName": {
|
||||||
"type": "string",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -17638,14 +17638,15 @@
|
|||||||
},
|
},
|
||||||
"v1.FlockerVolumeSource": {
|
"v1.FlockerVolumeSource": {
|
||||||
"id": "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.",
|
"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.",
|
||||||
"required": [
|
|
||||||
"datasetName"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"datasetName": {
|
"datasetName": {
|
||||||
"type": "string",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2353,7 +2353,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
|
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
|
||||||
<div class="paragraph">
|
<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>
|
</div>
|
||||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@ -2375,8 +2375,15 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetName</p></td>
|
<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 → name on the payload for Flocker</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the dataset stored as metadata → name on the dataset for Flocker should be considered as deprecated</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">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"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -4389,7 +4396,7 @@ The PetSet guarantees that a given network identity will always map to the same
|
|||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="footer-text">
|
<div id="footer-text">
|
||||||
Last updated 2016-09-22 17:28:35 UTC
|
Last updated 2016-09-24 08:31:55 UTC
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -2284,7 +2284,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
|
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
|
||||||
<div class="paragraph">
|
<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>
|
</div>
|
||||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@ -2306,8 +2306,15 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetName</p></td>
|
<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 → name on the payload for Flocker</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the dataset stored as metadata → name on the dataset for Flocker should be considered as deprecated</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">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"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -4321,7 +4328,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="footer-text">
|
<div id="footer-text">
|
||||||
Last updated 2016-09-18 23:34:31 UTC
|
Last updated 2016-09-24 08:32:06 UTC
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -2142,7 +2142,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
|
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
|
||||||
<div class="paragraph">
|
<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>
|
</div>
|
||||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@ -2164,8 +2164,15 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetName</p></td>
|
<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 → name on the payload for Flocker</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the dataset stored as metadata → name on the dataset for Flocker should be considered as deprecated</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">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"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -6590,7 +6597,7 @@ Both these may change in the future. Incoming requests are matched against the h
|
|||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="footer-text">
|
<div id="footer-text">
|
||||||
Last updated 2016-09-18 23:34:24 UTC
|
Last updated 2016-09-24 08:32:15 UTC
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -2568,7 +2568,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
|
<h3 id="_v1_flockervolumesource">v1.FlockerVolumeSource</h3>
|
||||||
<div class="paragraph">
|
<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>
|
</div>
|
||||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@ -2590,8 +2590,15 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">datasetName</p></td>
|
<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 → name on the payload for Flocker</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the dataset stored as metadata → name on the dataset for Flocker should be considered as deprecated</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">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"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -8468,7 +8475,7 @@ The resulting set of endpoints can be viewed as:<br>
|
|||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="footer-text">
|
<div id="footer-text">
|
||||||
Last updated 2016-09-19 23:42:42 UTC
|
Last updated 2016-09-24 08:31:51 UTC
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -741,10 +741,14 @@ type CephFSVolumeSource struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Represents a Flocker volume mounted by the Flocker agent.
|
// 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.
|
// Flocker volumes do not support ownership management or SELinux relabeling.
|
||||||
type FlockerVolumeSource struct {
|
type FlockerVolumeSource struct {
|
||||||
// Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
|
// Name of the dataset stored as metadata -> name on the dataset for Flocker
|
||||||
DatasetName string `json:"datasetName"`
|
// should be considered as deprecated
|
||||||
|
DatasetName string `json:"datasetName,omitempty"`
|
||||||
|
// UUID of the dataset. This is unique identifier of a Flocker dataset
|
||||||
|
DatasetUUID string `json:"datasetUUID,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents a volume containing downward API info.
|
// Represents a volume containing downward API info.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -840,10 +840,15 @@ message FlexVolumeSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Represents a Flocker volume mounted by the Flocker agent.
|
// 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.
|
// Flocker volumes do not support ownership management or SELinux relabeling.
|
||||||
message FlockerVolumeSource {
|
message FlockerVolumeSource {
|
||||||
// Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
|
// Name of the dataset stored as metadata -> name on the dataset for Flocker
|
||||||
|
// should be considered as deprecated
|
||||||
optional string datasetName = 1;
|
optional string datasetName = 1;
|
||||||
|
|
||||||
|
// UUID of the dataset. This is unique identifier of a Flocker dataset
|
||||||
|
optional string datasetUUID = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents a Persistent Disk resource in Google Compute Engine.
|
// Represents a Persistent Disk resource in Google Compute Engine.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -648,10 +648,14 @@ type CephFSVolumeSource struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Represents a Flocker volume mounted by the Flocker agent.
|
// 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.
|
// Flocker volumes do not support ownership management or SELinux relabeling.
|
||||||
type FlockerVolumeSource struct {
|
type FlockerVolumeSource struct {
|
||||||
// Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
|
// Name of the dataset stored as metadata -> name on the dataset for Flocker
|
||||||
DatasetName string `json:"datasetName" protobuf:"bytes,1,opt,name=datasetName"`
|
// should be considered as deprecated
|
||||||
|
DatasetName string `json:"datasetName,omitempty" protobuf:"bytes,1,opt,name=datasetName"`
|
||||||
|
// UUID of the dataset. This is unique identifier of a Flocker dataset
|
||||||
|
DatasetUUID string `json:"datasetUUID,omitempty" protobuf:"bytes,2,opt,name=datasetUUID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StorageMedium defines ways that storage can be allocated to a volume.
|
// StorageMedium defines ways that storage can be allocated to a volume.
|
||||||
|
@ -529,8 +529,9 @@ func (FlexVolumeSource) SwaggerDoc() map[string]string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var map_FlockerVolumeSource = map[string]string{
|
var map_FlockerVolumeSource = map[string]string{
|
||||||
"": "Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.",
|
"": "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.",
|
||||||
"datasetName": "Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker",
|
"datasetName": "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated",
|
||||||
|
"datasetUUID": "UUID of the dataset. This is unique identifier of a Flocker dataset",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (FlockerVolumeSource) SwaggerDoc() map[string]string {
|
func (FlockerVolumeSource) SwaggerDoc() map[string]string {
|
||||||
|
@ -2196,6 +2196,7 @@ func Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource(in *api.FlexVolumeSourc
|
|||||||
|
|
||||||
func autoConvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error {
|
func autoConvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error {
|
||||||
out.DatasetName = in.DatasetName
|
out.DatasetName = in.DatasetName
|
||||||
|
out.DatasetUUID = in.DatasetUUID
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2205,6 +2206,7 @@ func Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolume
|
|||||||
|
|
||||||
func autoConvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error {
|
func autoConvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error {
|
||||||
out.DatasetName = in.DatasetName
|
out.DatasetName = in.DatasetName
|
||||||
|
out.DatasetUUID = in.DatasetUUID
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1150,6 +1150,7 @@ func DeepCopy_v1_FlockerVolumeSource(in interface{}, out interface{}, c *convers
|
|||||||
in := in.(*FlockerVolumeSource)
|
in := in.(*FlockerVolumeSource)
|
||||||
out := out.(*FlockerVolumeSource)
|
out := out.(*FlockerVolumeSource)
|
||||||
out.DatasetName = in.DatasetName
|
out.DatasetName = in.DatasetName
|
||||||
|
out.DatasetUUID = in.DatasetUUID
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -855,8 +855,12 @@ func validateGlusterfs(glusterfs *api.GlusterfsVolumeSource, fldPath *field.Path
|
|||||||
|
|
||||||
func validateFlockerVolumeSource(flocker *api.FlockerVolumeSource, fldPath *field.Path) field.ErrorList {
|
func validateFlockerVolumeSource(flocker *api.FlockerVolumeSource, fldPath *field.Path) field.ErrorList {
|
||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
if len(flocker.DatasetName) == 0 {
|
if len(flocker.DatasetName) == 0 && len(flocker.DatasetUUID) == 0 {
|
||||||
allErrs = append(allErrs, field.Required(fldPath.Child("datasetName"), ""))
|
//TODO: consider adding a RequiredOneOf() error for this and similar cases
|
||||||
|
allErrs = append(allErrs, field.Required(fldPath, "one of datasetName and datasetUUID is required"))
|
||||||
|
}
|
||||||
|
if len(flocker.DatasetName) != 0 && len(flocker.DatasetUUID) != 0 {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath, "resource", "datasetName and datasetUUID can not be specified simultaneously"))
|
||||||
}
|
}
|
||||||
if strings.Contains(flocker.DatasetName, "/") {
|
if strings.Contains(flocker.DatasetName, "/") {
|
||||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("datasetName"), flocker.DatasetName, "must not contain '/'"))
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("datasetName"), flocker.DatasetName, "must not contain '/'"))
|
||||||
|
@ -1520,7 +1520,18 @@ func TestValidateVolumes(t *testing.T) {
|
|||||||
},
|
},
|
||||||
// Flocker
|
// Flocker
|
||||||
{
|
{
|
||||||
name: "valid Flocker",
|
name: "valid Flocker -- datasetUUID",
|
||||||
|
vol: api.Volume{
|
||||||
|
Name: "flocker",
|
||||||
|
VolumeSource: api.VolumeSource{
|
||||||
|
Flocker: &api.FlockerVolumeSource{
|
||||||
|
DatasetUUID: "d846b09d-223d-43df-ab5b-d6db2206a0e4",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "valid Flocker -- datasetName",
|
||||||
vol: api.Volume{
|
vol: api.Volume{
|
||||||
Name: "flocker",
|
Name: "flocker",
|
||||||
VolumeSource: api.VolumeSource{
|
VolumeSource: api.VolumeSource{
|
||||||
@ -1531,7 +1542,7 @@ func TestValidateVolumes(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "empty flocker datasetName",
|
name: "both empty",
|
||||||
vol: api.Volume{
|
vol: api.Volume{
|
||||||
Name: "flocker",
|
Name: "flocker",
|
||||||
VolumeSource: api.VolumeSource{
|
VolumeSource: api.VolumeSource{
|
||||||
@ -1541,7 +1552,21 @@ func TestValidateVolumes(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
errtype: field.ErrorTypeRequired,
|
errtype: field.ErrorTypeRequired,
|
||||||
errfield: "flocker.datasetName",
|
errfield: "flocker",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "both specified",
|
||||||
|
vol: api.Volume{
|
||||||
|
Name: "flocker",
|
||||||
|
VolumeSource: api.VolumeSource{
|
||||||
|
Flocker: &api.FlockerVolumeSource{
|
||||||
|
DatasetName: "datasetName",
|
||||||
|
DatasetUUID: "d846b09d-223d-43df-ab5b-d6db2206a0e4",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
errtype: field.ErrorTypeInvalid,
|
||||||
|
errfield: "flocker",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "slash in flocker datasetName",
|
name: "slash in flocker datasetName",
|
||||||
|
@ -1178,6 +1178,7 @@ func DeepCopy_api_FlockerVolumeSource(in interface{}, out interface{}, c *conver
|
|||||||
in := in.(*FlockerVolumeSource)
|
in := in.(*FlockerVolumeSource)
|
||||||
out := out.(*FlockerVolumeSource)
|
out := out.(*FlockerVolumeSource)
|
||||||
out.DatasetName = in.DatasetName
|
out.DatasetName = in.DatasetName
|
||||||
|
out.DatasetUUID = in.DatasetUUID
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7896,17 +7896,23 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
|
|||||||
"v1.FlockerVolumeSource": {
|
"v1.FlockerVolumeSource": {
|
||||||
Schema: spec.Schema{
|
Schema: spec.Schema{
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Represents a Flocker volume mounted by the Flocker agent. Flocker volumes do not support ownership management or SELinux relabeling.",
|
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: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"datasetName": {
|
"datasetName": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker",
|
Description: "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated",
|
||||||
|
Type: []string{"string"},
|
||||||
|
Format: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"datasetUUID": {
|
||||||
|
SchemaProps: spec.SchemaProps{
|
||||||
|
Description: "UUID of the dataset. This is unique identifier of a Flocker dataset",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Required: []string{"datasetName"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Dependencies: []string{},
|
Dependencies: []string{},
|
||||||
|
Loading…
Reference in New Issue
Block a user