Skip to content

change openshiftconfig loading rules and files - #1698

Merged
openshift-bot merged 3 commits into
openshift:masterfrom
deads2k:deads-upstream-6680
Apr 20, 2015
Merged

openshift-bot merged 3 commits into
openshift:masterfrom
deads2k:deads-upstream-6680

Conversation

@deads2k

@deads2k deads2k commented Apr 10, 2015

Copy link
Copy Markdown
Contributor

This changes the osc kubeconfig chain to:

  1. --config - use the file directly no merging
  2. merge local .openshiftconfig with either $OPENSHIFT if it has a value or .config/openshift/config (note the lack of '.').

Upstream has migration methods being added in kubernetes/kubernetes#6680. Since we collapsed onto the same chain before, this should bring everything into line.

@fabianofranz ptal

@fabianofranz

Copy link
Copy Markdown
Contributor

@deads2k I don't want to go into a discussion about the file locations since I guess it already happened upstream, but did you consider the idea below? I was really starting to like the idea of local and global file and directory names being the same. :)

./.kube/config
~/.kube/config

Also it would allow the local structure to contain stuff other than the config file (currently cert files for example).

Apart that, really nice PR! Looking into it now.

@deads2k

deads2k commented Apr 10, 2015

Copy link
Copy Markdown
Contributor Author

I was really starting to like the idea of local and global file and directory names being the same.

You should have seen @liggitt's eyes when I suggested that. I'll let him or @smarterclayton describe the reasons why not. I haven't had a negative experience with it, but they had concerns and I didn't feel strongly. I think it had to do with git.

@fabianofranz

Copy link
Copy Markdown
Contributor

ಠ_ಠ

@fabianofranz

Copy link
Copy Markdown
Contributor

@liggitt please can you reproduce the eyes on a video conference so I can see? :)

@liggitt

liggitt commented Apr 11, 2015

Copy link
Copy Markdown
Contributor

image

@smarterclayton

Copy link
Copy Markdown
Contributor

Dear. Lord.

@fabianofranz

Copy link
Copy Markdown
Contributor

Ok, ok, I'm convinced.

@smarterclayton

Copy link
Copy Markdown
Contributor

Will this break existing users?

@deads2k

deads2k commented Apr 13, 2015

Copy link
Copy Markdown
Contributor Author

Will this break existing users?

If they were relying upon $KUBECONFIG, $HOME/.kube/.kubeconfig, or ./.kubeconfig, yes. The question is what we'd like to do about it. I see these options:

  1. Pull off the bandaid before 3.0. That's what this does. We move .config for you, but none of the .kubeconfig files. You may need to run osc login again.
  2. Copy the corresponding kubeconfig files to openshift config files if they don't already exist. This does not prevent breakages. You may already have an openshiftconfig file at that level, in which case don't copy, but you were still relying on merging in the kubeconfig file. In such a case, you'd still be broken by this change.
  3. Merge kubeconfig file contents into openshift config files. If we choose to do this, then we've made no gain by eliminating the files from the hierarchy, only confusing about merging rules.

I think number 1 is the best choice. It's a little painful now, but the rules are shallower and keeps our config compatible, but separate.

@deads2k

deads2k commented Apr 13, 2015

Copy link
Copy Markdown
Contributor Author

Before we merge, we'll want to make sure that the upstream comments are complete. Brian had some concerns here: kubernetes/kubernetes#6680 (comment)

@smarterclayton

Copy link
Copy Markdown
Contributor

----- Original Message -----

Will this break existing users?

If they were relying upon $KUBECONFIG, $HOME/.kube/.kubeconfig, or
./.kubeconfig, yes. The question is what we'd like to do about it. I see
these options:

  1. Pull off the bandaid before 3.0. That's what this does. We move
    .config for you, but none of the .kubeconfig files. You may need to
    run osc login again.

I think that's fine.

  1. Copy the corresponding kubeconfig files to openshift config files if they
    don't already exist. This does not prevent breakages. You may already
    have an openshiftconfig file at that level, in which case don't copy, but
    you were still relying on merging in the kubeconfig file. In such a case,
    you'd still be broken by this change.

That's fine.

  1. Merge kubeconfig file contents into openshift config files. If we
    choose to do this, then we've made no gain by eliminating the files from
    the hierarchy, only confusing about merging rules.

I don't think we need to do this.

I think number 1 is the best choice. It's a little painful now, but the
rules are shallower and keeps our config compatible, but separate.


Reply to this email directly or view it on GitHub:
#1698 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing local .openshiftconfig in this comment. What this code is doing is in fact:

// 1. --config value
// 2. Merge ./.openshiftconfig with:
// 2.1. OPENSHIFTCONFIG env var if it has a value, 
// 2.2. otherwise, ~/.config/openshift/config file

@deads2k
deads2k force-pushed the deads-upstream-6680 branch from 38124c9 to 6c445ea Compare April 17, 2015 19:52
@deads2k

deads2k commented Apr 17, 2015

Copy link
Copy Markdown
Contributor Author

@fabianofranz rebased on the version committed into kube. Taking the second UPSTREAM patch upstream now.

@deads2k
deads2k force-pushed the deads-upstream-6680 branch from 6c445ea to a08bf99 Compare April 20, 2015 18:21
@fabianofranz

Copy link
Copy Markdown
Contributor

LGTM

@deads2k

deads2k commented Apr 20, 2015

Copy link
Copy Markdown
Contributor Author

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/1618/) (Image: devenv-fedora_1312)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin up to a08bf99

openshift-bot pushed a commit that referenced this pull request Apr 20, 2015
@openshift-bot
openshift-bot merged commit 59c9aa0 into openshift:master Apr 20, 2015
@deads2k
deads2k deleted the deads-upstream-6680 branch June 11, 2015 14:18
jboyd01 pushed a commit to jboyd01/origin that referenced this pull request Feb 15, 2018
…service-catalog/' changes from b69b4a6c80..b758460ba7

b758460ba7 origin build: modify hard coded path
871582f73a origin build: add origin tooling
9fa4e70 chart changes for v0.1.8 (openshift#1741)
cada49c handle instance deletion that occurs during async provisioning or async update (openshift#1587) (openshift#1708)
3032f01 phony output binaries (openshift#1729)
0c98a72 remove last vestiges of glide (openshift#1696)
8435935 Prune vendor (openshift#1739)
0f657ec allow setting go version, clean up alignment
08af73f Disable test-dep target temporarily
41984a5 Check for existing bindings only for instances with DeprovisionStatus == ServiceInstanceDeprovisionStatusRequired. (openshift#1640)
706e555 chart changes for v0.1.7 (openshift#1721)
23644db we inconsistently rm thing with and without docker (openshift#1713)
a38092d Chart changes for Release v0.1.6 (openshift#1718)
2fd4ecf Add PodPreset into settings api group (openshift#1694)
bac68f4 update docs of developer's guide (openshift#1716)
3200b16 add integration test for proper async binding retry (openshift#1688)
6d809c3 Add custom columns to OpenAPI schema (openshift#1597)
fcdefa6 Workaround spf13/viper stringarray bug (openshift#1700)
ebbeb8c undo 6bad71d358ad3ad39eb8c003f5807cca1ec1d1e7 (openshift#1714)
1ee9659 Load all client auth plugins in the cli (openshift#1695)
b9ad10d must run tests (openshift#1698)
c621cdc add stages to Travis
REVERT: b69b4a6c80 origin build: modify hard coded path
REVERT: 527fac4d02 origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: b758460ba7a45d370da9d5d634e71c16e9eb282a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants