-
Notifications
You must be signed in to change notification settings - Fork 529
FIX: namespaced condition for api resource #1199
FIX: namespaced condition for api resource #1199
Conversation
The current code checks if the api resource is namespaced or not by a faulty condition, `apiResource.Namespaced = targetResource.GetNamespace() == ""` If the input kubernetes api-resource has a namespace, the above condition makes the federatedapi-resource not namespaced, due to which the namespaces are not populated in the federatedapi-resource. Changing the above condition to `apiResource.Namespaced = targetResource.GetNamespace() != ""` makes the federated-api-resource as namespaced and sets the namespace as well. Read more on [issue#1181](kubernetes-retired#1181)
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Welcome @binkkatal! |
/check-cla |
/assign @shashidharatd |
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.
Would you be able to add some unit tests for this please? I see there haven't been any before so now would be a good time to add them if you don't mind.
@jimmidyson working on it |
Have added a test case for federating a deployment. let me know if you want to add more cases for unit testing |
@binkkatal thanks for doing this and apologies for a late look. |
@irfanurrehman |
/lgtm |
The build succeed but it didn't get updated its status in the PR yet 🤔, https://travis-ci.org/github/kubernetes-sigs/kubefed/builds/672496415?utm_source=github_status&utm_medium=notification |
@hectorj2f , |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: binkkatal, hectorj2f The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The current code checks if the api resource is namespaced or not by a faulty condition,
If the input kubernetes api-resource has a namespace, the above condition makes the federatedapi-resource not namespaced, due to which the namespaces are not populated in the federatedapi-resource.
Changing the above condition to
makes the federated-api-resource as namespaced and sets the namespace as well.
Read more on issue#1181
What this PR does / why we need it:
#1181
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
#1181
Special notes for your reviewer: