From 48d5a1da8b5877c5cf4984cbfae7cf6d5006c540 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 11 Jun 2014 12:50:41 -0700 Subject: [PATCH 1/5] Ignore go test binaries --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 0ccb1dada9a..4cdfae96d75 100755 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ # Emacs save files *~ + +# Go test binaries +*.test From 59d9763a528269fb6989f23ef9c8bc81f3b10c65 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 11 Jun 2014 13:03:46 -0700 Subject: [PATCH 2/5] remove package name, not needed here --- cmd/integration/integration.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 02998527f1d..ac3967ad1ba 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -13,6 +13,7 @@ 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 basic integration test for the service. // Assumes that there is a pre-existing etcd server running on localhost. package main @@ -26,7 +27,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" - kube_client "github.com/GoogleCloudPlatform/kubernetes/pkg/client" + "github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry" "github.com/coreos/go-etcd/etcd" ) @@ -42,13 +43,13 @@ func main() { reg := registry.MakeEtcdRegistry(etcdClient, machineList) apiserver := apiserver.New(map[string]apiserver.RESTStorage{ - "pods": registry.MakePodRegistryStorage(reg, &kube_client.FakeContainerInfo{}, registry.MakeRoundRobinScheduler(machineList)), + "pods": registry.MakePodRegistryStorage(reg, &client.FakeContainerInfo{}, registry.MakeRoundRobinScheduler(machineList)), "replicationControllers": registry.MakeControllerRegistryStorage(reg), }, "/api/v1beta1") server := httptest.NewServer(apiserver) controllerManager := registry.MakeReplicationManager(etcd.NewClient(servers), - kube_client.Client{ + client.Client{ Host: server.URL, }) @@ -60,7 +61,7 @@ func main() { // Wait for the synchronization threads to come up. time.Sleep(time.Second * 10) - kubeClient := kube_client.Client{ + kubeClient := client.Client{ Host: server.URL, } data, err := ioutil.ReadFile("api/examples/controller.json") From 88b9c7ba793fc1b3aec643c412adf4f17c9230ba Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 11 Jun 2014 16:57:47 -0700 Subject: [PATCH 3/5] Move storage of password --- cluster/kube-up.sh | 9 +-------- cluster/util.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cluster/kube-up.sh b/cluster/kube-up.sh index 70a4e9339cb..3da66e7abe7 100755 --- a/cluster/kube-up.sh +++ b/cluster/kube-up.sh @@ -46,15 +46,8 @@ KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX) trap "rm -rf ${KUBE_TEMP}" EXIT get-password -echo "Generating password: $user:$passwd" +echo "Using password: $user:$passwd" htpasswd -b -c ${KUBE_TEMP}/htpasswd $user $passwd -cat << EOF > ~/.kubernetes_auth -{ - "User": "$user", - "Password": "$passwd" -} -EOF -chmod 0600 ~/.kubernetes_auth HTPASSWD=$(cat ${KUBE_TEMP}/htpasswd) ( diff --git a/cluster/util.sh b/cluster/util.sh index 0419238d2a5..51f5acd8b1a 100755 --- a/cluster/util.sh +++ b/cluster/util.sh @@ -89,5 +89,14 @@ function get-password { fi user=admin passwd=$(python -c 'import string,random; print "".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16))') + + # Store password for reuse. + cat << EOF > ~/.kubernetes_auth +{ + "User": "$user", + "Password": "$passwd" +} +EOF + chmod 0600 ~/.kubernetes_auth } From 4f848b6d3b472cdf4dc9aefe7ad3606b15dcf117 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 11 Jun 2014 17:01:02 -0700 Subject: [PATCH 4/5] Need proper package comment. --- pkg/util/util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/util/util.go b/pkg/util/util.go index 1ad36f6788c..8d71eb91cce 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -13,6 +13,7 @@ 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 util import ( From 12c1d660a354c096f36e9d14ddfbba0f76b7bd46 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 11 Jun 2014 17:10:10 -0700 Subject: [PATCH 5/5] Fix link --- pkg/api/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/types.go b/pkg/api/types.go index 9689bd3396a..38179c4c7ec 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -19,7 +19,7 @@ limitations under the License. package api // ContainerManifest corresponds to the Container Manifest format, documented at: -// https://developers.google.com/compute/docs/containers#container_manifest +// https://developers.google.com/compute/docs/containers/container_vms#container_manifest // This is used as the representation of Kubernete's workloads. type ContainerManifest struct { Version string `yaml:"version" json:"version"`