-
Notifications
You must be signed in to change notification settings - Fork 647
fix: backend tls default namespace #7987
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cerulean-figolla-1f9435 canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7987 +/- ##
==========================================
+ Coverage 72.86% 72.90% +0.03%
==========================================
Files 237 237
Lines 35536 35536
==========================================
+ Hits 25894 25907 +13
+ Misses 7799 7791 -8
+ Partials 1843 1838 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3add124 to
51745da
Compare
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
51745da to
a6fe35d
Compare
|
|
||
| if backend.Spec.TLS.BackendTLSConfig != nil && backend.Spec.TLS.ClientCertificateRef != nil { | ||
| ns := string(ptr.Deref(backend.Spec.TLS.ClientCertificateRef.Namespace, "default")) | ||
| ns := NamespaceDerefOr(backend.Spec.TLS.ClientCertificateRef.Namespace, backend.Namespace) |
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.
Just a question (not blocking):
Is there an EG coding rule about whether we should use ptr.Deref directly vs using a helper?
|
LGTM, thanks! |
|
/retest |
Fixes: the default namespace for
SecretObjectReferenceshould be the owner namespace, not default.The condition
The Backend was not accepted: clientCertificateRef Secret is not located in the same namespace as Backend. Secret namespace: default does not match Backend namespace: httpbin-tlsis wrong in the following example.