Switch to github.com/golang/dep for vendoring
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
d6ab91be27
commit
8e5b17cf13
15431 changed files with 3971413 additions and 8881 deletions
2
vendor/k8s.io/kubernetes/examples/kubectl-container/.gitignore
generated
vendored
Normal file
2
vendor/k8s.io/kubernetes/examples/kubectl-container/.gitignore
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
kubectl
|
||||
.tag
|
17
vendor/k8s.io/kubernetes/examples/kubectl-container/Dockerfile
generated
vendored
Normal file
17
vendor/k8s.io/kubernetes/examples/kubectl-container/Dockerfile
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
# 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 kubectl kubectl
|
||||
ENTRYPOINT ["/kubectl"]
|
48
vendor/k8s.io/kubernetes/examples/kubectl-container/Makefile
generated
vendored
Normal file
48
vendor/k8s.io/kubernetes/examples/kubectl-container/Makefile
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
# 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.
|
||||
|
||||
# Use:
|
||||
#
|
||||
# `make kubectl` will build kubectl.
|
||||
# `make tag` will suggest a tag.
|
||||
# `make container` will build a container-- you must supply a tag.
|
||||
# `make push` will push the container-- you must supply a tag.
|
||||
|
||||
GOARCH?=$(shell go env GOARCH)
|
||||
GOOS?=$(shell go env GOOS)
|
||||
|
||||
kubectl:
|
||||
make -C ../../ WHAT=cmd/kubectl KUBE_STATIC_OVERRIDES="kubectl"; \
|
||||
cp ../../_output/local/bin/$(GOOS)/$(GOARCH)/kubectl .
|
||||
|
||||
.tag: kubectl
|
||||
./kubectl version --client | grep -o 'GitVersion:"[^"]*"' | sed 's/[^"]*"\([^"+]*\).*/\1/' > .tag
|
||||
|
||||
tag: .tag
|
||||
@echo "Suggest using TAG=$(shell cat .tag)"
|
||||
@echo "$$ make container TAG=$(shell cat .tag)"
|
||||
@echo "or"
|
||||
@echo "$$ make push TAG=$(shell cat .tag)"
|
||||
|
||||
container:
|
||||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' to see a suggestion))
|
||||
docker build --pull -t gcr.io/google_containers/kubectl:$(TAG) .
|
||||
|
||||
push: container
|
||||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' to see a suggestion))
|
||||
gcloud docker -- push gcr.io/google_containers/kubectl:$(TAG)
|
||||
|
||||
clean:
|
||||
rm -f kubectl
|
||||
rm -f .tag
|
31
vendor/k8s.io/kubernetes/examples/kubectl-container/README.md
generated
vendored
Normal file
31
vendor/k8s.io/kubernetes/examples/kubectl-container/README.md
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
To access the Kubernetes API [from a Pod](../../docs/user-guide/accessing-the-cluster.md#accessing-the-api-from-a-pod) one of the solution is to run `kubectl proxy` in a so-called sidecar container within the Pod. To do this, you need to package `kubectl` in a container. It is useful when service accounts are being used for accessing the API and the old no-auth KUBERNETES_RO service is not available. Since all containers in a Pod share the same network namespace, containers will be able to reach the API on localhost.
|
||||
|
||||
This example contains a [Dockerfile](Dockerfile) and [Makefile](Makefile) for packaging up `kubectl` into
|
||||
a container and pushing the resulting container image on the Google Container Registry. You can modify the Makefile to push to a different registry if needed.
|
||||
|
||||
Assuming that you have checked out the Kubernetes source code and setup your environment to be able to build it. The typical build step of this kubectl container will be:
|
||||
|
||||
$ cd examples/kubectl-container
|
||||
$ make kubectl
|
||||
$ make tag
|
||||
$ make container
|
||||
$ make push
|
||||
|
||||
It is not currently automated as part of a release process, so for the moment
|
||||
this is an example of what to do if you want to package `kubectl` into a
|
||||
container and use it within a pod.
|
||||
|
||||
In the future, we may release consistently versioned groups of containers when
|
||||
we cut a release, in which case the source of gcr.io/google_containers/kubectl
|
||||
would become that automated process.
|
||||
|
||||
[```pod.json```](pod.json) is provided as an example of running `kubectl` as a sidecar
|
||||
container in a Pod, and to help you verify that `kubectl` works correctly in
|
||||
this configuration. To launch this Pod, you will need a configured Kubernetes endpoint and `kubectl` installed locally, then simply create the Pod:
|
||||
|
||||
$ kubectl create -f pod.json
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
53
vendor/k8s.io/kubernetes/examples/kubectl-container/pod.json
generated
vendored
Normal file
53
vendor/k8s.io/kubernetes/examples/kubectl-container/pod.json
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"kind": "Pod",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "kubectl-tester"
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "bb",
|
||||
"image": "gcr.io/google_containers/busybox",
|
||||
"command": [
|
||||
"sh", "-c", "sleep 5; wget -O - ${KUBERNETES_RO_SERVICE_HOST}:${KUBERNETES_RO_SERVICE_PORT}/api/v1/pods/; sleep 10000"
|
||||
],
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8080
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "KUBERNETES_RO_SERVICE_HOST",
|
||||
"value": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"name": "KUBERNETES_RO_SERVICE_PORT",
|
||||
"value": "8001"
|
||||
}
|
||||
],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "test-volume",
|
||||
"mountPath": "/mount/test-volume"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "kubectl",
|
||||
"image": "gcr.io/google_containers/kubectl:v0.18.0-120-gaeb4ac55ad12b1-dirty",
|
||||
"imagePullPolicy": "Always",
|
||||
"args": [
|
||||
"proxy", "-p", "8001"
|
||||
]
|
||||
}
|
||||
],
|
||||
"volumes": [
|
||||
{
|
||||
"name": "test-volume",
|
||||
"emptyDir": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue