-
Notifications
You must be signed in to change notification settings - Fork 280
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
[ARG] Add an option to disable API call cache #4135
[ARG] Add an option to disable API call cache #4135
Conversation
✅ Deploy Preview for kubernetes-sigs-cloud-provide-azure canceled.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lzhecheng 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 |
0e57022
to
d6b67e2
Compare
d6b67e2
to
75d20f8
Compare
3386915
to
e1bb0d5
Compare
/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz |
e1bb0d5
to
263fa0a
Compare
263fa0a
to
bf8fc1e
Compare
bf8fc1e
to
b99a610
Compare
// NewTimedcache creates a new TimedCache. | ||
func NewTimedcache(ttl time.Duration, getter GetFunc) (*TimedCache, error) { | ||
// NewTimedCache creates a new azcache.Resource. | ||
func NewTimedCache(ttl time.Duration, getter GetFunc, disabled bool) (Resource, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getter is only used by apicaller. Maybe we can create another newapicaller func for apicaller?
And we also need another new function to assemble Resource impl based on the config(cacheDisabled)
Last but not least, we also need to generate mock for ut.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean a New()
methods is needed for Resource
interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@@ -742,6 +745,10 @@ func (az *Cloud) getPutVMSSVMBatchSize() int { | |||
} | |||
|
|||
func (az *Cloud) initCaches() (err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can init cache at creation time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the creation time? Could you please share which line of the code?
New option: disableAPICallCache When ARG is enabled, this option should be true. Signed-off-by: Zhecheng Li <zhechengli@microsoft.com>
b99a610
to
5d65ed3
Compare
/lgtm |
Fixed: #4130 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
[ARG] Add an option to disable API call cache
New option: disableAPICallCache
When ARG is enabled, this option should be true.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: