Move update-demo and liveness images to kubernetes/test/images (#4536)

* Move update-demo and liveness images to kubernetes/test/images

* Skip the README.md files
pull/4380/head^2
Manjunath A Kumatagi 2017-08-01 15:26:20 +05:30 committed by Andrew Chen
parent 64aa7c0a66
commit ab0bd00e74
15 changed files with 10 additions and 180 deletions

View File

@ -1,18 +0,0 @@
# Copyright 2016 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.
# 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

View File

@ -1,27 +0,0 @@
# Copyright 2016 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.
# 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

View File

@ -0,0 +1 @@
This image has moved to https://github.com/kubernetes/kubernetes/tree/master/test/images/liveness

View File

@ -1,46 +0,0 @@
/*
Copyright 2014 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.
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))
}

View File

@ -1,30 +0,0 @@
#!/bin/bash
# Copyright 2014 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.
# 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"

View File

@ -1,17 +0,0 @@
# Copyright 2016 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.
# 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

View File

@ -0,0 +1 @@
This image has moved to https://github.com/kubernetes/kubernetes/tree/master/test/images/kitten

View File

@ -1,3 +0,0 @@
{
"image": "kitten.jpg"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,17 +0,0 @@
# Copyright 2016 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.
# 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

View File

@ -0,0 +1 @@
This image has moved to https://github.com/kubernetes/kubernetes/tree/master/test/images/nautilus

View File

@ -1,3 +0,0 @@
{
"image": "nautilus.jpg"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -11,4 +11,7 @@ docs/api-reference/v1/operations.md
docs/user-guide/pods/_viewing-a-pod.md
docs/user-guide/simple-yaml.md
docs/concepts/abstractions/pod-termination.md
docs/contribute/README.md
docs/contribute/README.md
docs/user-guide/liveness/image/README.md
docs/user-guide/update-demo/images/kitten/README.md
docs/user-guide/update-demo/images/nautilus/README.md

View File

@ -128,7 +128,6 @@ docs/user-guide/walkthrough/index.md
docs/user-guide/walkthrough/k8s201.md
docs/user-guide/working-with-resources.md
docs/whatisk8s.md
docs/user-guide/configmap/index.md
docs/user-guide/horizontal-pod-autoscaling/walkthrough.md
docs/getting-started-guides/network-policy/walkthrough.md
@ -149,20 +148,6 @@ docs/admin/garbage-collection.md
docs/admin/node-allocatable.md
docs/user-guide/jobs/expansions/index.md
docs/user-guide/ui/index.md
docs/user-guide/liveness/image/README.md
docs/user-guide/update-demo/images/kitten/README.md
docs/user-guide/update-demo/images/nautilus/README.md