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

Make events etcd cluster optional #11330

Merged
merged 2 commits into from
May 21, 2021
Merged

Conversation

codablock
Copy link
Contributor

Related to #5004

The events cluster is not strictly needed anymore as etcd v3 is able to handle events and main in the same cluster. This PR only removes the strict requirement, but will still create the cluster via "kops create cluster". Future versions should consider not creating the cluster by default.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 27, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @codablock. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 27, 2021
@hakman
Copy link
Member

hakman commented Apr 27, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 27, 2021
@codablock
Copy link
Contributor Author

Any chance to get this into 1.21? Would make things easier for us as I'm already actively using this

@hakman
Copy link
Member

hakman commented Apr 29, 2021

Hi @codablock. We will discuss about this today at our weekly meeting and get back to you.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 1, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 1, 2021
@codablock codablock force-pushed the etcd-events branch 2 times, most recently from d692cf5 to e08d2f5 Compare May 6, 2021 13:47
@johngmyers johngmyers modified the milestone: v1.22 May 7, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 8, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2021
pkg/model/components/apiserver.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 10, 2021
@hakman hakman removed approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels May 10, 2021
@kubernetes kubernetes deleted a comment from k8s-ci-robot May 10, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 14, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2021
@codablock
Copy link
Contributor Author

@hakman It feels strange to solve it this way tbh. Replacing some IP (127.0.0.1) with a DNS name is not immediately clear why it is happening (it took me some time to understand it). Can't we do all this (127.0.0.1 vs DNS) in pkg/model/components/apiserver.go instead of later replacing it?

I'm also trying to understand the b.IsMaster, is this for apiservers running in dedicated instance groups?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2021
@hakman
Copy link
Member

hakman commented May 19, 2021

@codablock I think we only get the info about the node type in NodeUp, so we can decide if we use 127.0.0.1 or hostname based on Master or APIServer type. In model we have a warning about adding a dependency on InstanceGroups.

// But if we do, we end up with a weird dependency on InstanceGroups. We actually could tolerate
// that in kops, but we don't really want to.
// So instead, we assume that the etcd cluster size is the API Server Count.
// We can re-examine this when we allow separate etcd clusters - at which time hopefully
// the flag won't exist

@rifelpet @johngmyers @olemarkus any thoughts on which approach would be better?

@codablock codablock force-pushed the etcd-events branch 2 times, most recently from c63c2c1 to 75438fd Compare May 19, 2021 15:57
@codablock
Copy link
Contributor Author

@hakman I've update the PR to use your suggested solution (a few changes were required to make tests pass)

@hakman hakman requested review from hakman and olemarkus May 19, 2021 16:06
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2021
@johngmyers
Copy link
Member

According to the apiserver command line reference, this flag is only in use when --endpoint-reconciler-type=master-count is enabled. The default is --endpoint-reconciler-type=lease and kOps does not support changing it from the default.

I believe we can remove the code for setting the --apiserver-count flag.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2021
@hakman
Copy link
Member

hakman commented May 21, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 21, 2021
@k8s-ci-robot k8s-ci-robot merged commit 72a5618 into kubernetes:master May 21, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone May 21, 2021
@codablock codablock deleted the etcd-events branch May 21, 2021 14:31
k8s-ci-robot added a commit that referenced this pull request May 21, 2021
…-upstream-release-1.21

Automated cherry pick of #11330: Make the events etcd cluster optional
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. area/nodeup cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/office-hours lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

None yet

4 participants