Skip to content
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

✨ Label selector conditional reconciler #9003

Conversation

Danil-Grigorev
Copy link
Member

@Danil-Grigorev Danil-Grigorev commented Jul 14, 2023

What this PR does / why we need it:
This implementation may allow users to optionally reconcile resources based on watch-expression flag. With the flag in place, provided label selector expression will evaluate each resource preventing reconciliation. Based on https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#set-based-requirement

Examples may include ignoring resources marked by a label:

label-name notin (value)

Which issue(s) this PR fixes
This implementation covers the basic scenario of == and !=, in and notin on resource labels.

Fixes #7775

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 14, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fabriziopandini for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

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

@k8s-ci-robot k8s-ci-robot requested review from chrischdi and elmiko July 14, 2023 10:40
@Danil-Grigorev Danil-Grigorev force-pushed the label-selector-conditional-reconciler branch from 45af36e to e44db26 Compare July 14, 2023 11:06
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 14, 2023
@Danil-Grigorev Danil-Grigorev force-pushed the label-selector-conditional-reconciler branch from e44db26 to 549d567 Compare July 14, 2023 11:09
@Danil-Grigorev Danil-Grigorev changed the title ✨ Label selector conditional reconciler ✨ [WIP] Label selector conditional reconciler Jul 14, 2023
@Danil-Grigorev Danil-Grigorev changed the title ✨ [WIP] Label selector conditional reconciler [WIP] ✨ Label selector conditional reconciler Jul 14, 2023
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 14, 2023
@Danil-Grigorev Danil-Grigorev force-pushed the label-selector-conditional-reconciler branch 2 times, most recently from 8ae74db to 549d567 Compare July 18, 2023 14:35
@Danil-Grigorev Danil-Grigorev changed the title [WIP] ✨ Label selector conditional reconciler ✨ Label selector conditional reconciler Jul 18, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 18, 2023
@k8s-ci-robot
Copy link
Contributor

@Danil-Grigorev: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-apidiff-main 8e8b092 link false /test pull-cluster-api-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 7, 2023
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

@vincepri
Copy link
Member

Closing this due to inactivity, feel free to reopen when ready to discuss again.

/close

@k8s-ci-robot
Copy link
Contributor

@vincepri: Closed this PR.

In response to this:

Closing this due to inactivity, feel free to reopen when ready to discuss again.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend the ability for CAPI to filter what CRs it reconciles
3 participants