Skip to content

Conversation

alexandrevilain
Copy link
Contributor

What this PR does / why we need it:

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 #1647

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • if necessary:
    • includes documentation
    • adds unit tests

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 27, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 27, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: alexandrevilain / name: Alexandre Vilain (f444006)

@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit f444006
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/6536720f833a8f0008a2bbdc
😎 Deploy Preview https://deploy-preview-1688--kubernetes-sigs-cluster-api-openstack.netlify.app/print
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 27, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @alexandrevilain. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 27, 2023
@lentzi90
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 29, 2023
@alexandrevilain alexandrevilain force-pushed the feat/add-provider-scope-cache branch from 18053d1 to 73a7f8e Compare September 29, 2023 08:06
@alexandrevilain
Copy link
Contributor Author

/retest

@alexandrevilain alexandrevilain force-pushed the feat/add-provider-scope-cache branch from 73a7f8e to da18fbd Compare September 29, 2023 08:23
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 29, 2023
@alexandrevilain
Copy link
Contributor Author

/retest

@mdbooth
Copy link
Contributor

mdbooth commented Sep 29, 2023

@alexandrevilain If you run make lint-update it normally fixes those things for you automatically.

@alexandrevilain alexandrevilain force-pushed the feat/add-provider-scope-cache branch from da18fbd to 2ce485a Compare September 29, 2023 09:10
@alexandrevilain
Copy link
Contributor Author

Oh thanks @mdbooth!

/retest

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 29, 2023
@alexandrevilain alexandrevilain marked this pull request as ready for review October 2, 2023 11:58
@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 Oct 2, 2023
@k8s-ci-robot k8s-ci-robot requested a review from dulek October 2, 2023 11:58
@alexandrevilain
Copy link
Contributor Author

I think it's ready for review.
Tested on my side, after the controller reboots, it makes somes API requests to keystone and then stop doing such request for 12 hours.

main.go Outdated
Comment on lines 163 to 167
if scopeCacheMaxSize <= 0 {
err := errors.New("--scope-cache-max-size should be > 0")
setupLog.Error(err, "unable to start manager")
os.Exit(1)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about allowing 0 cache size as a way to disable caching?
I'm not sure if that is something we need to support but it is often beneficial to be able to opt-out of new features

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea!
Another benefit we can have is to debug without cache if something is going wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, setting the flag to --scope-cache-max-size=0 disable the cache.

@alexandrevilain alexandrevilain force-pushed the feat/add-provider-scope-cache branch from 2ce485a to 7200107 Compare October 4, 2023 07:19
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 4, 2023
Copy link
Contributor

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

Looks good!
/lgtm

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

lentzi90 commented Oct 4, 2023

/test pull-cluster-api-provider-openstack-e2e-full-test

@alexandrevilain
Copy link
Contributor Author

/remove-hold

@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 Oct 13, 2023
@lentzi90
Copy link
Contributor

/cc @mdbooth

Copy link
Contributor

@mdbooth mdbooth left a comment

Choose a reason for hiding this comment

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

I'll try to get to this properly on Monday.

Copy link
Contributor

@seanschneeweiss seanschneeweiss left a comment

Choose a reason for hiding this comment

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

That is a great addition... We faced problems with Keystone as well, potentially related to too many auth requests, which is still being investigated at this point.

Signed-off-by: alexandre.vilain <[email protected]>
@alexandrevilain alexandrevilain force-pushed the feat/add-provider-scope-cache branch from 7200107 to f444006 Compare October 23, 2023 13:15
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 23, 2023
Copy link
Contributor

@seanschneeweiss seanschneeweiss left a comment

Choose a reason for hiding this comment

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

/lgtm

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

Any more comments @mdbooth ? Otherwise I think we can take this in 🙂

Copy link
Contributor

@EmilienM EmilienM left a comment

Choose a reason for hiding this comment

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

/lgtm

@lentzi90
Copy link
Contributor

/hold cancel

@lentzi90
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexandrevilain, EmilienM, lentzi90

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 27, 2023
@k8s-ci-robot k8s-ci-robot merged commit f28da18 into kubernetes-sigs:main Oct 27, 2023
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Controller doesn't cache keystone tokens
6 participants