Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove local .openshiftconfig #1833

Merged
merged 1 commit into from
Apr 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions hack/test-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,9 @@ osc get services --config="${CERT_DIR}/admin/.kubeconfig"
# test config files from env vars
OPENSHIFTCONFIG="${CERT_DIR}/admin/.kubeconfig" osc get services

# test config files in the current directory
TEMP_PWD=`pwd`
pushd ${CONFIG_DIR} >/dev/null
cp ${CERT_DIR}/admin/.kubeconfig .openshiftconfig
${TEMP_PWD}/${GO_OUT}/osc get services
popd

# test config files in the home directory
mkdir -p ${HOME}/.config/openshift
mv ${CONFIG_DIR}/.openshiftconfig ${HOME}/.config/openshift/config
mv ${CERT_DIR}/admin/.kubeconfig ${HOME}/.config/openshift/config
osc get services
mv ${HOME}/.config/openshift/config ${HOME}/.config/openshift/non-default-config
echo "config files: ok"
Expand Down
3 changes: 1 addition & 2 deletions pkg/cmd/cli/config/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
const (
OpenShiftConfigPathEnvVar = "OPENSHIFTCONFIG"
OpenShiftConfigFlagName = "config"
OpenShiftConfigFileName = ".openshiftconfig"
OpenShiftConfigHomeDir = ".config/openshift"
OpenShiftConfigHomeFileName = "config"
OpenShiftConfigHomeDirFileName = OpenShiftConfigHomeDir + "/" + OpenShiftConfigHomeFileName
Expand All @@ -24,7 +23,7 @@ var RecommendedHomeFile = path.Join(os.Getenv("HOME"), OpenShiftConfigHomeDirFil
// 1. --config value
// 2. if OPENSHIFTCONFIG env var has a value, use it. Otherwise, ~/.config/openshift/config file
func NewOpenShiftClientConfigLoadingRules() *clientcmd.ClientConfigLoadingRules {
chain := []string{OpenShiftConfigFileName}
chain := []string{}
migrationRules := map[string]string{}

envVarFile := os.Getenv(OpenShiftConfigPathEnvVar)
Expand Down