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

Basic support for account load balancers #3027

Conversation

tpolich
Copy link
Contributor

@tpolich tpolich commented Sep 5, 2024

Description

Basic support for account level load balancers.

Has your change been tested?

Duplicated the existing zone tests and altered them for account based LB which are identical except they don't have a "name".

Screenshots (if appropriate):

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • [soon] This change is using publicly documented in cloudflare/api-schemas
    and relies on stable APIs.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

Oops! It looks like no changelog entry is attached to this PR. Please include a release note as described in https://github.com/cloudflare/cloudflare-go/blob/master/docs/changelog-process.md.

Example:

```release-note:TYPE
Release note
```

If you do not require a release note to be included, please add the workflow/skip-changelog-entry label.

Copy link
Member

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

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

as the CRUD method signatures already include the *ResourceContainer we can add a condition inside of those methods for the account level load balancers instead of using seperate new methods (we already have zone + user).

@tpolich tpolich force-pushed the basic-support-for-account-load-balancers branch from 6612382 to 53fad58 Compare September 10, 2024 23:23
@tpolich
Copy link
Contributor Author

tpolich commented Sep 10, 2024

the changelog check blows up on a go version mismatch but I've updated the functions to switch on the resource container level

@jacobbednarz
Copy link
Member

updated the usage of the ResourceContainer to trim down one extra switch statement. let me know when this is ready with docs and we'll get it merged in.

i'll take a look at the changelog test failure but it looks correct for the usage here.

@tpolich
Copy link
Contributor Author

tpolich commented Sep 11, 2024

oh that's a very nice improvement I didn't realize the constants actually were the text strings at the end of the day.

@jacobbednarz jacobbednarz merged commit 21f5f00 into cloudflare:master Sep 16, 2024
9 of 10 checks passed
@github-actions github-actions bot added this to the v0.105.0 milestone Sep 16, 2024
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.

2 participants