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

load_balancing: support least_connections steering #2818

Merged
merged 2 commits into from
Oct 22, 2023

Conversation

tc80
Copy link
Contributor

@tc80 tc80 commented Oct 6, 2023

Description

Support least_connections as a Load Balancer steering policy and as a Load Balancer Pool origin steering policy.
This cannot be merged until the feature is released and API docs are updated.
API docs are live.

Relevant cloudflare-go PR here: cloudflare/cloudflare-go#1414 (but not blocked on it).


Testing

This is blocked for now, but once unblocked, I will:

Verify the tests pass:

$ TESTARGS='-run "^TestAccCloudflareLoadBalancer_LeastConnectionsBalanced" -count 1 -parallel 1' make testacc
$  TESTARGS='-run "^TestAccCloudflareLoadBalancerPool_OriginSteeringLeastConnections" -count 1 -parallel 1' make testacc

Verify that the previews look good:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

changelog detected ✅

@tc80 tc80 force-pushed the tcaslin/lcs branch 2 times, most recently from 530a07a to 8729458 Compare October 6, 2023 19:36
…steering policy

- load_balancer: update description for steering_policy and steering_policy override
and extend the enum for least_connections

- load_balancer: update description for random_steering and random_steering override

- pool: update description for origin_steering.policy and extend the enum
for least_connections

- pool: update description for origin weight
@jacobbednarz
Copy link
Member

lgtm once the API schemas land 🥇

@tc80 tc80 marked this pull request as ready for review October 18, 2023 23:02
@tc80
Copy link
Contributor Author

tc80 commented Oct 18, 2023

This is ready for review now! The API docs are live.
I clicked the Update Branch button and GitHub added a merge commit. Let me know if you'd like me to rebase and force push instead! (or feel free to do so 👍 )

@jacobbednarz
Copy link
Member

wicked, thanks! i'm happy with either and care very little about a linear git history :)

acceptance tests all looking good here

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^(TestAccCloudflareLoadBalancer_|TestAccCloudflareLoadBalancerPool_)" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareLoadBalancerPool_Import
=== PAUSE TestAccCloudflareLoadBalancerPool_Import
=== RUN   TestAccCloudflareLoadBalancer_Import
=== PAUSE TestAccCloudflareLoadBalancer_Import
=== RUN   TestAccCloudflareLoadBalancerPool_Basic
=== PAUSE TestAccCloudflareLoadBalancerPool_Basic
=== RUN   TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests
=== PAUSE TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests
=== RUN   TestAccCloudflareLoadBalancerPool_OriginSteeringLeastConnections
=== PAUSE TestAccCloudflareLoadBalancerPool_OriginSteeringLeastConnections
=== RUN   TestAccCloudflareLoadBalancerPool_FullySpecified
=== PAUSE TestAccCloudflareLoadBalancerPool_FullySpecified
=== RUN   TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
=== PAUSE TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
=== RUN   TestAccCloudflareLoadBalancer_Basic
=== PAUSE TestAccCloudflareLoadBalancer_Basic
=== RUN   TestAccCloudflareLoadBalancer_SessionAffinity
=== PAUSE TestAccCloudflareLoadBalancer_SessionAffinity
=== RUN   TestAccCloudflareLoadBalancer_SessionAffinityIPCookie
=== PAUSE TestAccCloudflareLoadBalancer_SessionAffinityIPCookie
=== RUN   TestAccCloudflareLoadBalancer_SessionAffinityHeader
=== PAUSE TestAccCloudflareLoadBalancer_SessionAffinityHeader
=== RUN   TestAccCloudflareLoadBalancer_AdaptiveRouting
=== PAUSE TestAccCloudflareLoadBalancer_AdaptiveRouting
=== RUN   TestAccCloudflareLoadBalancer_LocationStrategy
=== PAUSE TestAccCloudflareLoadBalancer_LocationStrategy
=== RUN   TestAccCloudflareLoadBalancer_RandomSteering
=== PAUSE TestAccCloudflareLoadBalancer_RandomSteering
=== RUN   TestAccCloudflareLoadBalancer_GeoBalancedUpdate
=== PAUSE TestAccCloudflareLoadBalancer_GeoBalancedUpdate
=== RUN   TestAccCloudflareLoadBalancer_GeoBalanced
=== PAUSE TestAccCloudflareLoadBalancer_GeoBalanced
=== RUN   TestAccCloudflareLoadBalancer_ProximityBalanced
=== PAUSE TestAccCloudflareLoadBalancer_ProximityBalanced
=== RUN   TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced
=== PAUSE TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced
=== RUN   TestAccCloudflareLoadBalancer_LeastConnectionsBalanced
=== PAUSE TestAccCloudflareLoadBalancer_LeastConnectionsBalanced
=== RUN   TestAccCloudflareLoadBalancer_Rules
=== PAUSE TestAccCloudflareLoadBalancer_Rules
=== RUN   TestAccCloudflareLoadBalancer_DuplicatePool
=== PAUSE TestAccCloudflareLoadBalancer_DuplicatePool
=== RUN   TestAccCloudflareLoadBalancer_Update
=== PAUSE TestAccCloudflareLoadBalancer_Update
=== RUN   TestAccCloudflareLoadBalancer_CreateAfterManualDestroy
=== PAUSE TestAccCloudflareLoadBalancer_CreateAfterManualDestroy
=== CONT  TestAccCloudflareLoadBalancerPool_Import
--- PASS: TestAccCloudflareLoadBalancerPool_Import (12.77s)
=== CONT  TestAccCloudflareLoadBalancer_LocationStrategy
--- PASS: TestAccCloudflareLoadBalancer_LocationStrategy (9.89s)
=== CONT  TestAccCloudflareLoadBalancer_CreateAfterManualDestroy
--- PASS: TestAccCloudflareLoadBalancer_CreateAfterManualDestroy (16.91s)
=== CONT  TestAccCloudflareLoadBalancer_Update
--- PASS: TestAccCloudflareLoadBalancer_Update (17.42s)
=== CONT  TestAccCloudflareLoadBalancer_DuplicatePool
--- PASS: TestAccCloudflareLoadBalancer_DuplicatePool (5.24s)
=== CONT  TestAccCloudflareLoadBalancer_Rules
--- PASS: TestAccCloudflareLoadBalancer_Rules (10.13s)
=== CONT  TestAccCloudflareLoadBalancer_LeastConnectionsBalanced
--- PASS: TestAccCloudflareLoadBalancer_LeastConnectionsBalanced (9.93s)
=== CONT  TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced
--- PASS: TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced (9.88s)
=== CONT  TestAccCloudflareLoadBalancer_ProximityBalanced
--- PASS: TestAccCloudflareLoadBalancer_ProximityBalanced (10.04s)
=== CONT  TestAccCloudflareLoadBalancer_GeoBalanced
--- PASS: TestAccCloudflareLoadBalancer_GeoBalanced (9.90s)
=== CONT  TestAccCloudflareLoadBalancer_GeoBalancedUpdate
=== CONT  TestAccCloudflareLoadBalancer_RandomSteering
--- PASS: TestAccCloudflareLoadBalancer_GeoBalancedUpdate (16.96s)
--- PASS: TestAccCloudflareLoadBalancer_RandomSteering (20.81s)
=== CONT  TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
--- PASS: TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy (18.33s)
=== CONT  TestAccCloudflareLoadBalancer_SessionAffinity
--- PASS: TestAccCloudflareLoadBalancer_SessionAffinity (10.33s)
=== CONT  TestAccCloudflareLoadBalancer_Basic
--- PASS: TestAccCloudflareLoadBalancer_Basic (9.62s)
=== CONT  TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests
--- PASS: TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests (8.40s)
=== CONT  TestAccCloudflareLoadBalancerPool_FullySpecified
--- PASS: TestAccCloudflareLoadBalancerPool_FullySpecified (8.62s)
=== CONT  TestAccCloudflareLoadBalancerPool_OriginSteeringLeastConnections
--- PASS: TestAccCloudflareLoadBalancerPool_OriginSteeringLeastConnections (8.33s)
=== CONT  TestAccCloudflareLoadBalancer_SessionAffinityIPCookie
--- PASS: TestAccCloudflareLoadBalancer_SessionAffinityIPCookie (10.16s)
=== CONT  TestAccCloudflareLoadBalancerPool_Basic
--- PASS: TestAccCloudflareLoadBalancerPool_Basic (8.45s)
=== CONT  TestAccCloudflareLoadBalancer_AdaptiveRouting
--- PASS: TestAccCloudflareLoadBalancer_AdaptiveRouting (9.89s)
=== CONT  TestAccCloudflareLoadBalancer_SessionAffinityHeader
--- PASS: TestAccCloudflareLoadBalancer_SessionAffinityHeader (9.84s)
=== CONT  TestAccCloudflareLoadBalancer_Import
--- PASS: TestAccCloudflareLoadBalancer_Import (12.29s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	265.012s

@jacobbednarz jacobbednarz merged commit 1ada9f1 into cloudflare:master Oct 22, 2023
9 checks passed
@github-actions github-actions bot added this to the v4.18.0 milestone Oct 22, 2023
github-actions bot pushed a commit that referenced this pull request Oct 22, 2023
Copy link
Contributor

This functionality has been released in v4.18.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants