From b38e114889bc2a7cded91554c80fa6fabde84e32 Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Mon, 2 Nov 2015 23:32:42 -0500 Subject: [PATCH 1/3] Suppress output from running which sw_vers --- cluster/gce/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index d07859129e9..6d8d0d63f78 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -740,7 +740,7 @@ function kube-up { # curl in mavericks is borked. secure="" - if which sw_vers > /dev/null; then + if which sw_vers >& /dev/null; then if [[ $(sw_vers | grep ProductVersion | awk '{print $2}') = "10.9."* ]]; then secure="--insecure" fi From 75b1e6ec44a70c5b3eb90b84fef0b8c5306cb23b Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Mon, 2 Nov 2015 20:00:22 -0500 Subject: [PATCH 2/3] Fix panic bringing up e2e cluster when kubeconfig is empty --- pkg/kubectl/cmd/config/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/kubectl/cmd/config/config.go b/pkg/kubectl/cmd/config/config.go index d73ea26804e..9c8fd465ba3 100644 --- a/pkg/kubectl/cmd/config/config.go +++ b/pkg/kubectl/cmd/config/config.go @@ -225,6 +225,7 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela configToWrite := getConfigFromFileOrDie(destinationFile) t := *cluster + configToWrite.Clusters[key] = &t configToWrite.Clusters[key].LocationOfOrigin = destinationFile if relativizePaths { @@ -429,6 +430,10 @@ func getConfigFromFileOrDie(filename string) *clientcmdapi.Config { return clientcmdapi.NewConfig() } + if config.Clusters == nil { + config.Clusters = map[string]*clientcmdapi.Cluster{} + } + return config } From ff88cc4df96357f3c842fb9302de418c424be07a Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Mon, 2 Nov 2015 13:55:01 -0500 Subject: [PATCH 3/3] Allow security context in GCE clusters --- cluster/gce/config-default.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 97e93ab7dc9..0b53d45b579 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -113,7 +113,7 @@ if [[ "${ENABLE_DAEMONSETS}" == "true" ]]; then fi # Admission Controllers to invoke prior to persisting objects in cluster -ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota +ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,ServiceAccount,ResourceQuota # Optional: if set to true kube-up will automatically check for existing resources and clean them up. KUBE_UP_AUTOMATIC_CLEANUP=${KUBE_UP_AUTOMATIC_CLEANUP:-false}