Merge pull request #19716 from pmorie/config-api-move

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-01-28 14:39:25 -08:00
commit 76f8a800ed
49 changed files with 23809 additions and 23797 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -390,12 +390,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<li> <li>
<p><a href="#_v1beta1_ingresslist">v1beta1.IngressList</a></p> <p><a href="#_v1beta1_ingresslist">v1beta1.IngressList</a></p>
</li> </li>
<li>
<p><a href="#_v1beta1_configmap">v1beta1.ConfigMap</a></p>
</li>
<li>
<p><a href="#_v1beta1_configmaplist">v1beta1.ConfigMapList</a></p>
</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -1614,37 +1608,6 @@ Both these may change in the future. Incoming requests are matched against the h
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1beta1_cputargetutilization">v1beta1.CPUTargetUtilization</h3>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">targetPercentage</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use.</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">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_loadbalancerstatus">v1.LoadBalancerStatus</h3> <h3 id="_v1_loadbalancerstatus">v1.LoadBalancerStatus</h3>
@ -1679,6 +1642,37 @@ Both these may change in the future. Incoming requests are matched against the h
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1beta1_cputargetutilization">v1beta1.CPUTargetUtilization</h3>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">targetPercentage</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use.</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">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_container">v1.Container</h3> <h3 id="_v1_container">v1.Container</h3>
@ -1930,61 +1924,6 @@ Both these may change in the future. Incoming requests are matched against the h
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1beta1_configmap">v1beta1.ConfigMap</h3>
<div class="paragraph">
<p>ConfigMap holds configuration data for pods to consume.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">kind</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</a></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">apiVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</a></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">metadata</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Standard object metadata; More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</a>.</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"><a href="#_v1_objectmeta">v1.ObjectMeta</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">data</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.</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"><a href="#_any">any</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_objectmeta">v1.ObjectMeta</h3> <h3 id="_v1_objectmeta">v1.ObjectMeta</h3>
@ -2531,40 +2470,6 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
</tbody> </tbody>
</table> </table>
</div>
<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>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<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">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_awselasticblockstorevolumesource">v1.AWSElasticBlockStoreVolumeSource</h3> <h3 id="_v1_awselasticblockstorevolumesource">v1.AWSElasticBlockStoreVolumeSource</h3>
@ -2664,6 +2569,81 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
</tbody> </tbody>
</table> </table>
</div>
<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>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<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">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_unversioned_listmeta">unversioned.ListMeta</h3>
<div class="paragraph">
<p>ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">selfLink</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">SelfLink is a URL representing this object. Populated by the system. Read-only.</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">resourceVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String that identifies the server&#8217;s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency</a></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>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1beta1_horizontalpodautoscalerspec">v1beta1.HorizontalPodAutoscalerSpec</h3> <h3 id="_v1beta1_horizontalpodautoscalerspec">v1beta1.HorizontalPodAutoscalerSpec</h3>
@ -2719,102 +2699,6 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1beta1_configmaplist">v1beta1.ConfigMapList</h3>
<div class="paragraph">
<p>ConfigMapList is a resource containing a list of ConfigMap objects.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">kind</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</a></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">apiVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</a></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">metadata</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</a></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"><a href="#_unversioned_listmeta">unversioned.ListMeta</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">items</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Items is the list of ConfigMaps.</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"><a href="#_v1beta1_configmap">v1beta1.ConfigMap</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_unversioned_listmeta">unversioned.ListMeta</h3>
<div class="paragraph">
<p>ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">selfLink</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">SelfLink is a URL representing this object. Populated by the system. Read-only.</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">resourceVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String that identifies the server&#8217;s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency</a></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>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1beta1_labelselectorrequirement">v1beta1.LabelSelectorRequirement</h3> <h3 id="_v1beta1_labelselectorrequirement">v1beta1.LabelSelectorRequirement</h3>
@ -4573,8 +4457,8 @@ 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-01-19 18:09:13 UTC Last updated 2016-01-28 22:16:41 UTC
</div> </div>
</div> </div>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@ -1184,6 +1184,61 @@ Examples:<br>
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_configmaplist">v1.ConfigMapList</h3>
<div class="paragraph">
<p>ConfigMapList is a resource containing a list of ConfigMap objects.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">kind</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</a></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">apiVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</a></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">metadata</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</a></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"><a href="#_unversioned_listmeta">unversioned.ListMeta</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">items</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Items is the list of ConfigMaps.</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"><a href="#_v1_configmap">v1.ConfigMap</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_persistentvolumestatus">v1.PersistentVolumeStatus</h3> <h3 id="_v1_persistentvolumestatus">v1.PersistentVolumeStatus</h3>
@ -1335,6 +1390,61 @@ Examples:<br>
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_configmap">v1.ConfigMap</h3>
<div class="paragraph">
<p>ConfigMap holds configuration data for pods to consume.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">kind</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</a></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">apiVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</a></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">metadata</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Standard object&#8217;s metadata. More info: <a href="http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata">http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</a></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"><a href="#_v1_objectmeta">v1.ObjectMeta</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">data</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.</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"><a href="#_any">any</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_capabilities">v1.Capabilities</h3> <h3 id="_v1_capabilities">v1.Capabilities</h3>
@ -7145,7 +7255,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-01-22 02:17:17 UTC Last updated 2016-01-28 22:16:30 UTC
</div> </div>
</div> </div>
</body> </body>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: test-configmap name: test-configmap

View File

@ -39,7 +39,9 @@ func init() {
deepCopy_api_ComponentCondition, deepCopy_api_ComponentCondition,
deepCopy_api_ComponentStatus, deepCopy_api_ComponentStatus,
deepCopy_api_ComponentStatusList, deepCopy_api_ComponentStatusList,
deepCopy_api_ConfigMap,
deepCopy_api_ConfigMapKeySelector, deepCopy_api_ConfigMapKeySelector,
deepCopy_api_ConfigMapList,
deepCopy_api_Container, deepCopy_api_Container,
deepCopy_api_ContainerImage, deepCopy_api_ContainerImage,
deepCopy_api_ContainerPort, deepCopy_api_ContainerPort,
@ -297,6 +299,25 @@ func deepCopy_api_ComponentStatusList(in ComponentStatusList, out *ComponentStat
return nil return nil
} }
func deepCopy_api_ConfigMap(in ConfigMap, out *ConfigMap, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if in.Data != nil {
in, out := in.Data, &out.Data
*out = make(map[string]string)
for key, val := range in {
(*out)[key] = val
}
} else {
out.Data = nil
}
return nil
}
func deepCopy_api_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error { func deepCopy_api_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error {
if err := deepCopy_api_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil { if err := deepCopy_api_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil {
return err return err
@ -305,6 +326,27 @@ func deepCopy_api_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKe
return nil return nil
} }
func deepCopy_api_ConfigMapList(in ConfigMapList, out *ConfigMapList, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
return err
}
if in.Items != nil {
in, out := in.Items, &out.Items
*out = make([]ConfigMap, len(in))
for i := range in {
if err := deepCopy_api_ConfigMap(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) error { func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) error {
out.Name = in.Name out.Name = in.Name
out.Image = in.Image out.Image = in.Image

View File

@ -98,6 +98,8 @@ func AddToScheme(scheme *runtime.Scheme) {
&ComponentStatusList{}, &ComponentStatusList{},
&SerializedReference{}, &SerializedReference{},
&RangeAllocation{}, &RangeAllocation{},
&ConfigMap{},
&ConfigMapList{},
) )
// Register Unversioned types under their own special group // Register Unversioned types under their own special group
@ -172,3 +174,6 @@ func (obj *RangeAllocation) GetObjectMeta() meta.Object { r
func (obj *RangeAllocation) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *RangeAllocation) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ObjectReference) GetObjectKind() unversioned.ObjectKind { return obj } func (obj *ObjectReference) GetObjectKind() unversioned.ObjectKind { return obj }
func (obj *ExportOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ExportOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ConfigMap) GetObjectMeta() meta.Object { return &obj.ObjectMeta }
func (obj *ConfigMap) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ConfigMapList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }

File diff suppressed because it is too large Load Diff

View File

@ -2150,6 +2150,25 @@ type SecretList struct {
Items []Secret `json:"items"` Items []Secret `json:"items"`
} }
// ConfigMap holds configuration data for components or applications to consume.
type ConfigMap struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.
Data map[string]string `json:"data,omitempty"`
}
// ConfigMapList is a resource containing a list of ConfigMap objects.
type ConfigMapList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is the list of ConfigMaps.
Items []ConfigMap `json:"items,omitempty"`
}
// These constants are for remote command execution and port forwarding and are // These constants are for remote command execution and port forwarding and are
// used by both the client side and server side components. // used by both the client side and server side components.
// //

View File

@ -59,6 +59,7 @@ func addConversionFuncs(scheme *runtime.Scheme) {
"PersistentVolumeClaim", "PersistentVolumeClaim",
"Service", "Service",
"ServiceAccount", "ServiceAccount",
"ConfigMap",
} { } {
err = api.Scheme.AddFieldLabelConversionFunc("v1", kind, err = api.Scheme.AddFieldLabelConversionFunc("v1", kind,
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {

View File

@ -195,6 +195,28 @@ func Convert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.Component
return autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList(in, out, s) return autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList(in, out, s)
} }
func autoConvert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*api.ConfigMap))(in)
}
if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if in.Data != nil {
out.Data = make(map[string]string)
for key, val := range in.Data {
out.Data[key] = val
}
} else {
out.Data = nil
}
return nil
}
func Convert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error {
return autoConvert_api_ConfigMap_To_v1_ConfigMap(in, out, s)
}
func autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.ConfigMapKeySelector, out *ConfigMapKeySelector, s conversion.Scope) error { func autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.ConfigMapKeySelector, out *ConfigMapKeySelector, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*api.ConfigMapKeySelector))(in) defaulting.(func(*api.ConfigMapKeySelector))(in)
@ -210,6 +232,30 @@ func Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.ConfigM
return autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in, out, s) return autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in, out, s)
} }
func autoConvert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *ConfigMapList, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*api.ConfigMapList))(in)
}
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
return err
}
if in.Items != nil {
out.Items = make([]ConfigMap, len(in.Items))
for i := range in.Items {
if err := Convert_api_ConfigMap_To_v1_ConfigMap(&in.Items[i], &out.Items[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func Convert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *ConfigMapList, s conversion.Scope) error {
return autoConvert_api_ConfigMapList_To_v1_ConfigMapList(in, out, s)
}
func autoConvert_api_Container_To_v1_Container(in *api.Container, out *Container, s conversion.Scope) error { func autoConvert_api_Container_To_v1_Container(in *api.Container, out *Container, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*api.Container))(in) defaulting.(func(*api.Container))(in)
@ -3313,6 +3359,28 @@ func Convert_v1_ComponentStatusList_To_api_ComponentStatusList(in *ComponentStat
return autoConvert_v1_ComponentStatusList_To_api_ComponentStatusList(in, out, s) return autoConvert_v1_ComponentStatusList_To_api_ComponentStatusList(in, out, s)
} }
func autoConvert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ConfigMap))(in)
}
if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if in.Data != nil {
out.Data = make(map[string]string)
for key, val := range in.Data {
out.Data[key] = val
}
} else {
out.Data = nil
}
return nil
}
func Convert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error {
return autoConvert_v1_ConfigMap_To_api_ConfigMap(in, out, s)
}
func autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigMapKeySelector, out *api.ConfigMapKeySelector, s conversion.Scope) error { func autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigMapKeySelector, out *api.ConfigMapKeySelector, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ConfigMapKeySelector))(in) defaulting.(func(*ConfigMapKeySelector))(in)
@ -3328,6 +3396,30 @@ func Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigMapKe
return autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in, out, s) return autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in, out, s)
} }
func autoConvert_v1_ConfigMapList_To_api_ConfigMapList(in *ConfigMapList, out *api.ConfigMapList, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ConfigMapList))(in)
}
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
return err
}
if in.Items != nil {
out.Items = make([]api.ConfigMap, len(in.Items))
for i := range in.Items {
if err := Convert_v1_ConfigMap_To_api_ConfigMap(&in.Items[i], &out.Items[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func Convert_v1_ConfigMapList_To_api_ConfigMapList(in *ConfigMapList, out *api.ConfigMapList, s conversion.Scope) error {
return autoConvert_v1_ConfigMapList_To_api_ConfigMapList(in, out, s)
}
func autoConvert_v1_Container_To_api_Container(in *Container, out *api.Container, s conversion.Scope) error { func autoConvert_v1_Container_To_api_Container(in *Container, out *api.Container, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*Container))(in) defaulting.(func(*Container))(in)
@ -6152,6 +6244,8 @@ func init() {
autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList, autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList,
autoConvert_api_ComponentStatus_To_v1_ComponentStatus, autoConvert_api_ComponentStatus_To_v1_ComponentStatus,
autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector, autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector,
autoConvert_api_ConfigMapList_To_v1_ConfigMapList,
autoConvert_api_ConfigMap_To_v1_ConfigMap,
autoConvert_api_ContainerImage_To_v1_ContainerImage, autoConvert_api_ContainerImage_To_v1_ContainerImage,
autoConvert_api_ContainerPort_To_v1_ContainerPort, autoConvert_api_ContainerPort_To_v1_ContainerPort,
autoConvert_api_ContainerStateRunning_To_v1_ContainerStateRunning, autoConvert_api_ContainerStateRunning_To_v1_ContainerStateRunning,
@ -6275,6 +6369,8 @@ func init() {
autoConvert_v1_ComponentStatusList_To_api_ComponentStatusList, autoConvert_v1_ComponentStatusList_To_api_ComponentStatusList,
autoConvert_v1_ComponentStatus_To_api_ComponentStatus, autoConvert_v1_ComponentStatus_To_api_ComponentStatus,
autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector, autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector,
autoConvert_v1_ConfigMapList_To_api_ConfigMapList,
autoConvert_v1_ConfigMap_To_api_ConfigMap,
autoConvert_v1_ContainerImage_To_api_ContainerImage, autoConvert_v1_ContainerImage_To_api_ContainerImage,
autoConvert_v1_ContainerPort_To_api_ContainerPort, autoConvert_v1_ContainerPort_To_api_ContainerPort,
autoConvert_v1_ContainerStateRunning_To_api_ContainerStateRunning, autoConvert_v1_ContainerStateRunning_To_api_ContainerStateRunning,

View File

@ -184,6 +184,24 @@ func deepCopy_v1_ComponentStatusList(in ComponentStatusList, out *ComponentStatu
return nil return nil
} }
func deepCopy_v1_ConfigMap(in ConfigMap, out *ConfigMap, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if in.Data != nil {
out.Data = make(map[string]string)
for key, val := range in.Data {
out.Data[key] = val
}
} else {
out.Data = nil
}
return nil
}
func deepCopy_v1_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error { func deepCopy_v1_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error {
if err := deepCopy_v1_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil { if err := deepCopy_v1_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil {
return err return err
@ -192,6 +210,26 @@ func deepCopy_v1_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKey
return nil return nil
} }
func deepCopy_v1_ConfigMapList(in ConfigMapList, out *ConfigMapList, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
return err
}
if in.Items != nil {
out.Items = make([]ConfigMap, len(in.Items))
for i := range in.Items {
if err := deepCopy_v1_ConfigMap(in.Items[i], &out.Items[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func deepCopy_v1_Container(in Container, out *Container, c *conversion.Cloner) error { func deepCopy_v1_Container(in Container, out *Container, c *conversion.Cloner) error {
out.Name = in.Name out.Name = in.Name
out.Image = in.Image out.Image = in.Image
@ -2502,7 +2540,9 @@ func init() {
deepCopy_v1_ComponentCondition, deepCopy_v1_ComponentCondition,
deepCopy_v1_ComponentStatus, deepCopy_v1_ComponentStatus,
deepCopy_v1_ComponentStatusList, deepCopy_v1_ComponentStatusList,
deepCopy_v1_ConfigMap,
deepCopy_v1_ConfigMapKeySelector, deepCopy_v1_ConfigMapKeySelector,
deepCopy_v1_ConfigMapList,
deepCopy_v1_Container, deepCopy_v1_Container,
deepCopy_v1_ContainerImage, deepCopy_v1_ContainerImage,
deepCopy_v1_ContainerPort, deepCopy_v1_ContainerPort,

View File

@ -243,6 +243,11 @@ func addDefaultingFuncs(scheme *runtime.Scheme) {
} }
} }
}, },
func(obj *ConfigMap) {
if obj.Data == nil {
obj.Data = make(map[string]string)
}
},
) )
} }

View File

@ -79,6 +79,8 @@ func addKnownTypes(scheme *runtime.Scheme) {
&ComponentStatusList{}, &ComponentStatusList{},
&SerializedReference{}, &SerializedReference{},
&RangeAllocation{}, &RangeAllocation{},
&ConfigMap{},
&ConfigMapList{},
) )
// Add common types // Add common types
@ -127,3 +129,5 @@ func (obj *ComponentStatusList) GetObjectKind() unversioned.ObjectKind { r
func (obj *SerializedReference) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *SerializedReference) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *RangeAllocation) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *RangeAllocation) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ExportOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ExportOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ConfigMap) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ConfigMapList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }

File diff suppressed because it is too large Load Diff

View File

@ -2566,6 +2566,29 @@ type SecretList struct {
Items []Secret `json:"items"` Items []Secret `json:"items"`
} }
// ConfigMap holds configuration data for pods to consume.
type ConfigMap struct {
unversioned.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
ObjectMeta `json:"metadata,omitempty"`
// Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.
Data map[string]string `json:"data,omitempty"`
}
// ConfigMapList is a resource containing a list of ConfigMap objects.
type ConfigMapList struct {
unversioned.TypeMeta `json:",inline"`
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is the list of ConfigMaps.
Items []ConfigMap `json:"items,omitempty"`
}
// Type and constants for component health validation. // Type and constants for component health validation.
type ComponentConditionType string type ComponentConditionType string

View File

@ -115,6 +115,16 @@ func (ComponentStatusList) SwaggerDoc() map[string]string {
return map_ComponentStatusList return map_ComponentStatusList
} }
var map_ConfigMap = map[string]string{
"": "ConfigMap holds configuration data for pods to consume.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"data": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.",
}
func (ConfigMap) SwaggerDoc() map[string]string {
return map_ConfigMap
}
var map_ConfigMapKeySelector = map[string]string{ var map_ConfigMapKeySelector = map[string]string{
"": "Selects a key from a ConfigMap.", "": "Selects a key from a ConfigMap.",
"key": "The key to select.", "key": "The key to select.",
@ -124,6 +134,16 @@ func (ConfigMapKeySelector) SwaggerDoc() map[string]string {
return map_ConfigMapKeySelector return map_ConfigMapKeySelector
} }
var map_ConfigMapList = map[string]string{
"": "ConfigMapList is a resource containing a list of ConfigMap objects.",
"metadata": "More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"items": "Items is the list of ConfigMaps.",
}
func (ConfigMapList) SwaggerDoc() map[string]string {
return map_ConfigMapList
}
var map_Container = map[string]string{ var map_Container = map[string]string{
"": "A single application container that you want to run within a pod.", "": "A single application container that you want to run within a pod.",
"name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", "name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.",

View File

@ -1987,6 +1987,36 @@ func ValidateSecretUpdate(newSecret, oldSecret *api.Secret) field.ErrorList {
return allErrs return allErrs
} }
// ValidateConfigMapName can be used to check whether the given ConfigMap name is valid.
// Prefix indicates this name will be used as part of generation, in which case
// trailing dashes are allowed.
func ValidateConfigMapName(name string, prefix bool) (bool, string) {
return NameIsDNSSubdomain(name, prefix)
}
// ValidateConfigMap tests whether required fields in the ConfigMap are set.
func ValidateConfigMap(cfg *api.ConfigMap) field.ErrorList {
allErrs := field.ErrorList{}
allErrs = append(allErrs, ValidateObjectMeta(&cfg.ObjectMeta, true, ValidateConfigMapName, field.NewPath("metadata"))...)
for key := range cfg.Data {
if !IsSecretKey(key) {
allErrs = append(allErrs, field.Invalid(field.NewPath("data").Key(key), key, fmt.Sprintf("must have at most %d characters and match regex %s", validation.DNS1123SubdomainMaxLength, SecretKeyFmt)))
}
}
return allErrs
}
// ValidateConfigMapUpdate tests if required fields in the ConfigMap are set.
func ValidateConfigMapUpdate(newCfg, oldCfg *api.ConfigMap) field.ErrorList {
allErrs := field.ErrorList{}
allErrs = append(allErrs, ValidateObjectMetaUpdate(&newCfg.ObjectMeta, &oldCfg.ObjectMeta, field.NewPath("metadata"))...)
allErrs = append(allErrs, ValidateConfigMap(newCfg)...)
return allErrs
}
func validateBasicResource(quantity resource.Quantity, fldPath *field.Path) field.ErrorList { func validateBasicResource(quantity resource.Quantity, fldPath *field.Path) field.ErrorList {
if quantity.Value() < 0 { if quantity.Value() < 0 {
return field.ErrorList{field.Invalid(fldPath, quantity.Value(), "must be a valid resource quantity")} return field.ErrorList{field.Invalid(fldPath, quantity.Value(), "must be a valid resource quantity")}

View File

@ -4455,3 +4455,105 @@ func TestValidPodLogOptions(t *testing.T) {
} }
} }
} }
func TestValidateConfigMap(t *testing.T) {
newConfigMap := func(name, namespace string, data map[string]string) api.ConfigMap {
return api.ConfigMap{
ObjectMeta: api.ObjectMeta{
Name: name,
Namespace: namespace,
},
Data: data,
}
}
var (
validConfigMap = newConfigMap("validname", "validns", map[string]string{"key": "value"})
maxKeyLength = newConfigMap("validname", "validns", map[string]string{strings.Repeat("a", 253): "value"})
emptyName = newConfigMap("", "validns", nil)
invalidName = newConfigMap("NoUppercaseOrSpecialCharsLike=Equals", "validns", nil)
emptyNs = newConfigMap("validname", "", nil)
invalidNs = newConfigMap("validname", "NoUppercaseOrSpecialCharsLike=Equals", nil)
invalidKey = newConfigMap("validname", "validns", map[string]string{"a..b": "value"})
leadingDotKey = newConfigMap("validname", "validns", map[string]string{".ab": "value"})
dotKey = newConfigMap("validname", "validns", map[string]string{".": "value"})
doubleDotKey = newConfigMap("validname", "validns", map[string]string{"..": "value"})
overMaxKeyLength = newConfigMap("validname", "validns", map[string]string{strings.Repeat("a", 254): "value"})
)
tests := map[string]struct {
cfg api.ConfigMap
isValid bool
}{
"valid": {validConfigMap, true},
"max key length": {maxKeyLength, true},
"leading dot key": {leadingDotKey, true},
"empty name": {emptyName, false},
"invalid name": {invalidName, false},
"invalid key": {invalidKey, false},
"empty namespace": {emptyNs, false},
"invalid namespace": {invalidNs, false},
"dot key": {dotKey, false},
"double dot key": {doubleDotKey, false},
"over max key length": {overMaxKeyLength, false},
}
for name, tc := range tests {
errs := ValidateConfigMap(&tc.cfg)
if tc.isValid && len(errs) > 0 {
t.Errorf("%v: unexpected error: %v", name, errs)
}
if !tc.isValid && len(errs) == 0 {
t.Errorf("%v: unexpected non-error", name)
}
}
}
func TestValidateConfigMapUpdate(t *testing.T) {
newConfigMap := func(version, name, namespace string, data map[string]string) api.ConfigMap {
return api.ConfigMap{
ObjectMeta: api.ObjectMeta{
Name: name,
Namespace: namespace,
ResourceVersion: version,
},
Data: data,
}
}
var (
validConfigMap = newConfigMap("1", "validname", "validns", map[string]string{"key": "value"})
noVersion = newConfigMap("", "validname", "validns", map[string]string{"key": "value"})
)
cases := []struct {
name string
newCfg api.ConfigMap
oldCfg api.ConfigMap
isValid bool
}{
{
name: "valid",
newCfg: validConfigMap,
oldCfg: validConfigMap,
isValid: true,
},
{
name: "invalid",
newCfg: noVersion,
oldCfg: validConfigMap,
isValid: false,
},
}
for _, tc := range cases {
errs := ValidateConfigMapUpdate(&tc.newCfg, &tc.oldCfg)
if tc.isValid && len(errs) > 0 {
t.Errorf("%v: unexpected error: %v", tc.name, errs)
}
if !tc.isValid && len(errs) == 0 {
t.Errorf("%v: unexpected non-error", tc.name)
}
}
}

View File

@ -66,8 +66,6 @@ func addKnownTypes(scheme *runtime.Scheme) {
&Ingress{}, &Ingress{},
&IngressList{}, &IngressList{},
&api.ListOptions{}, &api.ListOptions{},
&ConfigMap{},
&ConfigMapList{},
&ReplicaSet{}, &ReplicaSet{},
&ReplicaSetList{}, &ReplicaSetList{},
&api.ExportOptions{}, &api.ExportOptions{},
@ -92,7 +90,5 @@ func (obj *ThirdPartyResourceData) GetObjectKind() unversioned.ObjectKind {
func (obj *ThirdPartyResourceDataList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ThirdPartyResourceDataList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *Ingress) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *Ingress) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *IngressList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *IngressList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ConfigMap) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ConfigMapList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ReplicaSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ReplicaSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ReplicaSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ReplicaSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }

File diff suppressed because it is too large Load Diff

View File

@ -784,29 +784,6 @@ const (
LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist"
) )
// ConfigMap holds configuration data for components or applications to consume.
type ConfigMap struct {
unversioned.TypeMeta `json:",inline"`
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
api.ObjectMeta `json:"metadata,omitempty"`
// Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.
Data map[string]string `json:"data,omitempty"`
}
// ConfigMapList is a resource containing a list of ConfigMap objects.
type ConfigMapList struct {
unversioned.TypeMeta `json:",inline"`
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is the list of ConfigMaps.
Items []ConfigMap `json:"items,omitempty"`
}
// ReplicaSet represents the configuration of a replica set. // ReplicaSet represents the configuration of a replica set.
type ReplicaSet struct { type ReplicaSet struct {
unversioned.TypeMeta `json:",inline"` unversioned.TypeMeta `json:",inline"`

View File

@ -54,7 +54,7 @@ func addConversionFuncs(scheme *runtime.Scheme) {
} }
// Add field label conversions for kinds having selectable nothing but ObjectMeta fields. // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
for _, kind := range []string{"ConfigMap", "DaemonSet", "Deployment", "Ingress"} { for _, kind := range []string{"DaemonSet", "Deployment", "Ingress"} {
err = api.Scheme.AddFieldLabelConversionFunc("extensions/v1beta1", kind, err = api.Scheme.AddFieldLabelConversionFunc("extensions/v1beta1", kind,
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {
switch label { switch label {

View File

@ -2522,58 +2522,6 @@ func Convert_extensions_ClusterAutoscalerSpec_To_v1beta1_ClusterAutoscalerSpec(i
return autoConvert_extensions_ClusterAutoscalerSpec_To_v1beta1_ClusterAutoscalerSpec(in, out, s) return autoConvert_extensions_ClusterAutoscalerSpec_To_v1beta1_ClusterAutoscalerSpec(in, out, s)
} }
func autoConvert_extensions_ConfigMap_To_v1beta1_ConfigMap(in *extensions.ConfigMap, out *ConfigMap, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*extensions.ConfigMap))(in)
}
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if in.Data != nil {
out.Data = make(map[string]string)
for key, val := range in.Data {
out.Data[key] = val
}
} else {
out.Data = nil
}
return nil
}
func Convert_extensions_ConfigMap_To_v1beta1_ConfigMap(in *extensions.ConfigMap, out *ConfigMap, s conversion.Scope) error {
return autoConvert_extensions_ConfigMap_To_v1beta1_ConfigMap(in, out, s)
}
func autoConvert_extensions_ConfigMapList_To_v1beta1_ConfigMapList(in *extensions.ConfigMapList, out *ConfigMapList, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*extensions.ConfigMapList))(in)
}
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
return err
}
if in.Items != nil {
out.Items = make([]ConfigMap, len(in.Items))
for i := range in.Items {
if err := Convert_extensions_ConfigMap_To_v1beta1_ConfigMap(&in.Items[i], &out.Items[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func Convert_extensions_ConfigMapList_To_v1beta1_ConfigMapList(in *extensions.ConfigMapList, out *ConfigMapList, s conversion.Scope) error {
return autoConvert_extensions_ConfigMapList_To_v1beta1_ConfigMapList(in, out, s)
}
func autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error { func autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*extensions.DaemonSet))(in) defaulting.(func(*extensions.DaemonSet))(in)
@ -3704,58 +3652,6 @@ func Convert_v1beta1_ClusterAutoscalerSpec_To_extensions_ClusterAutoscalerSpec(i
return autoConvert_v1beta1_ClusterAutoscalerSpec_To_extensions_ClusterAutoscalerSpec(in, out, s) return autoConvert_v1beta1_ClusterAutoscalerSpec_To_extensions_ClusterAutoscalerSpec(in, out, s)
} }
func autoConvert_v1beta1_ConfigMap_To_extensions_ConfigMap(in *ConfigMap, out *extensions.ConfigMap, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ConfigMap))(in)
}
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
}
if in.Data != nil {
out.Data = make(map[string]string)
for key, val := range in.Data {
out.Data[key] = val
}
} else {
out.Data = nil
}
return nil
}
func Convert_v1beta1_ConfigMap_To_extensions_ConfigMap(in *ConfigMap, out *extensions.ConfigMap, s conversion.Scope) error {
return autoConvert_v1beta1_ConfigMap_To_extensions_ConfigMap(in, out, s)
}
func autoConvert_v1beta1_ConfigMapList_To_extensions_ConfigMapList(in *ConfigMapList, out *extensions.ConfigMapList, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ConfigMapList))(in)
}
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
return err
}
if in.Items != nil {
out.Items = make([]extensions.ConfigMap, len(in.Items))
for i := range in.Items {
if err := Convert_v1beta1_ConfigMap_To_extensions_ConfigMap(&in.Items[i], &out.Items[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func Convert_v1beta1_ConfigMapList_To_extensions_ConfigMapList(in *ConfigMapList, out *extensions.ConfigMapList, s conversion.Scope) error {
return autoConvert_v1beta1_ConfigMapList_To_extensions_ConfigMapList(in, out, s)
}
func autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error { func autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*DaemonSet))(in) defaulting.(func(*DaemonSet))(in)
@ -4840,8 +4736,6 @@ func init() {
autoConvert_extensions_ClusterAutoscalerList_To_v1beta1_ClusterAutoscalerList, autoConvert_extensions_ClusterAutoscalerList_To_v1beta1_ClusterAutoscalerList,
autoConvert_extensions_ClusterAutoscalerSpec_To_v1beta1_ClusterAutoscalerSpec, autoConvert_extensions_ClusterAutoscalerSpec_To_v1beta1_ClusterAutoscalerSpec,
autoConvert_extensions_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler, autoConvert_extensions_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler,
autoConvert_extensions_ConfigMapList_To_v1beta1_ConfigMapList,
autoConvert_extensions_ConfigMap_To_v1beta1_ConfigMap,
autoConvert_extensions_DaemonSetList_To_v1beta1_DaemonSetList, autoConvert_extensions_DaemonSetList_To_v1beta1_DaemonSetList,
autoConvert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec, autoConvert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec,
autoConvert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus, autoConvert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus,
@ -4937,8 +4831,6 @@ func init() {
autoConvert_v1beta1_ClusterAutoscalerList_To_extensions_ClusterAutoscalerList, autoConvert_v1beta1_ClusterAutoscalerList_To_extensions_ClusterAutoscalerList,
autoConvert_v1beta1_ClusterAutoscalerSpec_To_extensions_ClusterAutoscalerSpec, autoConvert_v1beta1_ClusterAutoscalerSpec_To_extensions_ClusterAutoscalerSpec,
autoConvert_v1beta1_ClusterAutoscaler_To_extensions_ClusterAutoscaler, autoConvert_v1beta1_ClusterAutoscaler_To_extensions_ClusterAutoscaler,
autoConvert_v1beta1_ConfigMapList_To_extensions_ConfigMapList,
autoConvert_v1beta1_ConfigMap_To_extensions_ConfigMap,
autoConvert_v1beta1_DaemonSetList_To_extensions_DaemonSetList, autoConvert_v1beta1_DaemonSetList_To_extensions_DaemonSetList,
autoConvert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec, autoConvert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec,
autoConvert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus, autoConvert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus,

View File

@ -1010,44 +1010,6 @@ func deepCopy_v1beta1_ClusterAutoscalerSpec(in ClusterAutoscalerSpec, out *Clust
return nil return nil
} }
func deepCopy_v1beta1_ConfigMap(in ConfigMap, out *ConfigMap, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if in.Data != nil {
out.Data = make(map[string]string)
for key, val := range in.Data {
out.Data[key] = val
}
} else {
out.Data = nil
}
return nil
}
func deepCopy_v1beta1_ConfigMapList(in ConfigMapList, out *ConfigMapList, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
return err
}
if in.Items != nil {
out.Items = make([]ConfigMap, len(in.Items))
for i := range in.Items {
if err := deepCopy_v1beta1_ConfigMap(in.Items[i], &out.Items[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func deepCopy_v1beta1_DaemonSet(in DaemonSet, out *DaemonSet, c *conversion.Cloner) error { func deepCopy_v1beta1_DaemonSet(in DaemonSet, out *DaemonSet, c *conversion.Cloner) error {
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err return err
@ -1888,8 +1850,6 @@ func init() {
deepCopy_v1beta1_ClusterAutoscaler, deepCopy_v1beta1_ClusterAutoscaler,
deepCopy_v1beta1_ClusterAutoscalerList, deepCopy_v1beta1_ClusterAutoscalerList,
deepCopy_v1beta1_ClusterAutoscalerSpec, deepCopy_v1beta1_ClusterAutoscalerSpec,
deepCopy_v1beta1_ConfigMap,
deepCopy_v1beta1_ConfigMapList,
deepCopy_v1beta1_DaemonSet, deepCopy_v1beta1_DaemonSet,
deepCopy_v1beta1_DaemonSetList, deepCopy_v1beta1_DaemonSetList,
deepCopy_v1beta1_DaemonSetSpec, deepCopy_v1beta1_DaemonSetSpec,

View File

@ -142,11 +142,6 @@ func addDefaultingFuncs(scheme *runtime.Scheme) {
obj.Spec.CPUUtilization = &CPUTargetUtilization{TargetPercentage: 80} obj.Spec.CPUUtilization = &CPUTargetUtilization{TargetPercentage: 80}
} }
}, },
func(obj *ConfigMap) {
if obj.Data == nil {
obj.Data = make(map[string]string)
}
},
func(obj *ReplicaSet) { func(obj *ReplicaSet) {
var labels map[string]string var labels map[string]string
if obj.Spec.Template != nil { if obj.Spec.Template != nil {

View File

@ -56,8 +56,6 @@ func addKnownTypes(scheme *runtime.Scheme) {
&Ingress{}, &Ingress{},
&IngressList{}, &IngressList{},
&ListOptions{}, &ListOptions{},
&ConfigMap{},
&ConfigMapList{},
&v1.DeleteOptions{}, &v1.DeleteOptions{},
&ReplicaSet{}, &ReplicaSet{},
&ReplicaSetList{}, &ReplicaSetList{},
@ -83,7 +81,5 @@ func (obj *ThirdPartyResourceDataList) GetObjectKind() unversioned.ObjectKind {
func (obj *Ingress) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *Ingress) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *IngressList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *IngressList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ListOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ListOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ConfigMap) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ConfigMapList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ReplicaSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ReplicaSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *ReplicaSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ReplicaSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }

File diff suppressed because it is too large Load Diff

View File

@ -809,29 +809,6 @@ const (
LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist"
) )
// ConfigMap holds configuration data for pods to consume.
type ConfigMap struct {
unversioned.TypeMeta `json:",inline"`
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
v1.ObjectMeta `json:"metadata,omitempty"`
// Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.
Data map[string]string `json:"data,omitempty"`
}
// ConfigMapList is a resource containing a list of ConfigMap objects.
type ConfigMapList struct {
unversioned.TypeMeta `json:",inline"`
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is the list of ConfigMaps.
Items []ConfigMap `json:"items,omitempty"`
}
// ReplicaSet represents the configuration of a ReplicaSet. // ReplicaSet represents the configuration of a ReplicaSet.
type ReplicaSet struct { type ReplicaSet struct {
unversioned.TypeMeta `json:",inline"` unversioned.TypeMeta `json:",inline"`

View File

@ -74,26 +74,6 @@ func (ClusterAutoscalerSpec) SwaggerDoc() map[string]string {
return map_ClusterAutoscalerSpec return map_ClusterAutoscalerSpec
} }
var map_ConfigMap = map[string]string{
"": "ConfigMap holds configuration data for pods to consume.",
"metadata": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.",
"data": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.",
}
func (ConfigMap) SwaggerDoc() map[string]string {
return map_ConfigMap
}
var map_ConfigMapList = map[string]string{
"": "ConfigMapList is a resource containing a list of ConfigMap objects.",
"metadata": "More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"items": "Items is the list of ConfigMaps.",
}
func (ConfigMapList) SwaggerDoc() map[string]string {
return map_ConfigMapList
}
var map_DaemonSet = map[string]string{ var map_DaemonSet = map[string]string{
"": "DaemonSet represents the configuration of a daemon set.", "": "DaemonSet represents the configuration of a daemon set.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",

View File

@ -17,7 +17,6 @@ limitations under the License.
package validation package validation
import ( import (
"fmt"
"net" "net"
"regexp" "regexp"
"strconv" "strconv"
@ -629,35 +628,6 @@ func ValidateScale(scale *extensions.Scale) field.ErrorList {
return allErrs return allErrs
} }
// ValidateConfigMapName can be used to check whether the given ConfigMap name is valid.
// Prefix indicates this name will be used as part of generation, in which case
// trailing dashes are allowed.
func ValidateConfigMapName(name string, prefix bool) (bool, string) {
return apivalidation.NameIsDNSSubdomain(name, prefix)
}
// ValidateConfigMap tests whether required fields in the ConfigMap are set.
func ValidateConfigMap(cfg *extensions.ConfigMap) field.ErrorList {
allErrs := field.ErrorList{}
allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&cfg.ObjectMeta, true, ValidateConfigMapName, field.NewPath("metadata"))...)
for key := range cfg.Data {
if !apivalidation.IsSecretKey(key) {
allErrs = append(allErrs, field.Invalid(field.NewPath("data").Key(key), key, fmt.Sprintf("must have at most %d characters and match regex %s", validation.DNS1123SubdomainMaxLength, apivalidation.SecretKeyFmt)))
}
}
return allErrs
}
// ValidateConfigMapUpdate tests if required fields in the ConfigMap are set.
func ValidateConfigMapUpdate(newCfg, oldCfg *extensions.ConfigMap) field.ErrorList {
allErrs := field.ErrorList{}
allErrs = append(allErrs, apivalidation.ValidateObjectMetaUpdate(&newCfg.ObjectMeta, &oldCfg.ObjectMeta, field.NewPath("metadata"))...)
allErrs = append(allErrs, ValidateConfigMap(newCfg)...)
return allErrs
}
// ValidateReplicaSetName can be used to check whether the given ReplicaSet // ValidateReplicaSetName can be used to check whether the given ReplicaSet
// name is valid. // name is valid.
// Prefix indicates this name will be used as part of generation, in which case // Prefix indicates this name will be used as part of generation, in which case

View File

@ -1458,108 +1458,6 @@ func TestValidateScale(t *testing.T) {
} }
} }
func TestValidateConfigMap(t *testing.T) {
newConfigMap := func(name, namespace string, data map[string]string) extensions.ConfigMap {
return extensions.ConfigMap{
ObjectMeta: api.ObjectMeta{
Name: name,
Namespace: namespace,
},
Data: data,
}
}
var (
validConfigMap = newConfigMap("validname", "validns", map[string]string{"key": "value"})
maxKeyLength = newConfigMap("validname", "validns", map[string]string{strings.Repeat("a", 253): "value"})
emptyName = newConfigMap("", "validns", nil)
invalidName = newConfigMap("NoUppercaseOrSpecialCharsLike=Equals", "validns", nil)
emptyNs = newConfigMap("validname", "", nil)
invalidNs = newConfigMap("validname", "NoUppercaseOrSpecialCharsLike=Equals", nil)
invalidKey = newConfigMap("validname", "validns", map[string]string{"a..b": "value"})
leadingDotKey = newConfigMap("validname", "validns", map[string]string{".ab": "value"})
dotKey = newConfigMap("validname", "validns", map[string]string{".": "value"})
doubleDotKey = newConfigMap("validname", "validns", map[string]string{"..": "value"})
overMaxKeyLength = newConfigMap("validname", "validns", map[string]string{strings.Repeat("a", 254): "value"})
)
tests := map[string]struct {
cfg extensions.ConfigMap
isValid bool
}{
"valid": {validConfigMap, true},
"max key length": {maxKeyLength, true},
"leading dot key": {leadingDotKey, true},
"empty name": {emptyName, false},
"invalid name": {invalidName, false},
"invalid key": {invalidKey, false},
"empty namespace": {emptyNs, false},
"invalid namespace": {invalidNs, false},
"dot key": {dotKey, false},
"double dot key": {doubleDotKey, false},
"over max key length": {overMaxKeyLength, false},
}
for name, tc := range tests {
errs := ValidateConfigMap(&tc.cfg)
if tc.isValid && len(errs) > 0 {
t.Errorf("%v: unexpected error: %v", name, errs)
}
if !tc.isValid && len(errs) == 0 {
t.Errorf("%v: unexpected non-error", name)
}
}
}
func TestValidateConfigMapUpdate(t *testing.T) {
newConfigMap := func(version, name, namespace string, data map[string]string) extensions.ConfigMap {
return extensions.ConfigMap{
ObjectMeta: api.ObjectMeta{
Name: name,
Namespace: namespace,
ResourceVersion: version,
},
Data: data,
}
}
var (
validConfigMap = newConfigMap("1", "validname", "validns", map[string]string{"key": "value"})
noVersion = newConfigMap("", "validname", "validns", map[string]string{"key": "value"})
)
cases := []struct {
name string
newCfg extensions.ConfigMap
oldCfg extensions.ConfigMap
isValid bool
}{
{
name: "valid",
newCfg: validConfigMap,
oldCfg: validConfigMap,
isValid: true,
},
{
name: "invalid",
newCfg: noVersion,
oldCfg: validConfigMap,
isValid: false,
},
}
for _, tc := range cases {
errs := ValidateConfigMapUpdate(&tc.newCfg, &tc.oldCfg)
if tc.isValid && len(errs) > 0 {
t.Errorf("%v: unexpected error: %v", tc.name, errs)
}
if !tc.isValid && len(errs) == 0 {
t.Errorf("%v: unexpected non-error", tc.name)
}
}
}
func TestValidateReplicaSetStatusUpdate(t *testing.T) { func TestValidateReplicaSetStatusUpdate(t *testing.T) {
validLabels := map[string]string{"a": "b"} validLabels := map[string]string{"a": "b"}
validPodTemplate := api.PodTemplate{ validPodTemplate := api.PodTemplate{

View File

@ -40,6 +40,7 @@ type Interface interface {
PersistentVolumesInterface PersistentVolumesInterface
PersistentVolumeClaimsNamespacer PersistentVolumeClaimsNamespacer
ComponentStatusesInterface ComponentStatusesInterface
ConfigMapsNamespacer
Extensions() ExtensionsInterface Extensions() ExtensionsInterface
Discovery() DiscoveryInterface Discovery() DiscoveryInterface
} }
@ -103,6 +104,10 @@ func (c *Client) ComponentStatuses() ComponentStatusInterface {
return newComponentStatuses(c) return newComponentStatuses(c)
} }
func (c *Client) ConfigMaps(namespace string) ConfigMapsInterface {
return newConfigMaps(c, namespace)
}
// Client is the implementation of a Kubernetes client. // Client is the implementation of a Kubernetes client.
type Client struct { type Client struct {
*RESTClient *RESTClient

View File

@ -18,7 +18,6 @@ package unversioned
import ( import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/watch" "k8s.io/kubernetes/pkg/watch"
) )
@ -31,31 +30,31 @@ type ConfigMapsNamespacer interface {
} }
type ConfigMapsInterface interface { type ConfigMapsInterface interface {
Get(string) (*extensions.ConfigMap, error) Get(string) (*api.ConfigMap, error)
List(opts api.ListOptions) (*extensions.ConfigMapList, error) List(opts api.ListOptions) (*api.ConfigMapList, error)
Create(*extensions.ConfigMap) (*extensions.ConfigMap, error) Create(*api.ConfigMap) (*api.ConfigMap, error)
Delete(string) error Delete(string) error
Update(*extensions.ConfigMap) (*extensions.ConfigMap, error) Update(*api.ConfigMap) (*api.ConfigMap, error)
Watch(api.ListOptions) (watch.Interface, error) Watch(api.ListOptions) (watch.Interface, error)
} }
type ConfigMaps struct { type ConfigMaps struct {
client *ExtensionsClient client *Client
namespace string namespace string
} }
// ConfigMaps should implement ConfigMapsInterface // ConfigMaps should implement ConfigMapsInterface
var _ ConfigMapsInterface = &ConfigMaps{} var _ ConfigMapsInterface = &ConfigMaps{}
func newConfigMaps(c *ExtensionsClient, ns string) *ConfigMaps { func newConfigMaps(c *Client, ns string) *ConfigMaps {
return &ConfigMaps{ return &ConfigMaps{
client: c, client: c,
namespace: ns, namespace: ns,
} }
} }
func (c *ConfigMaps) Get(name string) (*extensions.ConfigMap, error) { func (c *ConfigMaps) Get(name string) (*api.ConfigMap, error) {
result := &extensions.ConfigMap{} result := &api.ConfigMap{}
err := c.client.Get(). err := c.client.Get().
Namespace(c.namespace). Namespace(c.namespace).
Resource(ConfigMapResourceName). Resource(ConfigMapResourceName).
@ -66,8 +65,8 @@ func (c *ConfigMaps) Get(name string) (*extensions.ConfigMap, error) {
return result, err return result, err
} }
func (c *ConfigMaps) List(opts api.ListOptions) (*extensions.ConfigMapList, error) { func (c *ConfigMaps) List(opts api.ListOptions) (*api.ConfigMapList, error) {
result := &extensions.ConfigMapList{} result := &api.ConfigMapList{}
err := c.client.Get(). err := c.client.Get().
Namespace(c.namespace). Namespace(c.namespace).
Resource(ConfigMapResourceName). Resource(ConfigMapResourceName).
@ -78,8 +77,8 @@ func (c *ConfigMaps) List(opts api.ListOptions) (*extensions.ConfigMapList, erro
return result, err return result, err
} }
func (c *ConfigMaps) Create(cfg *extensions.ConfigMap) (*extensions.ConfigMap, error) { func (c *ConfigMaps) Create(cfg *api.ConfigMap) (*api.ConfigMap, error) {
result := &extensions.ConfigMap{} result := &api.ConfigMap{}
err := c.client.Post(). err := c.client.Post().
Namespace(c.namespace). Namespace(c.namespace).
Resource(ConfigMapResourceName). Resource(ConfigMapResourceName).
@ -99,8 +98,8 @@ func (c *ConfigMaps) Delete(name string) error {
Error() Error()
} }
func (c *ConfigMaps) Update(cfg *extensions.ConfigMap) (*extensions.ConfigMap, error) { func (c *ConfigMaps) Update(cfg *api.ConfigMap) (*api.ConfigMap, error) {
result := &extensions.ConfigMap{} result := &api.ConfigMap{}
err := c.client.Put(). err := c.client.Put().
Namespace(c.namespace). Namespace(c.namespace).

View File

@ -34,7 +34,6 @@ type ExtensionsInterface interface {
JobsNamespacer JobsNamespacer
IngressNamespacer IngressNamespacer
ThirdPartyResourceNamespacer ThirdPartyResourceNamespacer
ConfigMapsNamespacer
} }
// ExtensionsClient is used to interact with experimental Kubernetes features. // ExtensionsClient is used to interact with experimental Kubernetes features.
@ -68,10 +67,6 @@ func (c *ExtensionsClient) Ingress(namespace string) IngressInterface {
return newIngress(c, namespace) return newIngress(c, namespace)
} }
func (c *ExtensionsClient) ConfigMaps(namespace string) ConfigMapsInterface {
return newConfigMaps(c, namespace)
}
func (c *ExtensionsClient) ThirdPartyResources(namespace string) ThirdPartyResourceInterface { func (c *ExtensionsClient) ThirdPartyResources(namespace string) ThirdPartyResourceInterface {
return newThirdPartyResources(c, namespace) return newThirdPartyResources(c, namespace)
} }

View File

@ -18,7 +18,6 @@ package testclient
import ( import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/watch" "k8s.io/kubernetes/pkg/watch"
) )
@ -29,48 +28,48 @@ const (
// FakeConfigMaps implements ConfigMapInterface. Meant to be embedded into a struct to get a default // FakeConfigMaps implements ConfigMapInterface. Meant to be embedded into a struct to get a default
// implementation. This makes faking out just the method you want to test easier. // implementation. This makes faking out just the method you want to test easier.
type FakeConfigMaps struct { type FakeConfigMaps struct {
Fake *FakeExperimental Fake *Fake
Namespace string Namespace string
} }
func (c *FakeConfigMaps) Get(name string) (*extensions.ConfigMap, error) { func (c *FakeConfigMaps) Get(name string) (*api.ConfigMap, error) {
obj, err := c.Fake.Invokes(NewGetAction(configMapResourceName, c.Namespace, name), &extensions.ConfigMap{}) obj, err := c.Fake.Invokes(NewGetAction(configMapResourceName, c.Namespace, name), &api.ConfigMap{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*extensions.ConfigMap), err return obj.(*api.ConfigMap), err
} }
func (c *FakeConfigMaps) List(opts api.ListOptions) (*extensions.ConfigMapList, error) { func (c *FakeConfigMaps) List(opts api.ListOptions) (*api.ConfigMapList, error) {
obj, err := c.Fake.Invokes(NewListAction(configMapResourceName, c.Namespace, opts), &extensions.ConfigMapList{}) obj, err := c.Fake.Invokes(NewListAction(configMapResourceName, c.Namespace, opts), &api.ConfigMapList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*extensions.ConfigMapList), err return obj.(*api.ConfigMapList), err
} }
func (c *FakeConfigMaps) Create(cfg *extensions.ConfigMap) (*extensions.ConfigMap, error) { func (c *FakeConfigMaps) Create(cfg *api.ConfigMap) (*api.ConfigMap, error) {
obj, err := c.Fake.Invokes(NewCreateAction(configMapResourceName, c.Namespace, cfg), cfg) obj, err := c.Fake.Invokes(NewCreateAction(configMapResourceName, c.Namespace, cfg), cfg)
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*extensions.ConfigMap), err return obj.(*api.ConfigMap), err
} }
func (c *FakeConfigMaps) Update(cfg *extensions.ConfigMap) (*extensions.ConfigMap, error) { func (c *FakeConfigMaps) Update(cfg *api.ConfigMap) (*api.ConfigMap, error) {
obj, err := c.Fake.Invokes(NewUpdateAction(configMapResourceName, c.Namespace, cfg), cfg) obj, err := c.Fake.Invokes(NewUpdateAction(configMapResourceName, c.Namespace, cfg), cfg)
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*extensions.ConfigMap), err return obj.(*api.ConfigMap), err
} }
func (c *FakeConfigMaps) Delete(name string) error { func (c *FakeConfigMaps) Delete(name string) error {
_, err := c.Fake.Invokes(NewDeleteAction(configMapResourceName, c.Namespace, name), &extensions.ConfigMap{}) _, err := c.Fake.Invokes(NewDeleteAction(configMapResourceName, c.Namespace, name), &api.ConfigMap{})
return err return err
} }

View File

@ -282,6 +282,10 @@ func (c *Fake) ComponentStatuses() client.ComponentStatusInterface {
return &FakeComponentStatuses{Fake: c} return &FakeComponentStatuses{Fake: c}
} }
func (c *Fake) ConfigMaps(namespace string) client.ConfigMapsInterface {
return &FakeConfigMaps{Fake: c, Namespace: namespace}
}
// SwaggerSchema returns an empty swagger.ApiDeclaration for testing // SwaggerSchema returns an empty swagger.ApiDeclaration for testing
func (c *Fake) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) { func (c *Fake) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) {
action := ActionImpl{} action := ActionImpl{}
@ -329,10 +333,6 @@ func (c *FakeExperimental) Ingress(namespace string) client.IngressInterface {
return &FakeIngress{Fake: c, Namespace: namespace} return &FakeIngress{Fake: c, Namespace: namespace}
} }
func (c *FakeExperimental) ConfigMaps(namespace string) client.ConfigMapsInterface {
return &FakeConfigMaps{Fake: c, Namespace: namespace}
}
func (c *FakeExperimental) ThirdPartyResources(namespace string) client.ThirdPartyResourceInterface { func (c *FakeExperimental) ThirdPartyResources(namespace string) client.ThirdPartyResourceInterface {
return &FakeThirdPartyResources{Fake: c, Namespace: namespace} return &FakeThirdPartyResources{Fake: c, Namespace: namespace}
} }

View File

@ -84,13 +84,13 @@ func describerMap(c *client.Client) map[unversioned.GroupKind]Describer {
api.Kind("PersistentVolumeClaim"): &PersistentVolumeClaimDescriber{c}, api.Kind("PersistentVolumeClaim"): &PersistentVolumeClaimDescriber{c},
api.Kind("Namespace"): &NamespaceDescriber{c}, api.Kind("Namespace"): &NamespaceDescriber{c},
api.Kind("Endpoints"): &EndpointsDescriber{c}, api.Kind("Endpoints"): &EndpointsDescriber{c},
api.Kind("ConfigMap"): &ConfigMapDescriber{c},
extensions.Kind("HorizontalPodAutoscaler"): &HorizontalPodAutoscalerDescriber{c}, extensions.Kind("HorizontalPodAutoscaler"): &HorizontalPodAutoscalerDescriber{c},
extensions.Kind("DaemonSet"): &DaemonSetDescriber{c}, extensions.Kind("DaemonSet"): &DaemonSetDescriber{c},
extensions.Kind("Job"): &JobDescriber{c}, extensions.Kind("Job"): &JobDescriber{c},
extensions.Kind("Deployment"): &DeploymentDescriber{c}, extensions.Kind("Deployment"): &DeploymentDescriber{c},
extensions.Kind("Ingress"): &IngressDescriber{c}, extensions.Kind("Ingress"): &IngressDescriber{c},
extensions.Kind("ConfigMap"): &ConfigMapDescriber{c},
} }
return m return m
@ -1709,7 +1709,7 @@ type ConfigMapDescriber struct {
} }
func (d *ConfigMapDescriber) Describe(namespace, name string) (string, error) { func (d *ConfigMapDescriber) Describe(namespace, name string) (string, error) {
c := d.Extensions().ConfigMaps(namespace) c := d.ConfigMaps(namespace)
configMap, err := c.Get(name) configMap, err := c.Get(name)
if err != nil { if err != nil {
@ -1719,7 +1719,7 @@ func (d *ConfigMapDescriber) Describe(namespace, name string) (string, error) {
return describeConfigMap(configMap) return describeConfigMap(configMap)
} }
func describeConfigMap(configMap *extensions.ConfigMap) (string, error) { func describeConfigMap(configMap *api.ConfigMap) (string, error) {
return tabbedString(func(out io.Writer) error { return tabbedString(func(out io.Writer) error {
fmt.Fprintf(out, "Name:\t%s\n", configMap.Name) fmt.Fprintf(out, "Name:\t%s\n", configMap.Name)
fmt.Fprintf(out, "Namespace:\t%s\n", configMap.Namespace) fmt.Fprintf(out, "Namespace:\t%s\n", configMap.Namespace)

View File

@ -1451,7 +1451,7 @@ func printHorizontalPodAutoscalerList(list *extensions.HorizontalPodAutoscalerLi
return nil return nil
} }
func printConfigMap(configMap *extensions.ConfigMap, w io.Writer, options printOptions) error { func printConfigMap(configMap *api.ConfigMap, w io.Writer, options printOptions) error {
name := configMap.Name name := configMap.Name
namespace := configMap.Namespace namespace := configMap.Namespace
@ -1467,7 +1467,7 @@ func printConfigMap(configMap *extensions.ConfigMap, w io.Writer, options printO
return err return err
} }
func printConfigMapList(list *extensions.ConfigMapList, w io.Writer, options printOptions) error { func printConfigMapList(list *api.ConfigMapList, w io.Writer, options printOptions) error {
for i := range list.Items { for i := range list.Items {
if err := printConfigMap(&list.Items[i], w, options); err != nil { if err := printConfigMap(&list.Items[i], w, options); err != nil {
return err return err

View File

@ -39,7 +39,6 @@ import (
"k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/api/validation"
apiextensions "k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/client/record"
client "k8s.io/kubernetes/pkg/client/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned"
@ -1364,7 +1363,7 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *api.Pod, container *api.Contain
// 3. Add remaining service environment vars // 3. Add remaining service environment vars
var ( var (
tmpEnv = make(map[string]string) tmpEnv = make(map[string]string)
configMaps = make(map[string]*apiextensions.ConfigMap) configMaps = make(map[string]*api.ConfigMap)
secrets = make(map[string]*api.Secret) secrets = make(map[string]*api.Secret)
mappingFunc = expansion.MappingFuncFor(tmpEnv, serviceEnv) mappingFunc = expansion.MappingFuncFor(tmpEnv, serviceEnv)
) )
@ -1393,7 +1392,7 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *api.Pod, container *api.Contain
key := envVar.ValueFrom.ConfigMapKeyRef.Key key := envVar.ValueFrom.ConfigMapKeyRef.Key
configMap, ok := configMaps[name] configMap, ok := configMaps[name]
if !ok { if !ok {
configMap, err = kl.kubeClient.Extensions().ConfigMaps(pod.Namespace).Get(name) configMap, err = kl.kubeClient.ConfigMaps(pod.Namespace).Get(name)
if err != nil { if err != nil {
return result, err return result, err
} }

View File

@ -274,6 +274,7 @@ func (m *Master) initV1ResourcesStorage(c *Config) {
serviceAccountStorage := serviceaccountetcd.NewREST(dbClient("serviceAccounts"), storageDecorator) serviceAccountStorage := serviceaccountetcd.NewREST(dbClient("serviceAccounts"), storageDecorator)
persistentVolumeStorage, persistentVolumeStatusStorage := pvetcd.NewREST(dbClient("persistentVolumes"), storageDecorator) persistentVolumeStorage, persistentVolumeStatusStorage := pvetcd.NewREST(dbClient("persistentVolumes"), storageDecorator)
persistentVolumeClaimStorage, persistentVolumeClaimStatusStorage := pvcetcd.NewREST(dbClient("persistentVolumeClaims"), storageDecorator) persistentVolumeClaimStorage, persistentVolumeClaimStatusStorage := pvcetcd.NewREST(dbClient("persistentVolumeClaims"), storageDecorator)
configMapStorage := configmapetcd.NewREST(dbClient("configMaps"), storageDecorator)
namespaceStorage, namespaceStatusStorage, namespaceFinalizeStorage := namespaceetcd.NewREST(dbClient("namespaces"), storageDecorator) namespaceStorage, namespaceStatusStorage, namespaceFinalizeStorage := namespaceetcd.NewREST(dbClient("namespaces"), storageDecorator)
m.namespaceRegistry = namespace.NewRegistry(namespaceStorage) m.namespaceRegistry = namespace.NewRegistry(namespaceStorage)
@ -352,6 +353,7 @@ func (m *Master) initV1ResourcesStorage(c *Config) {
"persistentVolumes/status": persistentVolumeStatusStorage, "persistentVolumes/status": persistentVolumeStatusStorage,
"persistentVolumeClaims": persistentVolumeClaimStorage, "persistentVolumeClaims": persistentVolumeClaimStorage,
"persistentVolumeClaims/status": persistentVolumeClaimStatusStorage, "persistentVolumeClaims/status": persistentVolumeClaimStatusStorage,
"configMaps": configMapStorage,
"componentStatuses": componentstatus.NewStorage(func() map[string]apiserver.Server { return m.getServersToValidate(c) }), "componentStatuses": componentstatus.NewStorage(func() map[string]apiserver.Server { return m.getServersToValidate(c) }),
} }
@ -569,7 +571,7 @@ func (m *Master) thirdpartyapi(group, kind, version string) *apiserver.APIGroupV
// getExperimentalResources returns the resources for extenstions api // getExperimentalResources returns the resources for extenstions api
func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage { func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage {
// All resources except these are disabled by default. // All resources except these are disabled by default.
enabledResources := sets.NewString("jobs", "horizontalpodautoscalers", "ingresses", "configmaps") enabledResources := sets.NewString("jobs", "horizontalpodautoscalers", "ingresses")
resourceOverrides := m.ApiGroupVersionOverrides["extensions/v1beta1"].ResourceOverrides resourceOverrides := m.ApiGroupVersionOverrides["extensions/v1beta1"].ResourceOverrides
isEnabled := func(resource string) bool { isEnabled := func(resource string) bool {
// Check if the resource has been overriden. // Check if the resource has been overriden.
@ -631,9 +633,6 @@ func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage {
storage["ingresses"] = ingressStorage storage["ingresses"] = ingressStorage
storage["ingresses/status"] = ingressStatusStorage storage["ingresses/status"] = ingressStatusStorage
} }
if isEnabled("configmaps") {
storage["configmaps"] = configmapetcd.NewREST(dbClient("configmaps"), storageDecorator)
}
return storage return storage
} }

View File

@ -18,7 +18,6 @@ package etcd
import ( import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/registry/configmap" "k8s.io/kubernetes/pkg/registry/configmap"
"k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/registry/generic"
"k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/runtime"
@ -36,13 +35,13 @@ type REST struct {
func NewREST(s storage.Interface, storageDecorator generic.StorageDecorator) *REST { func NewREST(s storage.Interface, storageDecorator generic.StorageDecorator) *REST {
prefix := "/configmaps" prefix := "/configmaps"
newListFunc := func() runtime.Object { return &extensions.ConfigMapList{} } newListFunc := func() runtime.Object { return &api.ConfigMapList{} }
storageInterface := storageDecorator( storageInterface := storageDecorator(
s, 100, &extensions.ConfigMap{}, prefix, false, newListFunc) s, 100, &api.ConfigMap{}, prefix, false, newListFunc)
store := &etcdgeneric.Etcd{ store := &etcdgeneric.Etcd{
NewFunc: func() runtime.Object { NewFunc: func() runtime.Object {
return &extensions.ConfigMap{} return &api.ConfigMap{}
}, },
// NewListFunc returns an object to store results of an etcd list. // NewListFunc returns an object to store results of an etcd list.
@ -62,13 +61,13 @@ func NewREST(s storage.Interface, storageDecorator generic.StorageDecorator) *RE
// Retrieves the name field of a ConfigMap object. // Retrieves the name field of a ConfigMap object.
ObjectNameFunc: func(obj runtime.Object) (string, error) { ObjectNameFunc: func(obj runtime.Object) (string, error) {
return obj.(*extensions.ConfigMap).Name, nil return obj.(*api.ConfigMap).Name, nil
}, },
// Matches objects based on labels/fields for list and watch // Matches objects based on labels/fields for list and watch
PredicateFunc: configmap.MatchConfigMap, PredicateFunc: configmap.MatchConfigMap,
QualifiedResource: extensions.Resource("configmaps"), QualifiedResource: api.Resource("configmaps"),
CreateStrategy: configmap.Strategy, CreateStrategy: configmap.Strategy,
UpdateStrategy: configmap.Strategy, UpdateStrategy: configmap.Strategy,

View File

@ -20,7 +20,6 @@ import (
"testing" "testing"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/registry/generic"
@ -30,12 +29,12 @@ import (
) )
func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
etcdStorage, server := registrytest.NewEtcdStorage(t, "extensions") etcdStorage, server := registrytest.NewEtcdStorage(t, "")
return NewREST(etcdStorage, generic.UndecoratedStorage), server return NewREST(etcdStorage, generic.UndecoratedStorage), server
} }
func validNewConfigMap() *extensions.ConfigMap { func validNewConfigMap() *api.ConfigMap {
return &extensions.ConfigMap{ return &api.ConfigMap{
ObjectMeta: api.ObjectMeta{ ObjectMeta: api.ObjectMeta{
Name: "foo", Name: "foo",
Namespace: "default", Namespace: "default",
@ -62,13 +61,13 @@ func TestCreate(t *testing.T) {
test.TestCreate( test.TestCreate(
validConfigMap, validConfigMap,
&extensions.ConfigMap{ &api.ConfigMap{
ObjectMeta: api.ObjectMeta{Name: "badName"}, ObjectMeta: api.ObjectMeta{Name: "badName"},
Data: map[string]string{ Data: map[string]string{
"key": "value", "key": "value",
}, },
}, },
&extensions.ConfigMap{ &api.ConfigMap{
ObjectMeta: api.ObjectMeta{Name: "name-2"}, ObjectMeta: api.ObjectMeta{Name: "name-2"},
Data: map[string]string{ Data: map[string]string{
"..dotfile": "do: nothing\n", "..dotfile": "do: nothing\n",
@ -86,13 +85,13 @@ func TestUpdate(t *testing.T) {
validNewConfigMap(), validNewConfigMap(),
// updateFunc // updateFunc
func(obj runtime.Object) runtime.Object { func(obj runtime.Object) runtime.Object {
cfg := obj.(*extensions.ConfigMap) cfg := obj.(*api.ConfigMap)
cfg.Data["update-test"] = "value" cfg.Data["update-test"] = "value"
return cfg return cfg
}, },
// invalid updateFunc // invalid updateFunc
func(obj runtime.Object) runtime.Object { func(obj runtime.Object) runtime.Object {
cfg := obj.(*extensions.ConfigMap) cfg := obj.(*api.ConfigMap)
cfg.Data["badKey"] = "value" cfg.Data["badKey"] = "value"
return cfg return cfg
}, },

View File

@ -19,17 +19,16 @@ package configmap
import ( import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/rest" "k8s.io/kubernetes/pkg/api/rest"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/watch" "k8s.io/kubernetes/pkg/watch"
) )
// Registry is an interface for things that know how to store ConfigMaps. // Registry is an interface for things that know how to store ConfigMaps.
type Registry interface { type Registry interface {
ListConfigMaps(ctx api.Context, options *api.ListOptions) (*extensions.ConfigMapList, error) ListConfigMaps(ctx api.Context, options *api.ListOptions) (*api.ConfigMapList, error)
WatchConfigMaps(ctx api.Context, options *api.ListOptions) (watch.Interface, error) WatchConfigMaps(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
GetConfigMap(ctx api.Context, name string) (*extensions.ConfigMap, error) GetConfigMap(ctx api.Context, name string) (*api.ConfigMap, error)
CreateConfigMap(ctx api.Context, cfg *extensions.ConfigMap) (*extensions.ConfigMap, error) CreateConfigMap(ctx api.Context, cfg *api.ConfigMap) (*api.ConfigMap, error)
UpdateConfigMap(ctx api.Context, cfg *extensions.ConfigMap) (*extensions.ConfigMap, error) UpdateConfigMap(ctx api.Context, cfg *api.ConfigMap) (*api.ConfigMap, error)
DeleteConfigMap(ctx api.Context, name string) error DeleteConfigMap(ctx api.Context, name string) error
} }
@ -44,44 +43,44 @@ func NewRegistry(s rest.StandardStorage) Registry {
return &storage{s} return &storage{s}
} }
func (s *storage) ListConfigMaps(ctx api.Context, options *api.ListOptions) (*extensions.ConfigMapList, error) { func (s *storage) ListConfigMaps(ctx api.Context, options *api.ListOptions) (*api.ConfigMapList, error) {
obj, err := s.List(ctx, options) obj, err := s.List(ctx, options)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return obj.(*extensions.ConfigMapList), err return obj.(*api.ConfigMapList), err
} }
func (s *storage) WatchConfigMaps(ctx api.Context, options *api.ListOptions) (watch.Interface, error) { func (s *storage) WatchConfigMaps(ctx api.Context, options *api.ListOptions) (watch.Interface, error) {
return s.Watch(ctx, options) return s.Watch(ctx, options)
} }
func (s *storage) GetConfigMap(ctx api.Context, name string) (*extensions.ConfigMap, error) { func (s *storage) GetConfigMap(ctx api.Context, name string) (*api.ConfigMap, error) {
obj, err := s.Get(ctx, name) obj, err := s.Get(ctx, name)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return obj.(*extensions.ConfigMap), nil return obj.(*api.ConfigMap), nil
} }
func (s *storage) CreateConfigMap(ctx api.Context, cfg *extensions.ConfigMap) (*extensions.ConfigMap, error) { func (s *storage) CreateConfigMap(ctx api.Context, cfg *api.ConfigMap) (*api.ConfigMap, error) {
obj, err := s.Create(ctx, cfg) obj, err := s.Create(ctx, cfg)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return obj.(*extensions.ConfigMap), nil return obj.(*api.ConfigMap), nil
} }
func (s *storage) UpdateConfigMap(ctx api.Context, cfg *extensions.ConfigMap) (*extensions.ConfigMap, error) { func (s *storage) UpdateConfigMap(ctx api.Context, cfg *api.ConfigMap) (*api.ConfigMap, error) {
obj, _, err := s.Update(ctx, cfg) obj, _, err := s.Update(ctx, cfg)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return obj.(*extensions.ConfigMap), nil return obj.(*api.ConfigMap), nil
} }
func (s *storage) DeleteConfigMap(ctx api.Context, name string) error { func (s *storage) DeleteConfigMap(ctx api.Context, name string) error {

View File

@ -21,8 +21,7 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/rest" "k8s.io/kubernetes/pkg/api/rest"
"k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/api/validation"
"k8s.io/kubernetes/pkg/apis/extensions/validation"
"k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/registry/generic"
@ -51,11 +50,11 @@ func (strategy) NamespaceScoped() bool {
} }
func (strategy) PrepareForCreate(obj runtime.Object) { func (strategy) PrepareForCreate(obj runtime.Object) {
_ = obj.(*extensions.ConfigMap) _ = obj.(*api.ConfigMap)
} }
func (strategy) Validate(ctx api.Context, obj runtime.Object) field.ErrorList { func (strategy) Validate(ctx api.Context, obj runtime.Object) field.ErrorList {
cfg := obj.(*extensions.ConfigMap) cfg := obj.(*api.ConfigMap)
return validation.ValidateConfigMap(cfg) return validation.ValidateConfigMap(cfg)
} }
@ -69,8 +68,8 @@ func (strategy) AllowCreateOnUpdate() bool {
} }
func (strategy) PrepareForUpdate(newObj, oldObj runtime.Object) { func (strategy) PrepareForUpdate(newObj, oldObj runtime.Object) {
_ = oldObj.(*extensions.ConfigMap) _ = oldObj.(*api.ConfigMap)
_ = newObj.(*extensions.ConfigMap) _ = newObj.(*api.ConfigMap)
} }
func (strategy) AllowUnconditionalUpdate() bool { func (strategy) AllowUnconditionalUpdate() bool {
@ -78,13 +77,13 @@ func (strategy) AllowUnconditionalUpdate() bool {
} }
func (strategy) ValidateUpdate(ctx api.Context, newObj, oldObj runtime.Object) field.ErrorList { func (strategy) ValidateUpdate(ctx api.Context, newObj, oldObj runtime.Object) field.ErrorList {
oldCfg, newCfg := oldObj.(*extensions.ConfigMap), newObj.(*extensions.ConfigMap) oldCfg, newCfg := oldObj.(*api.ConfigMap), newObj.(*api.ConfigMap)
return validation.ValidateConfigMapUpdate(newCfg, oldCfg) return validation.ValidateConfigMapUpdate(newCfg, oldCfg)
} }
// ConfigMapToSelectableFields returns a field set that represents the object for matching purposes. // ConfigMapToSelectableFields returns a field set that represents the object for matching purposes.
func ConfigMapToSelectableFields(cfg *extensions.ConfigMap) fields.Set { func ConfigMapToSelectableFields(cfg *api.ConfigMap) fields.Set {
return generic.ObjectMetaFieldsSet(cfg.ObjectMeta, true) return generic.ObjectMetaFieldsSet(cfg.ObjectMeta, true)
} }
@ -94,7 +93,7 @@ func MatchConfigMap(label labels.Selector, field fields.Selector) generic.Matche
Label: label, Label: label,
Field: field, Field: field,
GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) {
cfg, ok := obj.(*extensions.ConfigMap) cfg, ok := obj.(*api.ConfigMap)
if !ok { if !ok {
return nil, nil, fmt.Errorf("given object is not of type ConfigMap") return nil, nil, fmt.Errorf("given object is not of type ConfigMap")
} }

View File

@ -22,7 +22,6 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/testapi"
apitesting "k8s.io/kubernetes/pkg/api/testing" apitesting "k8s.io/kubernetes/pkg/api/testing"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/labels"
) )
@ -35,7 +34,7 @@ func TestConfigMapStrategy(t *testing.T) {
t.Errorf("ConfigMap should not allow create on update") t.Errorf("ConfigMap should not allow create on update")
} }
cfg := &extensions.ConfigMap{ cfg := &api.ConfigMap{
ObjectMeta: api.ObjectMeta{ ObjectMeta: api.ObjectMeta{
Name: "valid-config-data", Name: "valid-config-data",
Namespace: api.NamespaceDefault, Namespace: api.NamespaceDefault,
@ -52,7 +51,7 @@ func TestConfigMapStrategy(t *testing.T) {
t.Errorf("unexpected error validating %v", errs) t.Errorf("unexpected error validating %v", errs)
} }
newCfg := &extensions.ConfigMap{ newCfg := &api.ConfigMap{
ObjectMeta: api.ObjectMeta{ ObjectMeta: api.ObjectMeta{
Name: "valid-config-data-2", Name: "valid-config-data-2",
Namespace: api.NamespaceDefault, Namespace: api.NamespaceDefault,
@ -73,9 +72,9 @@ func TestConfigMapStrategy(t *testing.T) {
func TestSelectableFieldLabelConversions(t *testing.T) { func TestSelectableFieldLabelConversions(t *testing.T) {
apitesting.TestSelectableFieldLabelConversionsOfKind(t, apitesting.TestSelectableFieldLabelConversionsOfKind(t,
testapi.Extensions.GroupVersion().String(), testapi.Default.GroupVersion().String(),
"ConfigMap", "ConfigMap",
labels.Set(ConfigMapToSelectableFields(&extensions.ConfigMap{})), labels.Set(ConfigMapToSelectableFields(&api.ConfigMap{})),
nil, nil,
) )
} }

View File

@ -20,7 +20,6 @@ import (
"fmt" "fmt"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/util"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
@ -31,7 +30,7 @@ var _ = Describe("ConfigMap", func() {
It("should be consumable via environment variable [Conformance]", func() { It("should be consumable via environment variable [Conformance]", func() {
name := "configmap-test-" + string(util.NewUUID()) name := "configmap-test-" + string(util.NewUUID())
configMap := &extensions.ConfigMap{ configMap := &api.ConfigMap{
ObjectMeta: api.ObjectMeta{ ObjectMeta: api.ObjectMeta{
Namespace: f.Namespace.Name, Namespace: f.Namespace.Name,
Name: name, Name: name,
@ -46,12 +45,12 @@ var _ = Describe("ConfigMap", func() {
By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name)) By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name))
defer func() { defer func() {
By("Cleaning up the configMap") By("Cleaning up the configMap")
if err := f.Client.Extensions().ConfigMaps(f.Namespace.Name).Delete(configMap.Name); err != nil { if err := f.Client.ConfigMaps(f.Namespace.Name).Delete(configMap.Name); err != nil {
Failf("unable to delete configMap %v: %v", configMap.Name, err) Failf("unable to delete configMap %v: %v", configMap.Name, err)
} }
}() }()
var err error var err error
if configMap, err = f.Client.Extensions().ConfigMaps(f.Namespace.Name).Create(configMap); err != nil { if configMap, err = f.Client.ConfigMaps(f.Namespace.Name).Create(configMap); err != nil {
Failf("unable to create test configMap %s: %v", configMap.Name, err) Failf("unable to create test configMap %s: %v", configMap.Name, err)
} }