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

Allow etcd config file to be passed to apiserver, kubelet, and proxy #1464

Merged
merged 1 commit into from
Oct 8, 2014

Conversation

hmrm
Copy link
Contributor

@hmrm hmrm commented Sep 26, 2014

This is meant to fix #1338 .

I'm a relative golang newbie, so let me know where I'm going wrong here.

@hmrm
Copy link
Contributor Author

hmrm commented Sep 26, 2014

Question on the CLA: this patch (unlike my earlier one) was done while wearing my Box Employee hat.

I've signed an individual CA for my previous contributions, and it sounds like @ghodss has submitted a corporate CLA for Box. Should I get a separate corporate CLA signed or is there some procedure for getting added to the existing one?

@thockin
Copy link
Member

thockin commented Sep 26, 2014

Regarding CLA: I do not see a corp CLA for Box, just an individual CLA for Sam, and another for you, though not with a box email address. Let me poke legal.

@thockin
Copy link
Member

thockin commented Sep 26, 2014

Our legal team says we need a corp CLA if you're doing work on Box's dime. It's probably the right thing to do anyway, given Sam's work.

@@ -103,6 +105,15 @@ func initCloudProvider(name string, configFilePath string) cloudprovider.Interfa
return cloud
}

func newEtcd(etcdConfigFile string, etcdServerList util.StringList) (helper tools.EtcdHelper, err error) {
if etcdConfigFile == "" {
helper, err = master.NewEtcdHelper(etcdServerList, *storageVersion)
Copy link
Member

Choose a reason for hiding this comment

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

idomatically I think you can get away without naming the returns and saying:

if etcdConfigFile = "" {
    return master.NewEtcdHelper(etcdServerList, *storageVersion)
}
return master.NewConfiguredEtcdHelper(etcdConfigFile, *storageVersion)

Though I would probably flip it to check for != ""

@thockin
Copy link
Member

thockin commented Sep 26, 2014

Can you explain the motivation for this? Why do we need it?

@hmrm
Copy link
Contributor Author

hmrm commented Sep 26, 2014

@thockin The motivation is to allow setting certificates and securing the kubernetes <-> etcd communication

@hmrm
Copy link
Contributor Author

hmrm commented Sep 26, 2014

I've passed along the CLA to our legal team, I'll get back to you when it's ready and/or if we have any questions.

@thockin
Copy link
Member

thockin commented Sep 26, 2014

Great!

On Fri, Sep 26, 2014 at 3:37 PM, Haney Maxwell notifications@github.com
wrote:

I've passed along the CLA to our legal team, I'll get back to you when
it's ready and/or if we have any questions.

Reply to this email directly or view it on GitHub
#1464 (comment)
.

@@ -141,10 +141,19 @@ func main() {
}

// define etcd config source and initialize etcd client
var etcdClient tools.EtcdClient
var etcdClient *etcd.Client
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this? Should still be our internal interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, the internal interface doesn't expose .GetCluster (used below), which is why I changed it. What's your preference:

  • var etcdClient *etcd.Client
  • Change the internal interface to include .GetCluster
  • Change the logging below

Copy link
Contributor

Choose a reason for hiding this comment

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

It's fine as is - just wanted to double check.

@smarterclayton
Copy link
Contributor

Looks good to me, can you squash and let me know when you have CLA? Then I'll do final signoff and merge.

@hmrm
Copy link
Contributor Author

hmrm commented Oct 1, 2014

Will do, unfortunately still waiting on CLA

On Wed, Oct 1, 2014 at 8:48 AM, Clayton Coleman notifications@github.com
wrote:

Looks good to me, can you squash and let me know when you have CLA? Then
I'll do final signoff and merge.


Reply to this email directly or view it on GitHub
#1464 (comment)
.

@hmrm hmrm force-pushed the add-etcd-config branch 2 times, most recently from 7b8a57f to 2187772 Compare October 2, 2014 17:58
@hmrm
Copy link
Contributor Author

hmrm commented Oct 7, 2014

@smarterclayton CLA in! Rebased to address the merge conflicts; probably worth a quick look since the rebase involved a few logic changes.

@lavalamp
Copy link
Member

lavalamp commented Oct 7, 2014

CLA hasn't found its way onto our list just yet. Sometimes that takes a day or two for the corporate ones.

@hmrm
Copy link
Contributor Author

hmrm commented Oct 7, 2014

Hmmm, the build seems to have succeeded on 1.3 but failed to compile something in on 1.2. I'm getting an error locally when I try building with 1.2:

github.com/GoogleCloudPlatform/kubernetes/examples/_test/doc.go:3: can't find import: "sync/atomic" FAIL github.com/GoogleCloudPlatform/kubernetes/examples [build failed]

but it seems unrelated to the changes I'm making.

@lavalamp
Copy link
Member

lavalamp commented Oct 8, 2014

CLA confirmed! I restarted travis, too.

@hmrm
Copy link
Contributor Author

hmrm commented Oct 8, 2014

@lavalamp Thanks!

Looks like Travis is passing; I'm ready to merge if you are!

lavalamp added a commit that referenced this pull request Oct 8, 2014
Allow etcd config file to be passed to apiserver, kubelet, and proxy
@lavalamp lavalamp merged commit 5d24820 into kubernetes:master Oct 8, 2014
@lavalamp
Copy link
Member

lavalamp commented Oct 8, 2014

Thanks for the change!

bertinatto pushed a commit to bertinatto/kubernetes that referenced this pull request Mar 9, 2023
UPSTREAM: <carry>: update rebase doc
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.

Add support for using client certificates with etcd
4 participants