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

🌱 Make controller mandatory param for external object tracker #11283

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

Karthik-K-N
Copy link
Contributor

What this PR does / why we need it:

This PR makes changes to make controller param in object tracker a mandatory one, Till today function was behaving as no-op. This mandate make few test files to be updated to set the controller.

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 # Follow up of discssion #11188 (comment)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 11, 2024
@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-area PR is missing an area label size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 11, 2024
@Karthik-K-N
Copy link
Contributor Author

Similar kind of change is required for few other test files as well, Just wanted to get confirmation on the approach to follow to do wider set of changes.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 14, 2024
@Karthik-K-N
Copy link
Contributor Author

PR needs rebase.

I will fix this based on the review comments.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 15, 2024
@Karthik-K-N
Copy link
Contributor Author

Made most of the changes, Only topology tests are failing, Exploring on possible ways to fix them.

Copy link
Contributor Author

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes are done and the PR is ready for review. Thank you.

@@ -138,6 +141,11 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, opt
func (r *Reconciler) SetupForDryRun(recorder record.EventRecorder) {
r.desiredStateGenerator = desiredstate.NewGenerator(r.Client, r.ClusterCache, r.RuntimeClient)
r.recorder = recorder
r.externalTracker = external.ObjectTracker{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need special attention, I thought it does not have any other side effects so did this change make topology test pass.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 18, 2024
@sbueringer
Copy link
Member

Just a few minor findings

@Karthik-K-N
Copy link
Contributor Author

Updated the PR with following changes

  1. Used externalfake instead of fakeController aliase
  2. Used fakeclient.Scheme() instead of runtime.NewScheme()

PR is ready for review. Thanks.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 21, 2024
@sbueringer
Copy link
Member

Thank you very much!!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 21, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 531b72e6ea0b6c8735c46c8c5d5a18fa2b4e8f95

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 21, 2024
@sbueringer sbueringer added the area/util Issues or PRs related to utils label Oct 21, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label Oct 21, 2024
@k8s-ci-robot k8s-ci-robot merged commit 48d26cb into kubernetes-sigs:main Oct 21, 2024
19 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Oct 21, 2024
@Karthik-K-N Karthik-K-N deleted the noop-controller branch October 21, 2024 08:41
@Karthik-K-N Karthik-K-N mentioned this pull request Oct 22, 2024
2 tasks
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. area/util Issues or PRs related to utils 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants