-
Notifications
You must be signed in to change notification settings - Fork 36
Remove the deprecated domain annotation on Load balancer services in … #722
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #722 +/- ##
==========================================
- Coverage 49.14% 49.06% -0.09%
==========================================
Files 95 95
Lines 10570 10557 -13
==========================================
- Hits 5195 5180 -15
+ Misses 5016 5014 -2
- Partials 359 363 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jonstacks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found an small issue while testing.
| default: // computedURL not present, fallback to the domain annotation | ||
| domain, err := parser.GetStringAnnotation("domain", svc) | ||
| if err != nil { | ||
| if errors.IsMissingAnnotations(err) { | ||
| return clearIngressStatus(svc) | ||
| } | ||
| return err | ||
| } | ||
|
|
||
| // Use this domain temporarily, but also check if there is a | ||
| // more specific CNAME value on the domain to use | ||
| hostname = domain | ||
|
|
||
| dr := endpoint.GetDomainRef() | ||
| if dr != nil { | ||
| // Lookup the domain | ||
| domain := &ingressv1alpha1.Domain{} | ||
| if err := c.Get(ctx, client.ObjectKey{Namespace: *dr.Namespace, Name: dr.Name}, domain); err != nil { | ||
| return err | ||
| } | ||
| if domain.Status.CNAMETarget != nil { | ||
| hostname = *domain.Status.CNAMETarget | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I broke this for the url annotation prior to this PR, but it was working for the domain annotation. Leaving the comment here, because I think its related to this.
I've deployed this branch and saw that my custom domains no longer get the ngrok-cname in the load balancer status. It just happens to copy the custom domain to the load balancer status and then external-dns tells me that the record is invalid.
…favor of the url annotation
…nd isntead derive it from the computed url satus
…alue for custom domains
06dfc94 to
81d65ee
Compare
| metadata: | ||
| name: test-tls-custom-domain-lb | ||
| annotations: | ||
| k8s.ngrok.com/url: tls://service-lb-tls-test-ngrok-operator.example.com:443 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails in the e2e merge queue. I picked a domain i thought would be fairly custom and not used to avoid conflicts with future clients. However, the issue is that i run it locally so my account reserved the domain and now the CI one will fail. I can't just unreserve it as we'll then face the same issue in our local systems.
Instead i'm going to just comment this test out for now and will investigate how we can ensure these domains are custom either by having chainsaw create a unique namespace for each run and use that in its templating, or by injecting a unique value from the PR number or codespace
#722) * Remove the deprecated domain annotation on Load balancer services in favor of the url annotation * Fix status calculation and update tests * remove default behavior of trying to parse annotation to set status and isntead derive it from the computed url satus * Set computed URL even for tls connections * lint * handle setting service status field based on domainRef to get CNAME value for custom domains * remove chainsaw test for now
…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/domainannotation support from the LoadBalancer Service. Its been deprecated for some time now in favor ofk8s.ngrok.com/urlValidation
Created a couple of load balancer services
and confirmed the status is set correctly