Skip to content

Periodically re-reconcile boundendpoints and refactor connectivity check #628

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

Merged
merged 4 commits into from
Apr 23, 2025

Conversation

masonj5n
Copy link
Member

@masonj5n masonj5n commented Apr 10, 2025

What

tryToBindEndpoint didn't have a cancellation mechanism so we add that, and then make sure that check runs fairly frequently (every 10 minutes) so the status on endpoints is more up to date.

How

Re-queues bound endpoints every 10 minutes and refactors tryToBindEndpoint into a connectivity check and separate status update.

Breaking Changes

Shouldn't be!

@masonj5n masonj5n requested a review from a team as a code owner April 10, 2025 17:43
@github-actions github-actions bot added the area/controller Issues dealing with the controller label Apr 10, 2025
@masonj5n masonj5n force-pushed the mason/bound-endpoint-reconciler-fixes branch 3 times, most recently from 883a2b9 to 6a0d676 Compare April 10, 2025 17:47
Copy link

codecov bot commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 9.67742% with 56 lines in your changes missing coverage. Please review.

Project coverage is 28.78%. Comparing base (1d21084) to head (1a1647a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...al/controller/bindings/boundendpoint_controller.go 9.83% 55 Missing ⚠️
cmd/api/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #628   +/-   ##
=======================================
  Coverage   28.77%   28.78%           
=======================================
  Files          95       95           
  Lines       15706    15705    -1     
=======================================
  Hits         4520     4520           
+ Misses      10922    10921    -1     
  Partials      264      264           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@masonj5n masonj5n force-pushed the mason/bound-endpoint-reconciler-fixes branch from 6a0d676 to a518b99 Compare April 10, 2025 20:00
@masonj5n
Copy link
Member Author

Reconciling after 10 minutes:

Events:                                                                                                                                                                                                                               │
│   Type     Reason       Age                From                           Message                                                                                                                                                     │
│   ----     ------       ----               ----                           -------                                                                                                                                                     │
│   Normal   Updating     10m                bindings-forwarder-controller  Updating BoundEndpoint/ngrok-1366e7d4-1ca0-582b-af03-80aeced814c7                                                                                           │
│   Normal   Updated      10m                bindings-forwarder-controller  Updated BoundEndpoint/ngrok-1366e7d4-1ca0-582b-af03-80aeced814c7                                                                                            │
│   Normal   Created      10m                bindings-controller            Created Upstream Service                                                                                                                                    │
│   Normal   Created      10m                bindings-controller            Created Target Service                                                                                                                                      │
│   Warning  StatusError  10m (x7 over 10m)  bindings-controller            Failed to reconcile status: BoundEndpoint.bindings.k8s.ngrok.com "ngrok-1366e7d4-1ca0-582b-af03-80aeced814c7" is invalid: status.endpoints: Required value  │
│   Warning  UpdateError  10m (x7 over 10m)  bindings-controller            Failed to update BoundEndpoint/ngrok-1366e7d4-1ca0-582b-af03-80aeced814c7: BoundEndpoint.bindings.k8s.ngrok.com "ngrok-1366e7d4-1ca0-582b-af03-80aeced814c7 │
│ " is invalid: status.endpoints: Required value: %!s(<nil>)                                                                                                                                                                            │
│   Normal   Created      10m                endpoint-binding-poller        BoundEndpoint created successfully                                                                                                                          │
│   Normal   Updating     2s (x9 over 10m)   bindings-controller            Updating BoundEndpoint/ngrok-1366e7d4-1ca0-582b-af03-80aeced814c7                                                                                           │
│   Normal   Updated      2s (x9 over 10m)   bindings-controller            Updated Services                                                                                                                                            │
│   Normal   Status       2s (x2 over 10m)   bindings-controller            Successfully reconciled status                                                                                                                              │
│   Normal   Updated      2s (x2 over 10m)   bindings-controller            Updated BoundEndpoint/ngrok-1366e7d4-1ca0-582b-af03-80aeced814c7

@masonj5n masonj5n added this pull request to the merge queue Apr 23, 2025
Merged via the queue into main with commit 7d70a02 Apr 23, 2025
10 checks passed
@masonj5n masonj5n deleted the mason/bound-endpoint-reconciler-fixes branch April 23, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Issues dealing with the controller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants