Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config resource in env vars #18974

Merged
merged 2 commits into from
Jan 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -14762,13 +14762,31 @@
"v1.EnvVarSource": {
"id": "v1.EnvVarSource",
"description": "EnvVarSource represents a source for the value of an EnvVar.",
"required": [
"fieldRef"
],
"properties": {
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod. Only name and namespace are supported."
"description": "Selects a field of the pod; only name and namespace are supported."
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
}
}
},
"v1.ConfigMapKeySelector": {
"id": "v1.ConfigMapKeySelector",
"description": "Selects a key from a ConfigMap.",
"required": [
"key"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
},
"key": {
"type": "string",
"description": "The key to select."
}
}
},
Expand Down
26 changes: 22 additions & 4 deletions api/swagger-spec/v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4852,13 +4852,31 @@
"v1.EnvVarSource": {
"id": "v1.EnvVarSource",
"description": "EnvVarSource represents a source for the value of an EnvVar.",
"required": [
"fieldRef"
],
"properties": {
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod. Only name and namespace are supported."
"description": "Selects a field of the pod; only name and namespace are supported."
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
}
}
},
"v1.ConfigMapKeySelector": {
"id": "v1.ConfigMapKeySelector",
"description": "Selects a key from a ConfigMap.",
"required": [
"key"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
},
"key": {
"type": "string",
"description": "The key to select."
}
}
},
Expand Down
54 changes: 51 additions & 3 deletions docs/api-reference/extensions/v1beta1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -3077,11 +3077,18 @@ <h3 id="_v1_envvarsource">v1.EnvVarSource</h3>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">fieldRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selects a field of the pod. Only name and namespace are supported.</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">Selects a field of the pod; only name and namespace are supported.</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_objectfieldselector">v1.ObjectFieldSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">configMapKeyRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selects a key of a ConfigMap.</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_configmapkeyselector">v1.ConfigMapKeySelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -4066,6 +4073,47 @@ <h3 id="_v1_lifecycle">v1.Lifecycle</h3>
</tbody>
</table>

</div>
<div class="sect2">
<h3 id="_v1_configmapkeyselector">v1.ConfigMapKeySelector</h3>
<div class="paragraph">
<p>Selects a key from a ConfigMap.</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">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the referent. More info: <a href="http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names">http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names</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">key</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The key to select.</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="_v1_handler">v1.Handler</h3>
Expand Down Expand Up @@ -4477,7 +4525,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-01-06 14:06:54 UTC
Last updated 2016-01-14 15:18:11 UTC
</div>
</div>
</body>
Expand Down
68 changes: 58 additions & 10 deletions docs/api-reference/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2613,11 +2613,18 @@ <h3 id="_v1_envvarsource">v1.EnvVarSource</h3>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">fieldRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selects a field of the pod. Only name and namespace are supported.</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">Selects a field of the pod; only name and namespace are supported.</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_objectfieldselector">v1.ObjectFieldSelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">configMapKeyRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Selects a key of a ConfigMap.</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_configmapkeyselector">v1.ConfigMapKeySelector</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -6555,6 +6562,47 @@ <h3 id="_v1_objectreference">v1.ObjectReference</h3>
</tbody>
</table>

</div>
<div class="sect2">
<h3 id="_v1_containerstatewaiting">v1.ContainerStateWaiting</h3>
<div class="paragraph">
<p>ContainerStateWaiting is a waiting state of a container.</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">reason</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">(brief) reason the container is not yet running.</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">message</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Message regarding why the container is not yet running.</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 class="sect2">
<h3 id="_unversioned_status">unversioned.Status</h3>
Expand Down Expand Up @@ -6640,9 +6688,9 @@ <h3 id="_unversioned_status">unversioned.Status</h3>

</div>
<div class="sect2">
<h3 id="_v1_containerstatewaiting">v1.ContainerStateWaiting</h3>
<h3 id="_v1_configmapkeyselector">v1.ConfigMapKeySelector</h3>
<div class="paragraph">
<p>ContainerStateWaiting is a waiting state of a container.</p>
<p>Selects a key from a ConfigMap.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
Expand All @@ -6663,16 +6711,16 @@ <h3 id="_v1_containerstatewaiting">v1.ContainerStateWaiting</h3>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">reason</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">(brief) reason the container is not yet running.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of the referent. More info: <a href="http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names">http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names</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">message</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Message regarding why the container is not yet running.</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">key</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The key to select.</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>
Expand Down Expand Up @@ -7049,7 +7097,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-01-08 09:05:37 UTC
Last updated 2016-01-14 15:17:59 UTC
</div>
</div>
</body>
Expand Down
18 changes: 18 additions & 0 deletions pkg/api/deep_copy_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func init() {
deepCopy_api_ComponentCondition,
deepCopy_api_ComponentStatus,
deepCopy_api_ComponentStatusList,
deepCopy_api_ConfigMapKeySelector,
deepCopy_api_Container,
deepCopy_api_ContainerImage,
deepCopy_api_ContainerPort,
Expand Down Expand Up @@ -295,6 +296,14 @@ func deepCopy_api_ComponentStatusList(in ComponentStatusList, out *ComponentStat
return nil
}

func deepCopy_api_ConfigMapKeySelector(in ConfigMapKeySelector, out *ConfigMapKeySelector, c *conversion.Cloner) error {
if err := deepCopy_api_LocalObjectReference(in.LocalObjectReference, &out.LocalObjectReference, c); err != nil {
return err
}
out.Key = in.Key
return nil
}

func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner) error {
out.Name = in.Name
out.Image = in.Image
Expand Down Expand Up @@ -682,6 +691,15 @@ func deepCopy_api_EnvVarSource(in EnvVarSource, out *EnvVarSource, c *conversion
} else {
out.FieldRef = nil
}
if in.ConfigMapKeyRef != nil {
in, out := in.ConfigMapKeyRef, &out.ConfigMapKeyRef
*out = new(ConfigMapKeySelector)
if err := deepCopy_api_ConfigMapKeySelector(*in, *out, c); err != nil {
return err
}
} else {
out.ConfigMapKeyRef = nil
}
return nil
}

Expand Down
Loading