forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes#9211 from lavalamp/no-ro-nonbreaking
Nonbreaking pieces of kubernetes#8155
- Loading branch information
Showing
23 changed files
with
209 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
.PHONY: elasticsearch_logging_discovery build push | ||
|
||
TAG = 1.3 | ||
# Keep this one version ahead to help prevent accidental pushes. | ||
TAG = 1.4 | ||
|
||
build: elasticsearch_logging_discovery | ||
build: elasticsearch_logging_discovery | ||
docker build -t gcr.io/google_containers/elasticsearch:$(TAG) . | ||
|
||
push: | ||
push: | ||
gcloud preview docker push gcr.io/google_containers/elasticsearch:$(TAG) | ||
|
||
elasticsearch_logging_discovery: | ||
go build elasticsearch_logging_discovery.go | ||
|
||
clean: | ||
rm elasticsearch_logging_discovery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
kubectl | ||
.tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 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. | ||
|
||
FROM scratch | ||
MAINTAINER Daniel Smith <[email protected]> | ||
ADD kubectl kubectl | ||
ENTRYPOINT ["/kubectl"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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. | ||
|
||
kubectl: | ||
KUBE_STATIC_OVERRIDES="kubectl" ../../hack/build-go.sh cmd/kubectl; cp ../../_output/local/bin/linux/amd64/kubectl . | ||
|
||
.tag: kubectl | ||
./kubectl version -c | grep -o 'GitVersion:"[^"]*"' | cut -f 2 -d '"' > .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 -t gcr.io/google_containers/kubectl:$(TAG) . | ||
|
||
push: container | ||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' to see a suggestion)) | ||
gcloud preview docker push gcr.io/google_containers/kubectl:$(TAG) | ||
|
||
clean: | ||
rm -f kubectl | ||
rm -f .tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
This directory contains a Dockerfile and Makefile for packaging up kubectl into | ||
a container. | ||
|
||
It's 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/your 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``` is provided as an example of packaging kubectl as a sidecar | ||
container, and to help you verify that kubectl works correctly in | ||
this configuration. | ||
|
||
A possible reason why you would want to do this is to use ```kubectl proxy``` as | ||
a drop-in replacement for the old no-auth KUBERNETES_RO service. The other | ||
containers in your pod will find the proxy apparently serving on localhost. | ||
|
||
|
||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/kubectl-container/README.md?pixel)]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"kind": "Pod", | ||
"apiVersion": "v1beta3", | ||
"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/v1beta3/pods/; sleep 10000" | ||
], | ||
"ports": [ | ||
{ | ||
"containerPort": 8080, | ||
"protocol": "TCP" | ||
} | ||
], | ||
"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": {} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.