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

feat: BETA loadbalancer service support #362

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

displague
Copy link
Member

@displague displague commented Oct 7, 2023

Part of #411

(Used CPEM's LBaaS Go project as the base. Lots of cleanup ahead. )

This PR introduces the minimal subcommand support to start working with LoadBalancers. This PR does not include ports and pools, which can be added later.

TODO:

  • Get LB
  • List LB
  • Detele LB
  • Create Project LB
  • Send debug transport to token exchange when debugging?
  • Ensure command docs are correct
  • Ensure requirement checks (required fields) are correct
  • Ensure example commands are correct
  • Ensure command is named "loadbalancer-beta"
  • generate docs

@cprivitere cprivitere temporarily deployed to external October 9, 2023 17:53 — with GitHub Actions Inactive
@displague displague changed the title [WIP] feat: BETA loadbalancer service support feat: BETA loadbalancer service support Dec 14, 2023
@displague displague marked this pull request as ready for review December 14, 2023 17:01
Copy link
Contributor

@tylerauerbeck tylerauerbeck left a comment

Choose a reason for hiding this comment

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

Just a few comments, but overall this looks like a great start!

docs/metal.md Outdated Show resolved Hide resolved
internal/loadbalancers/infrastructure/manager.go Outdated Show resolved Hide resolved
internal/loadbalancers/create.go Outdated Show resolved Hide resolved
internal/loadbalancers/delete.go Outdated Show resolved Hide resolved
}

func (m TokenExchanger) Token() (*oauth2.Token, error) {
tokenExchangeURL := "https://iam.metalctrl.io/api-keys/exchange"
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't know that it would add much here, but if we had a spec for iam.metalcrtl.io we could use a generated client.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ctreatma
Copy link
Contributor

One thing to consider here: if LBaaS has its own generated client that sits next to the metal client in equinix-sdk-go, with its own spec and its own API endpoint, that may indicate that LBaaS CLI commands should go alongside Metal CLI commands in a broader-scoped Equinix CLI (eqx? eqix? the-equinix-cli?) rather than directly in here.

@cprivitere
Copy link
Contributor

Merged in latest updates and tested create/get/delete commands to verify they work.

Copy link
Contributor

@cprivitere cprivitere left a comment

Choose a reason for hiding this comment

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

One thing to consider here: if LBaaS has its own generated client that sits next to the metal client in equinix-sdk-go, with its own spec and its own API endpoint, that may indicate that LBaaS CLI commands should go alongside Metal CLI commands in a broader-scoped Equinix CLI (eqx? eqix? the-equinix-cli?) rather than directly in here.

I'm all for dropping metal-cli and making eq-cli or whatever.

Signed-off-by: Marques Johansson <mjohansson@equinix.com>
…quinix-metal emlb branch)

Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
displague and others added 4 commits January 30, 2024 14:19
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
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.

None yet

4 participants