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

Attach firewall when creating nodebalancer #143

Merged
merged 11 commits into from
Dec 4, 2023

Conversation

rammanoj
Copy link
Contributor

@rammanoj rammanoj commented Nov 27, 2023

Fixes #142

Changes:

  • Upgrade Linodego dependency to the latest available version v1.25.0 and fix the existing unit-test failures due to the changes.
  • Add support to attach firewall to node balancer when creating a node balancer.
    • Add corresponding unit-tests:
      • Create NodeBalancer without a firewall
      • Create NodeBalancer with an invalid firewall ID
      • Create NodeBalaner with a valid firewall ID

General:

  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

@tchinmai7
Copy link
Contributor

I think you have to run go mod tidy to fix the lint issues

Makefile Outdated Show resolved Hide resolved
cloud/linode/fake_linode_test.go Show resolved Hide resolved
cloud/linode/loadbalancers.go Outdated Show resolved Hide resolved
cloud/linode/loadbalancers.go Outdated Show resolved Hide resolved
cloud/linode/loadbalancers.go Show resolved Hide resolved
go.mod Show resolved Hide resolved
@rammanoj rammanoj mentioned this pull request Nov 29, 2023
10 tasks
@okokes-akamai
Copy link
Contributor

I have one last comment about testing, but otherwise it looks good.

The one big problem with this is that it only supports creation, which is just... insufficient. I understand we're limited by the Linode API, but given this, we should really make sure this is super alpha, not something that should be used beyond some testing. (cc @schinmai-akamai)

@okokes-akamai
Copy link
Contributor

Turns out it should be possible to remove firewalls from nodebalancer by using DeleteFirewallDevice (thanks, Tarun, for pointing this out). So if we're going the creation route, we should also incorporate this (if possible).

@rammanoj
Copy link
Contributor Author

Turns out it should be possible to remove firewalls from nodebalancer by using DeleteFirewallDevice (thanks, Tarun, for pointing this out). So if we're going the creation route, we should also incorporate this (if possible).

Yup, the devices on the firewalls could be updated or deleted. I will be incorporating these changes as well!

@rammanoj
Copy link
Contributor Author

rammanoj commented Dec 1, 2023

Turns out it should be possible to remove firewalls from nodebalancer by using DeleteFirewallDevice (thanks, Tarun, for pointing this out). So if we're going the creation route, we should also incorporate this (if possible).

The linodego doesn't yet have the ability to list firewalls of a nodebalancer. The update feature can be added as soon as the ability has been added (https://jira.linode.com/browse/TPT-2535)

@luthermonson
Copy link
Contributor

Turns out it should be possible to remove firewalls from nodebalancer by using DeleteFirewallDevice (thanks, Tarun, for pointing this out). So if we're going the creation route, we should also incorporate this (if possible).

The linodego doesn't yet have the ability to list firewalls of a nodebalancer. The update feature can be added as soon as the ability has been added (https://jira.linode.com/browse/TPT-2535)

#146

Copy link
Contributor

@okokes-akamai okokes-akamai left a comment

Choose a reason for hiding this comment

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

One last bit of comment regarding the refactored tests. Feel free to merge once you incorporate the small changes I suggested.

cloud/linode/loadbalancers_test.go Outdated Show resolved Hide resolved
cloud/linode/loadbalancers_test.go Outdated Show resolved Hide resolved
@tchinmai7 tchinmai7 merged commit 8148850 into linode:master Dec 4, 2023
1 check passed
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.

Support Firewall attachments to nodebalancers
5 participants