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

implicitly handle load balancers #274

Closed
wants to merge 1 commit into from

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Feb 6, 2019

This preserves load balancers as being part of the node lists,
but makes it possible to handle the case where the user
did not provide a LB in the config.

In such a case the function populateLoadBalancer() adds this "kind node"
automatically.

Includes minor cleanup in types.go and validate.go.

/assign @fabriziopandini @BenTheElder
/priority important-soon
/kind feature

i'm not particularly happy about this change as is, yet it's not config breaking at this point.

my goal was to get this to unblock my other PR:
#267
related to: #269

so consider this a temporary solution and we can iterate on config changes later.

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. kind/feature Categorizes issue or PR as related to a new feature. labels Feb 6, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: neolit123
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: bentheelder

If they are not already assigned, you can assign the PR to them by writing /assign @bentheelder in a comment when ready.

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 6, 2019
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

@neolit123 thanks for this PR!
I think this can help users, but I'm wondering if we should change cfg or if we should prefer to keep cfg as it is (config is config) and instead add the load balancer node to the derived list of nodes only.
Wdyt?

@neolit123
Copy link
Member Author

@neolit123 thanks for this PR!
I think this can help users, but I'm wondering if we should change cfg or if we should prefer to keep cfg as it is (config is config) and instead add the load balancer node to the derived list of nodes only.
Wdyt?

it would be much better to have it in the derived config, indeed.
on problem is the propagation of the image flag overload and what image to pick for the automatic LB.

@fabriziopandini
Copy link
Member

@neolit123 good point.
Considering that the image version is not a real concern for the load balancer, a possible solution is to assign to the load balancer the same image of the BootstrapControlPlane node. wdyt?

@neolit123
Copy link
Member Author

Considering that the image version is not a real concern for the load balancer, a possible solution is to assign to the load balancer the same image of the BootstrapControlPlane node. wdyt?

ok, will update based on that value.

This preserves load balancers as being part of the node lists,
but makes it possible to handle the case where the user
did not provide a LB in the config.

The LB is added in the derived config.

Includes minor cleanup in types.go and validate.go.
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 7, 2019
@neolit123
Copy link
Member Author

updated and tested.
this is much cleaner.

@neolit123
Copy link
Member Author

/test pull-kind-conformance-parallel-1-13

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2019
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks @neolit123

@pablochacin
Copy link
Contributor

This PR is somehow related to #269 as it makes the LB optional.

@neolit123
Copy link
Member Author

@pablochacin that's true; i forgot about that ticket.
added reference in the OP.

Role: config.ExternalLoadBalancerRole,
Image: d.BootStrapControlPlane().Image, // should always return non-nil in this branch
}
log.Info("Automatically creating a load balancer node")
Copy link
Contributor

Choose a reason for hiding this comment

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

Call me picky, but I would log this as "Default load balancer node added". Just to stress that the user did not provide a LB configuration

Copy link
Member Author

Choose a reason for hiding this comment

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

the current message seems better to me.
also we use present continuous tense.

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem with tense. I wanted to stress the fact that the LB is created using default values, as it was not specified. "automatically" doesn't convey that information.

Copy link
Contributor

@alejandrox1 alejandrox1 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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 18, 2019
@k8s-ci-robot
Copy link
Contributor

@neolit123: PR needs rebase.

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.

@neolit123
Copy link
Member Author

this overlaps with the plan for the next config version:
#340

@neolit123 neolit123 closed this Mar 7, 2019
stg-0 pushed a commit to stg-0/kind that referenced this pull request Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants