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 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 } 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") 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"` 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 (