Skip to content

Commit 67486ff

Browse files
author
OpenShift Bot
committed
Merge pull request #1755 from deads2k/deads-start-simplifying-loading
Merged by openshift-bot
2 parents 94b01fc + 6e7fa37 commit 67486ff

File tree

15 files changed

+220
-347
lines changed

15 files changed

+220
-347
lines changed

Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/config/config.go

Lines changed: 78 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/routing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Once it is pulled it will start and be visible in the `docker ps` list of contai
3232
[vagrant@openshiftdev origin]$ sudo /data/src/github.com/openshift/origin/_output/local/bin/linux/amd64/openshift start &
3333

3434
If running in https mode, ensure osc can authenticate to the master
35-
[vagrant@openshiftdev origin]$ export KUBECONFIG=/data/src/github.com/openshift/origin/openshift.local.certificates/admin/.kubeconfig
36-
[vagrant@openshiftdev origin]$ sudo chmod a+r "$KUBECONFIG"
35+
[vagrant@openshiftdev origin]$ export OPENSHIFTCONFIG=/data/src/github.com/openshift/origin/openshift.local.certificates/admin/.kubeconfig
36+
[vagrant@openshiftdev origin]$ sudo chmod a+r "$OPENSHIFTCONFIG"
3737
[vagrant@openshiftdev origin]$ sudo chmod a+r openshift.local.certificates/openshift-router/.kubeconfig
3838
[vagrant@openshiftdev origin]$ openshift ex router --create --credentials="openshift.local.certificates/openshift-router/.kubeconfig"
3939
[vagrant@openshiftdev origin]$ osc get pods
@@ -44,7 +44,7 @@ Once it is pulled it will start and be visible in the `docker ps` list of contai
4444
$ export OPENSHIFT_DEV_CLUSTER=true
4545
$ vagrant up
4646
$ vagrant ssh master
47-
[vagrant@openshift-master ~]$ openshift ex router --create --credentials="${KUBECONFIG}"
47+
[vagrant@openshift-master ~]$ openshift ex router --create --credentials="${OPENSHIFTCONFIG}"
4848

4949

5050

examples/jenkins/job.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ users:
4040
<builders>
4141
<hudson.tasks.Shell>
4242
<command>
43-
export KUBECONFIG=.kubeconfig
44-
echo "${KUBECONFIG_CREDENTIALS}" > "${KUBECONFIG}"
43+
export OPENSHIFTCONFIG=.kubeconfig
44+
echo "${KUBECONFIG_CREDENTIALS}" > "${OPENSHIFTCONFIG}"
4545

4646
TEST_ENDPOINT=`osc get services -n test | grep frontend-test | awk '{print $4":"$5}'`
4747

examples/sample-app/container-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ step #3.
6868

6969
## Deploy the private docker registry
7070

71-
$ openshift ex registry --create --credentials="${KUBECONFIG}"
71+
$ openshift ex registry --create --credentials="${OPENSHIFTCONFIG}"
7272
$ cd examples/sample-app
7373

7474
For more information on this step, see [Application Build, Deploy, and Update

hack/test-cmd.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ trap "cleanup" EXIT
3232
set -e
3333

3434
# Prevent user environment from colliding with the test setup
35-
unset KUBECONFIG
3635
unset OPENSHIFTCONFIG
3736

3837
USE_LOCAL_IMAGES=${USE_LOCAL_IMAGES:-true}
@@ -157,23 +156,17 @@ osc get services --config="${CERT_DIR}/admin/.kubeconfig"
157156

158157
# test config files from env vars
159158
OPENSHIFTCONFIG="${CERT_DIR}/admin/.kubeconfig" osc get services
160-
KUBECONFIG="${CERT_DIR}/admin/.kubeconfig" osc get services
161159

162160
# test config files in the current directory
163161
TEMP_PWD=`pwd`
164162
pushd ${CONFIG_DIR} >/dev/null
165163
cp ${CERT_DIR}/admin/.kubeconfig .openshiftconfig
166164
${TEMP_PWD}/${GO_OUT}/osc get services
167-
mv .openshiftconfig .kubeconfig
168-
${TEMP_PWD}/${GO_OUT}/osc get services
169165
popd
170166

171167
# test config files in the home directory
172-
mv ${CONFIG_DIR} ${HOME}/.kube
173-
osc get services
174-
mkdir -p ${HOME}/.config
175-
mv ${HOME}/.kube ${HOME}/.config/openshift
176-
mv ${HOME}/.config/openshift/.kubeconfig ${HOME}/.config/openshift/.config
168+
mkdir -p ${HOME}/.config/openshift
169+
mv ${CONFIG_DIR}/.openshiftconfig ${HOME}/.config/openshift/.config
177170
osc get services
178171
echo "config files: ok"
179172
export OPENSHIFTCONFIG="${HOME}/.config/openshift/.config"

hack/test-extended.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export CERT_DIR="${BASETMPDIR}/cert"
3333
export CURL_CA_BUNDLE="${CERT_DIR}/ca/cert.crt"
3434
export CURL_CERT="${CERT_DIR}/admin/cert.crt"
3535
export CURL_KEY="${CERT_DIR}/admin/key.key"
36-
export KUBECONFIG="${CERT_DIR}/admin/.kubeconfig"
36+
export OPENSHIFTCONFIG="${CERT_DIR}/admin/.kubeconfig"
3737
export OPENSHIFT_ON_PANIC=crash
3838

3939
cleanup() {
@@ -96,11 +96,11 @@ start_server() {
9696
start_docker_registry() {
9797
mkdir -p ${BASETMPDIR}/.registry
9898
echo "[INFO] Creating Router ..."
99-
openshift ex router --create --credentials="${KUBECONFIG}" \
99+
openshift ex router --create --credentials="${OPENSHIFTCONFIG}" \
100100
--images='openshift/origin-${component}:latest' &>/dev/null
101101

102102
echo "[INFO] Creating Registry ..."
103-
openshift ex registry --create --credentials="${KUBECONFIG}" \
103+
openshift ex registry --create --credentials="${OPENSHIFTCONFIG}" \
104104
--mount-host="${BASETMPDIR}/.registry" \
105105
--images='openshift/origin-${component}:latest' &>/dev/null
106106
}

images/origin/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ RUN ln -s /usr/bin/openshift /usr/bin/osc && \
1616
ln -s /usr/bin/openshift /usr/bin/openshift-router
1717

1818
ENV HOME /root
19-
ENV KUBECONFIG /var/lib/openshift/openshift.local.certificates/admin/.kubeconfig
19+
ENV OPENSHIFTCONFIG /var/lib/openshift/openshift.local.certificates/admin/.kubeconfig
2020
WORKDIR /var/lib/openshift
2121
ENTRYPOINT ["/usr/bin/openshift"]

pkg/cmd/cli/cmd/login.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,12 @@ func RunLogin(cmd *cobra.Command, options *LoginOptions) error {
8181
if keyFile := cmdutil.GetFlagString(cmd, "client-key"); len(keyFile) > 0 {
8282
options.KeyFile = keyFile
8383
}
84+
options.PathToSaveConfig = cmdutil.GetFlagString(cmd, config.OpenShiftConfigFlagName)
8485

8586
if err := options.GatherInfo(); err != nil {
8687
return err
8788
}
8889

89-
forcePath := cmdutil.GetFlagString(cmd, config.OpenShiftConfigFlagName)
90-
options.PathToSaveConfig = forcePath
91-
9290
newFileCreated, err := options.SaveConfig()
9391
if err != nil {
9492
return err

0 commit comments

Comments
 (0)