Closed nan-yu closed 4 years ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: nan-yu
To complete the pull request process, please assign ant31
You can assign the PR to them by writing /assign @ant31
in a comment when ready.
The full list of commands accepted by this bot can be found here.
@janetkuo The PR is updated. Per the API doc, if spec.selector
is nil, it matches no objects. If spec.selector
is empty, it matches all objects.
Unit tests are added to reflect the changes. Please re-review this PR. Thanks.
/lgtm
If no spec.selector.matchingLabels is set, the application controller crashes due to a nil pointer. This commit fixes the issue by checking if selector is nil before getting the matching labels from it. If no selector is set, it matches all objects.