-
Notifications
You must be signed in to change notification settings - Fork 196
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
Improve owner missing error message #1747
Conversation
5e797df
to
1f11e47
Compare
Codecov Report
@@ Coverage Diff @@
## master #1747 +/- ##
=======================================
Coverage 42.11% 42.11%
=======================================
Files 309 309
Lines 89877 89877
=======================================
Hits 37851 37851
Misses 48699 48699
Partials 3327 3327
Continue to review full report at Codecov.
|
e6d0bf2
to
821b511
Compare
821b511
to
5cec45a
Compare
Looks much nicer! |
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.
return b.builder.MakeFalseCondition( | ||
ConditionTypeReady, | ||
ConditionSeverityWarning, | ||
ReasonWaitingForOwner, | ||
"The owner of this resource cannot be found in Kubernetes. Process is blocked until the owner is created.") | ||
fmt.Sprintf("Owner %q cannot be found. Progress is blocked until the owner is created.", ownerDetails)) |
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.
👍 for actually naming the thing that can't be found.
Co-authored-by: George Pollard <porges@porg.es>
Closes #1455
What this PR does / why we need it:
Improves the message when the owner is missing or wrong. It now reads:
This still isn't perfect because it doesn't explicitly say: "You gave us something that points to the wrong type", but that's actually pretty hard to do because Kubernetes allows multiple resources (of different
Kind
's) to have the same name, so it could be a coincidence that the owner they're looking for just so happens to have the same name as some other resource in the cluster in that same namespace.I think this message should be pretty clear still though as we list the specific type we're looking for in addition to namespace/name, so they should be able to easily
kubectl get <kind> -n <namespace>
and realize the resource we're looking for isn't there.