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
This commit is contained in:
committed by
Andrew Chen
parent
64aa7c0a66
commit
ab0bd00e74
@@ -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
|
|
||||||
|
|
||||||
@@ -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
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
This image has moved to https://github.com/kubernetes/kubernetes/tree/master/test/images/liveness
|
||||||
@@ -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))
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
@@ -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
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
This image has moved to https://github.com/kubernetes/kubernetes/tree/master/test/images/kitten
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"image": "kitten.jpg"
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@@ -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
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
This image has moved to https://github.com/kubernetes/kubernetes/tree/master/test/images/nautilus
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"image": "nautilus.jpg"
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
@@ -12,3 +12,6 @@ docs/user-guide/pods/_viewing-a-pod.md
|
|||||||
docs/user-guide/simple-yaml.md
|
docs/user-guide/simple-yaml.md
|
||||||
docs/concepts/abstractions/pod-termination.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
|
||||||
|
|||||||
+3
-18
@@ -128,7 +128,6 @@ docs/user-guide/walkthrough/index.md
|
|||||||
docs/user-guide/walkthrough/k8s201.md
|
docs/user-guide/walkthrough/k8s201.md
|
||||||
docs/user-guide/working-with-resources.md
|
docs/user-guide/working-with-resources.md
|
||||||
docs/whatisk8s.md
|
docs/whatisk8s.md
|
||||||
|
|
||||||
docs/user-guide/configmap/index.md
|
docs/user-guide/configmap/index.md
|
||||||
docs/user-guide/horizontal-pod-autoscaling/walkthrough.md
|
docs/user-guide/horizontal-pod-autoscaling/walkthrough.md
|
||||||
docs/getting-started-guides/network-policy/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/admin/node-allocatable.md
|
||||||
docs/user-guide/jobs/expansions/index.md
|
docs/user-guide/jobs/expansions/index.md
|
||||||
docs/user-guide/ui/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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user