Commit 95b73058 authored by Jeff Mendoza's avatar Jeff Mendoza

Removed non-md files from docs. Moved doc yamls to test/fixtures.

Most of the contents of docs/ has moved to kubernetes.github.io. Development of the docs and accompanying files has continued there, making the copies in this repo stale. I've removed everything but the .md files which remain to redirect old links. The .yaml config files in the docs were used by some tests, these have been moved to test/fixtures/doc-yaml, and can remain there to be used by tests or other purposes.
parent d836b248
# This should be the IP address of the load balancer for all masters
MASTER_IP=<insert-ip-here>
# This should be the internal service IP address reserved for DNS
DNS_IP=<insert-dns-ip-here>
DAEMON_ARGS="$DAEMON_ARGS --api-servers=https://${MASTER_IP} --enable-debugging-handlers=true --cloud-provider=
gce --config=/etc/kubernetes/manifests --allow-privileged=False --v=2 --cluster-dns=${DNS_IP} --cluster-domain=c
luster.local --configure-cbr0=true --cgroup-root=/ --system-container=/system "
This source diff could not be displayed because it is too large. You can view the blob instead.
check process docker with pidfile /var/run/docker.pid
group docker
start program = "/etc/init.d/docker start"
stop program = "/etc/init.d/docker stop"
if does not exist then restart
if failed
unixsocket /var/run/docker.sock
protocol HTTP request "/version"
then restart
\ No newline at end of file
check process kubelet with pidfile /var/run/kubelet.pid
group kubelet
start program = "/etc/init.d/kubelet start"
stop program = "/etc/init.d/kubelet stop"
if does not exist then restart
if failed
host 127.0.0.1
port 10255
protocol HTTP
request "/healthz"
then restart
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -221,9 +221,9 @@ kubectl is modified to support the **ResourceQuota** resource.
For example:
```console
$ kubectl create -f docs/admin/resourcequota/namespace.yaml
$ kubectl create -f test/fixtures/doc-yaml/admin/resourcequota/namespace.yaml
namespace "quota-example" created
$ kubectl create -f docs/admin/resourcequota/quota.yaml --namespace=quota-example
$ kubectl create -f test/fixtures/doc-yaml/admin/resourcequota/quota.yaml --namespace=quota-example
resourcequota "quota" created
$ kubectl describe quota quota --namespace=quota-example
Name: quota
......
......@@ -108,7 +108,7 @@ The above example generates the following links:
## How to Include an Example
While writing examples, you may want to show the content of certain example
files (e.g. [pod.yaml](../user-guide/pod.yaml)). In this case, insert the
files (e.g. [pod.yaml](../../test/fixtures/doc-yaml/user-guide/pod.yaml)). In this case, insert the
following code in the md file:
```
......@@ -125,13 +125,13 @@ out-of-date every time you update the example file.
For example, the following:
```
<!-- BEGIN MUNGE: EXAMPLE ../user-guide/pod.yaml -->
<!-- END MUNGE: EXAMPLE ../user-guide/pod.yaml -->
<!-- BEGIN MUNGE: EXAMPLE ../../test/fixtures/doc-yaml/user-guide/pod.yaml -->
<!-- END MUNGE: EXAMPLE ../../test/fixtures/doc-yaml/user-guide/pod.yaml -->
```
generates the following after `hack/update-munge-docs.sh`:
<!-- BEGIN MUNGE: EXAMPLE ../user-guide/pod.yaml -->
<!-- BEGIN MUNGE: EXAMPLE ../../test/fixtures/doc-yaml/user-guide/pod.yaml -->
```yaml
apiVersion: v1
......@@ -148,8 +148,8 @@ spec:
- containerPort: 80
```
[Download example](../user-guide/pod.yaml?raw=true)
<!-- END MUNGE: EXAMPLE ../user-guide/pod.yaml -->
[Download example](../../test/fixtures/doc-yaml/user-guide/pod.yaml?raw=true)
<!-- END MUNGE: EXAMPLE ../../test/fixtures/doc-yaml/user-guide/pod.yaml -->
## Misc.
......@@ -170,7 +170,7 @@ console code block:
```
```console
$ kubectl create -f docs/user-guide/pod.yaml
$ kubectl create -f test/fixtures/doc-yaml/user-guide/pod.yaml
pod "foo" created
``` 
......@@ -179,7 +179,7 @@ pod "foo" created
which renders as:
```console
$ kubectl create -f docs/user-guide/pod.yaml
$ kubectl create -f test/fixtures/doc-yaml/user-guide/pod.yaml
pod "foo" created
```
......
......@@ -34,7 +34,7 @@ The following instructions show you how to set up a simple, single node Kubernet
Here's a diagram of what the final result will look like:
![Kubernetes Single Node on Docker](../../getting-started-guides/k8s-singlenode-docker.png)
![Kubernetes Single Node on Docker](k8s-singlenode-docker.png)
## Prerequisites
......
......@@ -109,7 +109,7 @@ However you cannot view the nginx start page on localhost. To verify that nginx
You can control the specifications of a pod via a user defined manifest, and reach nginx through your browser on the port specified therein:
```shell
cluster/kubectl.sh create -f docs/user-guide/pod.yaml
cluster/kubectl.sh create -f test/fixtures/doc-yaml/user-guide/pod.yaml
```
Congratulations!
......
......@@ -143,7 +143,7 @@ However you cannot view the nginx start page on localhost. To verify that nginx
You can control the specifications of a pod via a user defined manifest, and reach nginx through your browser on the port specified therein:
```sh
cluster/kubectl.sh create -f docs/user-guide/pod.yaml
cluster/kubectl.sh create -f test/fixtures/doc-yaml/user-guide/pod.yaml
```
Congratulations!
......
enemies=aliens
lives=3
enemies.cheat=true
enemies.cheat.level=noGoodRotten
secret.code.passphrase=UUDDLRLRBABAS
secret.code.allowed=true
secret.code.lives=30
\ No newline at end of file
color.good=purple
color.bad=yellow
allow.textmode=true
how.nice.to.look=fairlyNice
maxmemory 2mb
maxmemory-policy allkeys-lru
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:onbuild
EXPOSE 8080
/*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func printInfo(resp http.ResponseWriter, req *http.Request) {
name := os.Getenv("POD_NAME")
namespace := os.Getenv("POD_NAMESPACE")
fmt.Fprintf(resp, "Backend Container\n")
fmt.Fprintf(resp, "Backend Pod Name: %v\n", name)
fmt.Fprintf(resp, "Backend Namespace: %v\n", namespace)
}
func main() {
http.HandleFunc("/", printInfo)
log.Fatal(http.ListenAndServe(":5000", nil))
}
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:onbuild
EXPOSE 8080
/*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"fmt"
"io"
"log"
"net/http"
"os"
"sort"
"strings"
)
func getKubeEnv() (map[string]string, error) {
environS := os.Environ()
environ := make(map[string]string)
for _, val := range environS {
split := strings.Split(val, "=")
if len(split) != 2 {
return environ, fmt.Errorf("Some weird env vars")
}
environ[split[0]] = split[1]
}
for key := range environ {
if !(strings.HasSuffix(key, "_SERVICE_HOST") ||
strings.HasSuffix(key, "_SERVICE_PORT")) {
delete(environ, key)
}
}
return environ, nil
}
func printInfo(resp http.ResponseWriter, req *http.Request) {
kubeVars, err := getKubeEnv()
if err != nil {
http.Error(resp, err.Error(), http.StatusInternalServerError)
return
}
backendHost := os.Getenv("BACKEND_SRV_SERVICE_HOST")
backendPort := os.Getenv("BACKEND_SRV_SERVICE_PORT")
backendRsp, backendErr := http.Get(fmt.Sprintf(
"http://%v:%v/",
backendHost,
backendPort))
if backendErr == nil {
defer backendRsp.Body.Close()
}
name := os.Getenv("POD_NAME")
namespace := os.Getenv("POD_NAMESPACE")
fmt.Fprintf(resp, "Pod Name: %v \n", name)
fmt.Fprintf(resp, "Pod Namespace: %v \n", namespace)
envvar := os.Getenv("USER_VAR")
fmt.Fprintf(resp, "USER_VAR: %v \n", envvar)
fmt.Fprintf(resp, "\nKubernetes environment variables\n")
var keys []string
for key := range kubeVars {
keys = append(keys, key)
}
sort.Strings(keys)
for _, key := range keys {
fmt.Fprintf(resp, "%v = %v \n", key, kubeVars[key])
}
fmt.Fprintf(resp, "\nFound backend ip: %v port: %v\n", backendHost, backendPort)
if backendErr == nil {
fmt.Fprintf(resp, "Response from backend\n")
io.Copy(resp, backendRsp.Body)
} else {
fmt.Fprintf(resp, "Error from backend: %v", backendErr.Error())
}
}
func main() {
http.HandleFunc("/", printInfo)
log.Fatal(http.ListenAndServe(":8080", nil))
}
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM php:5-apache
ADD index.php /var/www/html/index.php
RUN chmod a+rx index.php
<?php
$x = 0.0001;
for ($i = 0; $i <= 1000000; $i++) {
$x += sqrt($x);
}
echo "OK!";
?>
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM scratch
ADD server /server
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
all: push
server: server.go
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./server.go
container: server
docker build -t gcr.io/google_containers/liveness .
push: container
gcloud docker push gcr.io/google_containers/liveness
clean:
rm -f server
/*
Copyright 2014 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// A simple server that is alive for 10 seconds, then reports unhealthy for
// the rest of its (hopefully) short existence.
package main
import (
"fmt"
"log"
"net/http"
"time"
)
func main() {
started := time.Now()
http.HandleFunc("/started", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(200)
data := (time.Now().Sub(started)).String()
w.Write([]byte(data))
})
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
duration := time.Now().Sub(started)
if duration.Seconds() > 10 {
w.WriteHeader(500)
w.Write([]byte(fmt.Sprintf("error: %v", duration.Seconds())))
} else {
w.WriteHeader(200)
w.Write([]byte("ok"))
}
})
log.Fatal(http.ListenAndServe(":8080", nil))
}
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Makefile for launching synthetic logging sources (any platform)
# and for reporting the forwarding rules for the
# Elasticsearch and Kibana pods for the GCE platform.
# For examples of how to observe the ingested logs please
# see the appropriate getting started guide e.g.
# Google Cloud Logging: https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/logging.md
# With Elasticsearch and Kibana logging: https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/logging-elasticsearch.md
.PHONY: up down logger-up logger-down logger10-up logger10-down
up: logger-up logger10-up
down: logger-down logger10-down
logger-up:
kubectl create -f synthetic_0_25lps.yaml
logger-down:
kubectl delete pod synthetic-logger-0.25lps-pod
logger10-up:
kubectl create -f synthetic_10lps.yaml
logger10-down:
kubectl delete pod synthetic-logger-10lps-pod
File mode changed from 100755 to 100644
#!/bin/bash
# Copyright 2014 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This script will build and push the images necessary for the demo.
set -o errexit
set -o nounset
set -o pipefail
DOCKER_HUB_USER=${DOCKER_HUB_USER:-kubernetes}
set -x
docker build -t "${DOCKER_HUB_USER}/update-demo:kitten" images/kitten
docker build -t "${DOCKER_HUB_USER}/update-demo:nautilus" images/nautilus
docker push "${DOCKER_HUB_USER}/update-demo"
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM kubernetes/test-webserver
COPY html/kitten.jpg kitten.jpg
COPY html/data.json data.json
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM kubernetes/test-webserver
COPY html/nautilus.jpg nautilus.jpg
COPY html/data.json data.json
The MIT License
Copyright (c) 2010-2014 Google, Inc. http://angularjs.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!--
Copyright 2014 Google Inc. 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html ng-app>
<head>
<script src="angular.min.js"></script>
<script src="script.js"></script>
<link rel="stylesheet" href="style.css"></link>
</head>
<body ng-controller="ButtonsCtrl">
<div ng-repeat="server in servers" class="pod">
<img src="/api/v1/proxy/namespaces/default/pods/{{server.podName}}/{{server.image}}" height="100px" width="100px" />
<b>ID:</b> {{server.podName}}<br>
<b>Host:</b> <a href="/api/v1/proxy/namespaces/default/pods/{{server.podName}}/data.json">{{server.host}}</a><br>
<b>Status:</b> {{server.status}}<br>
<b>Image:</b> {{server.dockerImage}}<br>
<b>Labels:</b>
<ul>
<li ng-repeat="(key,value) in server.labels">{{key}}={{value}}</li>
</ul>
</div>
</body>
</html>
/*
Copyright 2014 Google Inc. 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
var base = "/api/v1/";
var updateImage = function($http, server) {
$http.get(base + "proxy/namespaces/default/pods/" + server.podName + "/data.json")
.success(function(data) {
console.log(data);
server.image = data.image;
})
.error(function(data) {
console.log(data);
server.image = "";
});
};
var updateServer = function($http, server) {
$http.get(base + "namespaces/default/pods/" + server.podName)
.success(function(data) {
console.log(data);
server.labels = data.metadata.labels;
server.host = data.status.hostIP.split('.')[0];
server.status = data.status.phase;
server.dockerImage = data.status.containerStatuses[0].image;
updateImage($http, server);
})
.error(function(data) {
console.log(data);
});
};
var updateData = function($scope, $http) {
var servers = $scope.servers;
for (var i = 0; i < servers.length; ++i) {
var server = servers[i];
updateServer($http, server);
}
};
var ButtonsCtrl = function ($scope, $http, $interval) {
$scope.servers = [];
update($scope, $http);
$interval(angular.bind({}, update, $scope, $http), 2000);
};
var getServer = function($scope, name) {
var servers = $scope.servers;
for (var i = 0; i < servers.length; ++i) {
if (servers[i].podName == name) {
return servers[i];
}
}
return null;
};
var isUpdateDemoPod = function(pod) {
return pod.metadata && pod.metadata.labels && pod.metadata.labels.name == "update-demo";
};
var update = function($scope, $http) {
if (!$http) {
console.log("No HTTP!");
return;
}
$http.get(base + "namespaces/default/pods")
.success(function(data) {
console.log(data);
var newServers = [];
for (var i = 0; i < data.items.length; ++i) {
var pod = data.items[i];
if (!isUpdateDemoPod(pod)) {
continue;
}
var server = getServer($scope, pod.metadata.name);
if (server == null) {
server = { "podName": pod.metadata.name };
}
newServers.push(server);
}
$scope.servers = newServers;
updateData($scope, $http);
})
.error(function(data) {
console.log("ERROR: " + data);
})
};
/*
Copyright 2014 Google Inc. 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
img {
height: 100px;
width: 100px;
float: right;
background-size: 100px 100px;
background-color: black;
margin-left: 10px;
border: none;
}
ul {
margin-top: 0;
margin-bottom: 0;
}
.pod {
font-family: Roboto, Open Sans, arial;
border: 1px solid black;
border-radius: 5px;
padding: 10px;
margin: 10px;
display: inline-block;
background-color: #D1D1D1;
}
......@@ -191,35 +191,6 @@ func TestExampleObjectSchemas(t *testing.T) {
"redis-master-service": &api.Service{},
"redis-slave-service": &api.Service{},
},
"../docs/user-guide/walkthrough": {
"pod-nginx": &api.Pod{},
"pod-nginx-with-label": &api.Pod{},
"pod-redis": &api.Pod{},
"pod-with-http-healthcheck": &api.Pod{},
"service": &api.Service{},
"replication-controller": &api.ReplicationController{},
"podtemplate": &api.PodTemplate{},
},
"../docs/user-guide/update-demo": {
"kitten-rc": &api.ReplicationController{},
"nautilus-rc": &api.ReplicationController{},
},
"../docs/user-guide/persistent-volumes/volumes": {
"local-01": &api.PersistentVolume{},
"local-02": &api.PersistentVolume{},
"gce": &api.PersistentVolume{},
"nfs": &api.PersistentVolume{},
},
"../docs/user-guide/persistent-volumes/claims": {
"claim-01": &api.PersistentVolumeClaim{},
"claim-02": &api.PersistentVolumeClaim{},
"claim-03": &api.PersistentVolumeClaim{},
},
"../docs/user-guide/persistent-volumes/simpletest": {
"namespace": &api.Namespace{},
"pod": &api.Pod{},
"service": &api.Service{},
},
"../examples/volumes/iscsi": {
"iscsi": &api.Pod{},
},
......@@ -228,23 +199,6 @@ func TestExampleObjectSchemas(t *testing.T) {
"glusterfs-endpoints": &api.Endpoints{},
"glusterfs-service": &api.Service{},
},
"../docs/user-guide/liveness": {
"exec-liveness": &api.Pod{},
"http-liveness": &api.Pod{},
},
"../docs/user-guide": {
"multi-pod": nil,
"pod": &api.Pod{},
"job": &batch.Job{},
"ingress": &extensions.Ingress{},
"nginx-deployment": &extensions.Deployment{},
"new-nginx-deployment": &extensions.Deployment{},
"replication": &api.ReplicationController{},
"deployment": &extensions.Deployment{},
},
"../docs/admin": {
"daemon": &extensions.DaemonSet{},
},
"../examples": {
"scheduler-policy-config": &schedulerapi.Policy{},
"scheduler-policy-config-with-extender": &schedulerapi.Policy{},
......@@ -275,12 +229,6 @@ func TestExampleObjectSchemas(t *testing.T) {
"namespace-dev": &api.Namespace{},
"namespace-prod": &api.Namespace{},
},
"../docs/user-guide/downward-api": {
"dapi-pod": &api.Pod{},
},
"../docs/user-guide/downward-api/volume/": {
"dapi-volume": &api.Pod{},
},
"../examples/elasticsearch": {
"es-rc": &api.ReplicationController{},
"es-svc": &api.Service{},
......@@ -293,20 +241,6 @@ func TestExampleObjectSchemas(t *testing.T) {
"hazelcast-controller": &api.ReplicationController{},
"hazelcast-service": &api.Service{},
},
"../docs/admin/namespaces": {
"namespace-dev": &api.Namespace{},
"namespace-prod": &api.Namespace{},
},
"../docs/admin/limitrange": {
"invalid-pod": &api.Pod{},
"limits": &api.LimitRange{},
"namespace": &api.Namespace{},
"valid-pod": &api.Pod{},
},
"../docs/user-guide/logging-demo": {
"synthetic_0_25lps": &api.Pod{},
"synthetic_10lps": &api.Pod{},
},
"../examples/meteor": {
"meteor-controller": &api.ReplicationController{},
"meteor-service": &api.Service{},
......@@ -328,9 +262,6 @@ func TestExampleObjectSchemas(t *testing.T) {
"nfs-web-rc": &api.ReplicationController{},
"nfs-web-service": &api.Service{},
},
"../docs/user-guide/node-selection": {
"pod": &api.Pod{},
},
"../examples/openshift-origin": {
"openshift-origin-namespace": &api.Namespace{},
"openshift-controller": &api.ReplicationController{},
......@@ -352,22 +283,12 @@ func TestExampleObjectSchemas(t *testing.T) {
"redis-sentinel-controller": &api.ReplicationController{},
"redis-sentinel-service": &api.Service{},
},
"../docs/admin/resourcequota": {
"namespace": &api.Namespace{},
"limits": &api.LimitRange{},
"quota": &api.ResourceQuota{},
},
"../examples/storage/rethinkdb": {
"admin-pod": &api.Pod{},
"admin-service": &api.Service{},
"driver-service": &api.Service{},
"rc": &api.ReplicationController{},
},
"../docs/user-guide/secrets": {
"secret-pod": &api.Pod{},
"secret": &api.Secret{},
"secret-env-pod": &api.Pod{},
},
"../examples/spark": {
"namespace-spark-cluster": &api.Namespace{},
"spark-master-controller": &api.ReplicationController{},
......@@ -480,7 +401,6 @@ func TestReadme(t *testing.T) {
expectedType []runtime.Object
}{
{"../README.md", []runtime.Object{&api.Pod{}}},
{"../docs/user-guide/walkthrough/README.md", []runtime.Object{&api.Pod{}}},
{"../examples/volumes/iscsi/README.md", []runtime.Object{&api.Pod{}}},
}
......
......@@ -107,8 +107,8 @@ kube::etcd::start
# source_file,resource,namespace,name,old_version,new_version
tests=(
docs/user-guide/job.yaml,jobs,default,pi,extensions/v1beta1,batch/v1
docs/user-guide/horizontal-pod-autoscaling/hpa-php-apache.yaml,horizontalpodautoscalers,default,php-apache,extensions/v1beta1,autoscaling/v1
test/fixtures/doc-yaml/user-guide/job.yaml,jobs,default,pi,extensions/v1beta1,batch/v1
test/fixtures/doc-yaml/user-guide/horizontal-pod-autoscaling/hpa-php-apache.yaml,horizontalpodautoscalers,default,php-apache,extensions/v1beta1,autoscaling/v1
)
# need to include extensions/v1beta1 in new api version because its internal types are used by jobs
......
......@@ -42,7 +42,8 @@ go-bindata -nometadata -prefix "${KUBE_ROOT}" -o ${BINDATA_OUTPUT} -pkg generate
"${KUBE_ROOT}/examples/..." \
"${KUBE_ROOT}/docs/user-guide/..." \
"${KUBE_ROOT}/test/e2e/testing-manifests/..." \
"${KUBE_ROOT}/test/images/..."
"${KUBE_ROOT}/test/images/..." \
"${KUBE_ROOT}/test/fixtures/..."
gofmt -s -w ${BINDATA_OUTPUT}
......
......@@ -253,7 +253,7 @@ var aRC string = `
func TestPathBuilderAndVersionedObjectNotDefaulted(t *testing.T) {
b := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClient(), testapi.Default.Codec()).
FilenameParam(false, false, "../../../docs/user-guide/update-demo/kitten-rc.yaml")
FilenameParam(false, false, "../../../test/fixtures/pkg/kubectl/builder/kitten-rc.yaml")
test := &testVisitor{}
singular := false
......
......@@ -352,7 +352,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
framework.KubeDescribe("Liveness", func() {
It("liveness pods should be automatically restarted", func() {
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "docs/user-guide/liveness", file)
return filepath.Join(framework.TestContext.RepoRoot, "test/fixtures/doc-yaml/user-guide/liveness", file)
}
execYaml := mkpath("exec-liveness.yaml")
httpYaml := mkpath("http-liveness.yaml")
......@@ -402,7 +402,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
framework.KubeDescribe("Secret", func() {
It("should create a pod that reads a secret", func() {
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "docs/user-guide/secrets", file)
return filepath.Join(framework.TestContext.RepoRoot, "test/fixtures/doc-yaml/user-guide/secrets", file)
}
secretYaml := mkpath("secret.yaml")
podYaml := mkpath("secret-pod.yaml")
......@@ -424,7 +424,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
framework.KubeDescribe("Downward API", func() {
It("should create a pod that prints his name and namespace", func() {
mkpath := func(file string) string {
return filepath.Join(framework.TestContext.RepoRoot, "docs/user-guide/downward-api", file)
return filepath.Join(framework.TestContext.RepoRoot, "test/fixtures/doc-yaml/user-guide/downward-api", file)
}
podYaml := mkpath("dapi-pod.yaml")
nsFlag := fmt.Sprintf("--namespace=%v", ns)
......
......@@ -198,7 +198,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
framework.KubeDescribe("Update Demo", func() {
var nautilus, kitten []byte
BeforeEach(func() {
updateDemoRoot := "docs/user-guide/update-demo"
updateDemoRoot := "test/fixtures/doc-yaml/user-guide/update-demo"
nautilus = framework.ReadOrDie(filepath.Join(updateDemoRoot, "nautilus-rc.yaml"))
kitten = framework.ReadOrDie(filepath.Join(updateDemoRoot, "kitten-rc.yaml"))
})
......
## Obsolete Config Files From Docs
These config files were orginally from docs, but have been separated
and put here to be used by various tests.
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/test/fixtures/doc-yaml/README.md?pixel)]()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment