Skip to content

Commit

Permalink
Downward API implementation for resources limits and requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Avesh Agarwal committed Apr 20, 2016
1 parent 265c7df commit 85bfb54
Show file tree
Hide file tree
Showing 21 changed files with 754 additions and 230 deletions.
9 changes: 7 additions & 2 deletions api/swagger-spec/batch_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1615,8 +1615,7 @@
"id": "v1.DownwardAPIVolumeFile",
"description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
"required": [
"path",
"fieldRef"
"path"
],
"properties": {
"path": {
Expand All @@ -1626,6 +1625,9 @@
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ObjectFieldSelector"
}
}
},
Expand Down Expand Up @@ -1889,6 +1891,9 @@
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod; only name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ObjectFieldSelector"
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
Expand Down
9 changes: 7 additions & 2 deletions api/swagger-spec/extensions_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7032,8 +7032,7 @@
"id": "v1.DownwardAPIVolumeFile",
"description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
"required": [
"path",
"fieldRef"
"path"
],
"properties": {
"path": {
Expand All @@ -7043,6 +7042,9 @@
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ObjectFieldSelector"
}
}
},
Expand Down Expand Up @@ -7306,6 +7308,9 @@
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod; only name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ObjectFieldSelector"
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
Expand Down
9 changes: 7 additions & 2 deletions api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -16723,8 +16723,7 @@
"id": "v1.DownwardAPIVolumeFile",
"description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
"required": [
"path",
"fieldRef"
"path"
],
"properties": {
"path": {
Expand All @@ -16734,6 +16733,9 @@
"fieldRef": {
"$ref": "v1.ObjectFieldSelector",
"description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ObjectFieldSelector"
}
}
},
Expand Down Expand Up @@ -16945,6 +16947,9 @@
"$ref": "v1.ObjectFieldSelector",
"description": "Selects a field of the pod; only name and namespace are supported."
},
"resourceFieldRef": {
"$ref": "v1.ObjectFieldSelector"
},
"configMapKeyRef": {
"$ref": "v1.ConfigMapKeySelector",
"description": "Selects a key of a ConfigMap."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yy4 := &x.ObjectMeta
yy4.CodecEncodeSelf(e)
yym5 := z.EncBinary()
_ = yym5
if false {
} else if z.HasExtensions() && z.EncExt(yy4) {
} else {
z.EncFallback(yy4)
}
} else {
r.EncodeNil()
}
Expand All @@ -119,7 +125,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy6 := &x.ObjectMeta
yy6.CodecEncodeSelf(e)
yym7 := z.EncBinary()
_ = yym7
if false {
} else if z.HasExtensions() && z.EncExt(yy6) {
} else {
z.EncFallback(yy6)
}
}
}
if yyr2 || yy2arr2 {
Expand Down Expand Up @@ -255,14 +267,20 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
x.ObjectMeta = pkg2_api.ObjectMeta{}
} else {
yyv4 := &x.ObjectMeta
yyv4.CodecDecodeSelf(d)
yym5 := z.DecBinary()
_ = yym5
if false {
} else if z.HasExtensions() && z.DecExt(yyv4) {
} else {
z.DecFallback(yyv4, false)
}
}
case "status":
if r.TryDecodeAsNil() {
x.Status = TestTypeStatus{}
} else {
yyv5 := &x.Status
yyv5.CodecDecodeSelf(d)
yyv6 := &x.Status
yyv6.CodecDecodeSelf(d)
}
case "kind":
if r.TryDecodeAsNil() {
Expand All @@ -287,50 +305,56 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj8 int
var yyb8 bool
var yyhl8 bool = l >= 0
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
var yyj9 int
var yyb9 bool
var yyhl9 bool = l >= 0
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb8 = r.CheckBreak()
yyb9 = r.CheckBreak()
}
if yyb8 {
if yyb9 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_api.ObjectMeta{}
} else {
yyv9 := &x.ObjectMeta
yyv9.CodecDecodeSelf(d)
yyv10 := &x.ObjectMeta
yym11 := z.DecBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.DecExt(yyv10) {
} else {
z.DecFallback(yyv10, false)
}
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb8 = r.CheckBreak()
yyb9 = r.CheckBreak()
}
if yyb8 {
if yyb9 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = TestTypeStatus{}
} else {
yyv10 := &x.Status
yyv10.CodecDecodeSelf(d)
yyv12 := &x.Status
yyv12.CodecDecodeSelf(d)
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb8 = r.CheckBreak()
yyb9 = r.CheckBreak()
}
if yyb8 {
if yyb9 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
Expand All @@ -340,13 +364,13 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
} else {
x.Kind = string(r.DecodeString())
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb8 = r.CheckBreak()
yyb9 = r.CheckBreak()
}
if yyb8 {
if yyb9 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
Expand All @@ -357,17 +381,17 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
x.APIVersion = string(r.DecodeString())
}
for {
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb8 = r.CheckBreak()
yyb9 = r.CheckBreak()
}
if yyb8 {
if yyb9 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj8-1, "")
z.DecStructFieldNotFound(yyj9-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
Expand Down
18 changes: 16 additions & 2 deletions docs/api-reference/batch/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,13 @@ <h3 id="_v1_envvarsource">v1.EnvVarSource</h3>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceFieldRef</p></td>
<td class="tableblock halign-left valign-top"></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>
Expand Down Expand Up @@ -3408,7 +3415,14 @@ <h3 id="_v1_downwardapivolumefile">v1.DownwardAPIVolumeFile</h3>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">fieldRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: Selects a field of the pod: only annotations, labels, 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">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">resourceFieldRef</p></td>
<td class="tableblock halign-left valign-top"></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>
Expand Down Expand Up @@ -3882,7 +3896,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-04-15 09:27:17 UTC
Last updated 2016-04-19 23:08:39 UTC
</div>
</div>
</body>
Expand Down
18 changes: 16 additions & 2 deletions docs/api-reference/extensions/v1beta1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2317,6 +2317,13 @@ <h3 id="_v1_envvarsource">v1.EnvVarSource</h3>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceFieldRef</p></td>
<td class="tableblock halign-left valign-top"></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>
Expand Down Expand Up @@ -3205,7 +3212,14 @@ <h3 id="_v1_downwardapivolumefile">v1.DownwardAPIVolumeFile</h3>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">fieldRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: Selects a field of the pod: only annotations, labels, 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">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">resourceFieldRef</p></td>
<td class="tableblock halign-left valign-top"></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>
Expand Down Expand Up @@ -5872,7 +5886,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-04-15 09:26:56 UTC
Last updated 2016-04-19 23:08:33 UTC
</div>
</div>
</body>
Expand Down
18 changes: 16 additions & 2 deletions docs/api-reference/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2924,6 +2924,13 @@ <h3 id="_v1_envvarsource">v1.EnvVarSource</h3>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceFieldRef</p></td>
<td class="tableblock halign-left valign-top"></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>
Expand Down Expand Up @@ -4009,7 +4016,14 @@ <h3 id="_v1_downwardapivolumefile">v1.DownwardAPIVolumeFile</h3>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">fieldRef</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required: Selects a field of the pod: only annotations, labels, 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">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">resourceFieldRef</p></td>
<td class="tableblock halign-left valign-top"></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>
Expand Down Expand Up @@ -7742,7 +7756,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-04-15 09:26:34 UTC
Last updated 2016-04-19 23:08:26 UTC
</div>
</div>
</body>
Expand Down
Loading

1 comment on commit 85bfb54

@k8s-teamcity-mesosphere

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 21916 outcome was FAILURE
Summary: Tests failed: 1, passed: 0 Build time: 00:24:04

Failed tests

null: Kubernetes e2e suite.BeforeSuite: <no details avaliable>

Please sign in to comment.