Skip to content

Conversation

@alvaroaleman
Copy link
Member

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 forbyObject.Namespaces before defaulting byObject.Namespace itself, causing the above-described issue.

This change also adds a couple more tests for the cache defaulting.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 31, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 31, 2024
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.
@alvaroaleman
Copy link
Member Author

/cherrypick release-0.17

@k8s-infra-cherrypick-robot

@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.

In response to this:

/cherrypick release-0.17

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.

@alvaroaleman alvaroaleman requested a review from sbueringer April 1, 2024 02:33
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 2, 2024
@k8s-ci-robot
Copy link
Contributor

[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

Needs approval from an approver in each of these files:
  • OWNERS [alvaroaleman,vincepri]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-infra-cherrypick-robot

@alvaroaleman: new pull request created: #2749

In response to this:

/cherrypick release-0.17

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.

@alvaroaleman alvaroaleman deleted the cache-fixes branch April 2, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

4 participants