Skip to content

Conversation

@alex-bezek
Copy link
Collaborator

…favor of the url annotation

What

This has been deprecated for a while in favor of the k8s.ngrok.com/url annotation. We should remove this

How

Simply removes the old code paths and updates some comments and documentation.

Breaking Changes

Yes, this deletes the k8s.ngrok.com/domain annotation support from the LoadBalancer Service. Its been deprecated for some time now in favor of k8s.ngrok.com/url

@alex-bezek alex-bezek requested a review from a team as a code owner December 5, 2025 18:55
@github-actions github-actions bot added area/controller Issues dealing with the controller size/M Denotes a PR that changes 30-99 lines labels Dec 5, 2025
})
})

When("service has domain annotation", func() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can remove this entire block, we should have a test up above for the TLS url annotation if I'm not mistaken.

@github-actions github-actions bot added size/L Denotes a PR that changes 100-499 lines and removed size/M Denotes a PR that changes 30-99 lines labels Dec 5, 2025
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.91%. Comparing base (e03c2d6) to head (2ba88c0).

Files with missing lines Patch % Lines
internal/util/endpoints.go 69.23% 2 Missing and 2 partials ⚠️
internal/controller/service/controller.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #722      +/-   ##
==========================================
- Coverage   48.98%   48.91%   -0.07%     
==========================================
  Files          95       95              
  Lines       10594    10591       -3     
==========================================
- Hits         5189     5181       -8     
- Misses       5046     5047       +1     
- Partials      359      363       +4     

☔ 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.

@jonstacks jonstacks added this to the controller-0.20.0 milestone Dec 5, 2025
@alex-bezek alex-bezek marked this pull request as draft December 5, 2025 20:49
return err
default: // computedURL not present, fallback to the domain annotation
domain, err := parser.GetStringAnnotation("domain", svc)
default: // computedURL not present, fallback to parsing the URL annotation
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there is a tricky case here with removing domain.

  • When we were using the domain annotation it implied that it was a TLS service. This also implied that the domain should be reserved and that we'd have a domain status to get. The core piece is that we were only looking at domain which would only be for TLS services.
  • The reason we introduced the internal computed-url annotation is that we had to handle the tcp:// case, where it means: "Please give me a random TCP url and keep using it". We don't own the spec Service and we don't currently have a TCPAddr CRD (maybe we should now), so we needed a place to store the reserved addr.
  • Now that domain annotation is removed, if we don't have the computed-url annotation (the default case here), it looks like we are still going to try to parse tcp:// instead and use that to update the status.

What do you think?

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 size/L Denotes a PR that changes 100-499 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants