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

Enable etcd-manager / etcd3 / etcd-tls in kops 1.12 #6359

Merged
merged 4 commits into from
Mar 19, 2019

Conversation

justinsb
Copy link
Member

@justinsb justinsb commented Jan 18, 2019

In 1.12 (kops & kubenetes):

  • We default etcd-manager on
  • We default to etcd3
  • We default to full TLS for etcd (client and peer)
  • We stop allowing external access to etcd

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 18, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 18, 2019
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 23, 2019
@justinsb justinsb force-pushed the integration_etcd branch 2 times, most recently from 2ac6a2b to 27e0645 Compare January 28, 2019 19:15
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 28, 2019
@justinsb justinsb changed the title WIP: changes for etcd-manager Enable etcd-manager / etcd3 / etcd-tls in kops 1.12 Jan 28, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 28, 2019
@justinsb
Copy link
Member Author

cc @gambol99 heads-up on TLS changes - enabling TLS by default in 1.12, using new CA keys which are split for peers & clients.

@justinsb justinsb force-pushed the integration_etcd branch 2 times, most recently from 56c0fe0 to f9c2493 Compare January 30, 2019 04:57
@justinsb justinsb added this to the 1.12 milestone Mar 14, 2019
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 14, 2019
In 1.12 (kops & kubenetes):

* We default etcd-manager on
* We default to etcd3
* We default to full TLS for etcd (client and peer)
* We stop allowing external access to etcd
@chrisz100
Copy link
Contributor

Maybe add a few lines to the documentation that etcd-manager is a default now?

}

{
p := filepath.Join(dir, name+".key")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Looks a little duplicated to me if the only change to line 142 is the file suffix

Copy link
Member Author

Choose a reason for hiding this comment

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

There's also the byte slice we're writing, the file mode, and the error message :-) I think it would be hard to dedup this - though very open to suggestions!

Copy link
Contributor

@chrisz100 chrisz100 Mar 19, 2019

Choose a reason for hiding this comment

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

What about

{
    path := filepath.Join(dir, name)
    {
		if err := ioutil.WriteFile(p+".crt", certBytes, 0644); err != nil {
			return fmt.Errorf("error writing certificate key file %q: %v", p+".crt", err)
		}
    }
    {
    <CODE HERE>
    }
}

Not tested but would keep the filepath consistent. Even though I hate how it's appended two times now...

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure! Done :-)

scheme := "http"
if isTLS {
scheme = "https"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like we block the option to disable tls as something fixed here? Not that insecure is a good thing but this feels like taking away customizability that was once there and some clusters might rely on.

Copy link
Member Author

Choose a reason for hiding this comment

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

So if we specify etcdInsecure (above), etcd-manager will override the scheme in the URLs here.

We could allow users to specify etcd insecure (somehow). Currently we default the fields to on when etcd-manager is in use, and because they're bool and not *bool it is difficult to know whether the value is false or just unset, but we could create another field.

The workaround for now is to set the etcd provider back to legacy, but that option will go away in 1.13. But if there are people that need insecure, maybe we can rely on this workaround for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I missed this is etcdmanager only. Ignore this 👍

@justinsb
Copy link
Member Author

Added a commit which updates docs to make it less alpha sounding, but still encourage backups.

I also need to get this into the release notes - I had started it ... somewhere

@justinsb
Copy link
Member Author

Also added some release notes, though they mostly refer to the etcd-manager doc (rather than repeating it entirely!)

Copy link
Contributor

@chrisz100 chrisz100 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 19, 2019
@k8s-ci-robot k8s-ci-robot merged commit 93988d8 into kubernetes:master Mar 19, 2019
patrykorwat added a commit to patrykorwat/terraformer that referenced this pull request Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. blocks-next cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants