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

Expose images list of a node #18248

Merged
merged 2 commits into from
Jan 12, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -13503,6 +13503,9 @@
"v1.NodeStatus": {
"id": "v1.NodeStatus",
"description": "NodeStatus is information about the current status of a node.",
"required": [
"images"
],
"properties": {
"capacity": {
"type": "any",
Expand Down Expand Up @@ -13537,6 +13540,13 @@
"nodeInfo": {
"$ref": "v1.NodeSystemInfo",
"description": "Set of ids/uuids to uniquely identify the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info"
},
"images": {
"type": "array",
"items": {
"$ref": "v1.ContainerImage"
},
"description": "List of container images on this node"
}
}
},
Expand Down Expand Up @@ -13664,6 +13674,27 @@
}
}
},
"v1.ContainerImage": {
"id": "v1.ContainerImage",
"description": "Describe a container image",
"required": [
"repoTags"
],
"properties": {
"repoTags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]"
},
"size": {
"type": "integer",
"format": "int64",
"description": "The size of the image in bytes."
}
}
},
"v1.PersistentVolumeClaimList": {
"id": "v1.PersistentVolumeClaimList",
"description": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.",
Expand Down
50 changes: 49 additions & 1 deletion docs/api-reference/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -3906,6 +3906,13 @@ <h3 id="_v1_nodestatus">v1.NodeStatus</h3>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_nodesysteminfo">v1.NodeSystemInfo</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">images</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">List of container images on this node</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"><a href="#_v1_containerimage">v1.ContainerImage</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -5753,6 +5760,47 @@ <h3 id="_v1_containerstatus">v1.ContainerStatus</h3>
</tbody>
</table>

</div>
<div class="sect2">
<h3 id="_v1_containerimage">v1.ContainerImage</h3>
<div class="paragraph">
<p>Describe a container image</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">repoTags</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Names by which this image is known. e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]</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 array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">size</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The size of the image in bytes.</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">integer (int64)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

</div>
<div class="sect2">
<h3 id="_v1_replicationcontrollerlist">v1.ReplicationControllerList</h3>
Expand Down Expand Up @@ -7001,7 +7049,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2015-12-29 09:07:07 UTC
Last updated 2016-01-08 09:05:37 UTC
</div>
</div>
</body>
Expand Down
24 changes: 24 additions & 0 deletions pkg/api/deep_copy_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func init() {
deepCopy_api_ComponentStatus,
deepCopy_api_ComponentStatusList,
deepCopy_api_Container,
deepCopy_api_ContainerImage,
deepCopy_api_ContainerPort,
deepCopy_api_ContainerState,
deepCopy_api_ContainerStateRunning,
Expand Down Expand Up @@ -392,6 +393,18 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner)
return nil
}

func deepCopy_api_ContainerImage(in ContainerImage, out *ContainerImage, c *conversion.Cloner) error {
if in.RepoTags != nil {
in, out := in.RepoTags, &out.RepoTags
*out = make([]string, len(in))
copy(*out, in)
} else {
out.RepoTags = nil
}
out.Size = in.Size
return nil
}

func deepCopy_api_ContainerPort(in ContainerPort, out *ContainerPort, c *conversion.Cloner) error {
out.Name = in.Name
out.HostPort = in.HostPort
Expand Down Expand Up @@ -1304,6 +1317,17 @@ func deepCopy_api_NodeStatus(in NodeStatus, out *NodeStatus, c *conversion.Clone
if err := deepCopy_api_NodeSystemInfo(in.NodeInfo, &out.NodeInfo, c); err != nil {
return err
}
if in.Images != nil {
in, out := in.Images, &out.Images
*out = make([]ContainerImage, len(in))
for i := range in {
if err := deepCopy_api_ContainerImage(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Images = nil
}
return nil
}

Expand Down