🐛 Cache: Keep selectors when byObject.Namespaces is defaulted#2747
🐛 Cache: Keep selectors when byObject.Namespaces is defaulted#2747k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
Conversation
Prior to this patch, configuring for example a labelSelector in `ByObject` and then inheriting namespaces from `DefaultNamespaces` meant that the `labelSelector` would be ignored. This is because if namespaces are configured, we set p a multinamespace cache. If we do that, we expect each namespace entry to have the appropriate selectors configured. Unfortunately we defaulted the configs for`byObject.Namespaces` before defaulting `byObject.Namespace` itself, causing the above-described issue. This change also adds a couple more tests for the cache defaulting.
e8ef21b to
b7a9051
Compare
|
/cherrypick release-0.17 |
|
@alvaroaleman: once the present PR merges, I will cherry-pick it on top of release-0.17 in a new PR and assign it to you. DetailsIn response to this:
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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@alvaroaleman: new pull request created: #2749 DetailsIn response to this:
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. |
Prior to this patch, configuring for example a labelSelector in
ByObjectand then inheriting namespaces fromDefaultNamespacesmeant that thelabelSelectorwould be ignored. This is because if namespaces are configured, we set p a multinamespace cache. If we do that, we expect each namespace entry to have the appropriate selectors configured.Unfortunately we defaulted the configs for
byObject.Namespacesbefore defaultingbyObject.Namespaceitself, causing the above-described issue.This change also adds a couple more tests for the cache defaulting.