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

⚠️ Flatten fields in controller.Options #2307

Merged

Conversation

alvaroaleman
Copy link
Member

Currently, controller.Options embedds config.Controller. This makes its usage pretty annoying, to set MaxConcurrentReconciles for example, one has to do it like this:

controller.Options{config.Options{MaxConcurrentReconciles: 8}}

This makes it harder to find what options exist and causes a lot of churn for downstream consumers. Re-Define the fields from config.Controller in controller.Options instead to avoid that.

This also fixes some defaulting bugs where we wouldn't default MaxConcurrentReconciles and CacheSyncTimeout from the config.Controller setting in the manager.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 7, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman

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 May 7, 2023
@alvaroaleman alvaroaleman added this to the v0.15.x milestone May 7, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 7, 2023
@alvaroaleman alvaroaleman changed the title :warn: Flatten fields in controller.Options ⚠️ : Flatten fields in controller.Options May 7, 2023
@alvaroaleman alvaroaleman changed the title ⚠️ : Flatten fields in controller.Options ⚠️ Flatten fields in controller.Options May 7, 2023
@alvaroaleman alvaroaleman force-pushed the flatten-controller-opts branch 2 times, most recently from 74bcf1e to 9d38074 Compare May 7, 2023 22:49
Currently, `controller.Options` embedds `config.Controller`. This makes
its usage pretty annoying, to set `MaxConcurrentReconciles` for example,
one has to do it like this:

```
controller.Options{config.Options{MaxConcurrentReconciles: 8}}
```

This makes it harder to find what options exist and causes a lot of
churn for downstream consumers. Re-Define the fields from
`config.Controller` in `controller.Options` instead to avoid that.

This also fixes some defaulting bugs where we wouldn't default
`MaxConcurrentReconciles` and `CacheSyncTimeout` from the
`config.Controller` setting in the manager.
@sbueringer
Copy link
Member

sbueringer commented May 9, 2023

/lgtm

/hold
because of #2307 (comment) (I think it can be a follow-up if we want to implement something)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 9, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 9, 2023
@vincepri
Copy link
Member

/hold cancel
/lgtm

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 10, 2023
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 10, 2023

@alvaroaleman: 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-controller-runtime-apidiff c1b8baf link false /test pull-controller-runtime-apidiff

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 merged commit 7a3c9ec into kubernetes-sigs:main May 10, 2023
8 of 9 checks passed
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants