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

Respect Topology when assigning floating ips or not #9701

Merged
merged 1 commit into from
Aug 9, 2020

Conversation

olemarkus
Copy link
Member

This is a commit that got lost from #9560, I think. Without this, kops will unconditionally add floating IPs even though openstack setup doesn't support it resulting in an npr.

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. 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 Aug 6, 2020
@k8s-ci-robot k8s-ci-robot added area/api area/provider/openstack Issues or PRs related to openstack provider labels Aug 6, 2020
@olemarkus olemarkus force-pushed the openstack-fixed-ip-npr branch from 832fb51 to 99d6f3b Compare August 7, 2020 06:23
@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 Aug 7, 2020
@olemarkus olemarkus force-pushed the openstack-fixed-ip-npr branch from 99d6f3b to e69ce0f Compare August 7, 2020 06:28
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 7, 2020
)

func openstackValidateCluster(c *kops.Cluster) (errList field.ErrorList) {
if c.Spec.CloudConfig.Openstack.Router != nil && c.Spec.CloudConfig.Openstack.Router.ExternalNetwork == nil {
Copy link
Member

Choose a reason for hiding this comment

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

But public topology doesn't require an external network when there's no router?

Copy link
Member Author

Choose a reason for hiding this comment

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

Public topology means using floating IPs. In order to use floating IPs you need both an external network and you need a router (which handles traffic between internal and external network). So public topology is not possible without one.

Copy link
Member

Choose a reason for hiding this comment

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

But this validation code skips the topology check if c.Spec.CloudConfig.Openstack.Router is nil

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah. That is quite a bug. Fixed now. And added some tests as well.

@olemarkus olemarkus force-pushed the openstack-fixed-ip-npr branch from e69ce0f to 6ea564b Compare August 8, 2020 06:34
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 8, 2020
@olemarkus olemarkus force-pushed the openstack-fixed-ip-npr branch from 6ea564b to 815b284 Compare August 8, 2020 06:36
@olemarkus
Copy link
Member Author

/retest

@olemarkus olemarkus force-pushed the openstack-fixed-ip-npr branch from 815b284 to fbcdeb2 Compare August 8, 2020 10:23
@johngmyers
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 9, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johngmyers, olemarkus

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 Aug 9, 2020
@k8s-ci-robot k8s-ci-robot merged commit 58b52dd into kubernetes:master Aug 9, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Aug 9, 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. area/api area/provider/openstack Issues or PRs related to openstack provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. 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.

3 participants