-
Notifications
You must be signed in to change notification settings - Fork 35
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
Parse defaultTransferNetwork annotation with namespace #948
Parse defaultTransferNetwork annotation with namespace #948
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #948 +/- ##
==========================================
+ Coverage 15.83% 16.30% +0.47%
==========================================
Files 108 103 -5
Lines 19973 19332 -641
==========================================
- Hits 3162 3153 -9
+ Misses 16530 15900 -630
+ Partials 281 279 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4a2f843
to
44d776f
Compare
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.
the logic that was introduced in #608 seems to be duplicated here, it would be better to reduce the code duplication, but the change itself looks good
Name: network, | ||
var key client.ObjectKey | ||
|
||
// Netwoek key format <namespace>/<name> or <name>, in case the network key does not |
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.
// Netwoek key format <namespace>/<name> or <name>, in case the network key does not | |
// Network key format <namespace>/<name> or <name>, in case the network key does not |
414350f
to
d74883b
Compare
039c762
to
195391f
Compare
Signed-off-by: yaacov <[email protected]>
195391f
to
707b8bb
Compare
Description
The pull request introduces a conditional check to determine the format of the network key. The key can be in two formats:
<namespace>/<name>
<name>
Explanation
The updated code checks if the network key contains a
/
.strings.SplitN(network, "/", 2)
.mutator.plan.Spec.TargetNamespace
.Summary
mutator.plan.Spec.TargetNamespace
for the Namespace.<namespace>/<name>
), it splits and uses the specified namespace. Otherwise, it defaults to usingmutator.plan.Spec.TargetNamespace
.This enhancement ensures that the correct namespace is used based on the format of the network key, providing greater flexibility and correctness in handling network annotations.