Merge pull request #15788 from caesarxuchao/gen-docs-extensions

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-10-18 18:02:09 -07:00
commit 67cb65d906
11 changed files with 11263 additions and 1865 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
<!-- BEGIN STRIP_FOR_RELEASE -->
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.
<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/docs/api-reference/extensions/v1beta1/definitions.md).
Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--
<!-- END STRIP_FOR_RELEASE -->
<!-- END MUNGE: UNVERSIONED_WARNING -->
<!-- needed for gh-pages to render html files when imported -->
{% include definitions.html %}
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/api-reference/extensions/v1beta1/definitions.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
<!-- BEGIN STRIP_FOR_RELEASE -->
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.
<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/docs/api-reference/extensions/v1beta1/operations.md).
Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--
<!-- END STRIP_FOR_RELEASE -->
<!-- END MUNGE: UNVERSIONED_WARNING -->
<!-- needed for gh-pages to render html files when imported -->
{% include operations.html %}
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/api-reference/extensions/v1beta1/operations.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->

View File

@ -1727,10 +1727,6 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_api_patch">api.Patch</h3>
</div>
<div class="sect2">
<h3 id="_v1_limitrangespec">v1.LimitRangeSpec</h3>
@ -1916,6 +1912,12 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_unversioned_patch">unversioned.Patch</h3>
<div class="paragraph">
<p>Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.</p>
</div>
</div>
<div class="sect2">
<h3 id="_v1_persistentvolumeclaim">v1.PersistentVolumeClaim</h3>
@ -3436,6 +3438,13 @@ The resulting set of endpoints can be viewed as:<br>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">securityContext</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">SecurityContext holds pod-level security attributes and common container settings</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_podsecuritycontext">v1.PodSecurityContext</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">imagePullSecrets</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: <a href="http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod">http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
@ -4822,6 +4831,12 @@ The resulting set of endpoints can be viewed as:<br>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_podsecuritycontext">v1.PodSecurityContext</h3>
<div class="paragraph">
<p>PodSecurityContext holds pod-level security attributes and common container settings.</p>
</div>
</div>
<div class="sect2">
<h3 id="_v1_replicationcontrollerstatus">v1.ReplicationControllerStatus</h3>
@ -6782,7 +6797,7 @@ The resulting set of endpoints can be viewed as:<br>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2015-10-03 00:18:39 UTC
Last updated 2015-10-16 18:20:03 UTC
</div>
</div>
</body>

View File

@ -20,7 +20,7 @@ refer to the docs that go with that version.
<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/docs/api-reference/definitions.md).
[here](http://releases.k8s.io/release-1.0/docs/api-reference/v1/definitions.md).
Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
@ -34,6 +34,8 @@ Documentation for other releases can be found at
{% include definitions.html %}
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/api-reference/definitions.md?pixel)]()
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/api-reference/v1/definitions.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->

View File

@ -20,7 +20,7 @@ refer to the docs that go with that version.
<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/docs/api-reference/operations.md).
[here](http://releases.k8s.io/release-1.0/docs/api-reference/v1/operations.md).
Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
@ -34,6 +34,8 @@ Documentation for other releases can be found at
{% include operations.html %}
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/api-reference/operations.md?pixel)]()
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/api-reference/v1/operations.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->

View File

@ -12,6 +12,6 @@ COPY gen-swagger-docs.sh build/
#run the script once to download the dependent java libraries into the image
RUN mkdir /output
RUN build/gen-swagger-docs.sh https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/api/swagger-spec/v1.json https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/pkg/api/v1/register.go
RUN build/gen-swagger-docs.sh v1 https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/api/swagger-spec/v1.json https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/pkg/api/v1/register.go
ENTRYPOINT ["build/gen-swagger-docs.sh"]

View File

@ -20,13 +20,10 @@ set -o errexit
set -o nounset
set -o pipefail
echo $1
echo $2
cd /build/
wget "$1" -O input.json
wget "$2" -O register.go
wget "$2" -O input.json
wget "$3" -O register.go
./gradle-2.5/bin/gradle gendocs --info
@ -36,9 +33,9 @@ top_level_models=$(grep IsAnAPIObject ./register.go | sed 's/func (\*\(.*\)) IsA
| tr -d '()' | tr -d '{}' | tr -d ' ')
for m in $top_level_models
do
if grep -xq "=== v1.$m" ./definitions.adoc
if grep -xq "=== $1.$m" ./definitions.adoc
then
buf+="* <<v1."$m">>\n"
buf+="* <<$1."$m">>\n"
fi
done
sed -i "1i $buf" ./definitions.adoc

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Copyright 2014 The Kubernetes Authors All rights reserved.
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -14,10 +14,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if [ "$#" -lt 1 ]; then
echo "Usage: run-gen-swagger-docs.sh <API version> <absolute output path, default to PWD>"
exit
fi
OUTPUT=${2:-${PWD}}
set -o errexit
set -o nounset
set -o pipefail
docker run -v ${OUTPUT}:/output gcr.io/google_containers/gen-swagger-docs:v1.1 https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/$1.json https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg/api/$1/register.go
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
V1_PATH="$PWD/${KUBE_ROOT}/docs/api-reference/v1/"
V1BETA1_PATH="$PWD/${KUBE_ROOT}/docs/api-reference/extensions/v1beta1"
mkdir -p $V1_PATH
mkdir -p $V1BETA1_PATH
docker run -v $V1_PATH:/output gcr.io/google_containers/gen-swagger-docs:v2 \
v1 \
https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1.json \
https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg/api/v1/register.go
docker run -v $V1BETA1_PATH:/output gcr.io/google_containers/gen-swagger-docs:v2 \
v1beta1 \
https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1beta1.json \
https://raw.githubusercontent.com/kubernetes/kubernetes/master/pkg/apis/extensions/v1beta1/register.go