-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 clusterctl cert-manager timeout configurable #2834
✨ Make clusterctl cert-manager timeout configurable #2834
Conversation
/cc @fabriziopandini |
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.
@nader-ziada
Considering that cert-manager-timeout
is a simple variable, IMO we can do a much simpler solution using o.configClient.Variables
instead of introducting a full fladged CertManagerTimeoutClient
.
On the contrary, the CertManagerTimeoutClient
can be justified only if we plan to support many other timeouts in the future, but in this case we should create a generic TimeoutClient
backed by a configuration entry with type map[string]time.Duration
@nader-ziada @vincepri @wfernandes opinions?
func (cm *certManagerClient) getWaitTimeout() time.Duration { | ||
log := logf.Log | ||
|
||
timeout, err := cm.configClient.CertManagerTimeout().Get() |
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.
Can we do o.configClient.Variables.Get(overrideFolderKey)
like we are already doing for e.g. overrideFolders
f, err := o.configVariablesClient.Get(overrideFolderKey) |
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.
I agree with leveraging the Variables Client.
As an example if you define certManagerTimeout
similar to the overridesFolder
in clusterctl.yaml. It should be made accessible via the variables client. Then we don't need ot have a specific client just for a component's timeout.
overridesFolder:${ARTIFACTS}/testdata |
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.
ok, I was just trying to follow the pattern I found, will re-work it
fd39aad
to
dec981a
Compare
@fabriziopandini @wfernandes made the switch to variables, please take another look |
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.
@nader-ziada thanks for reworking!
/approve
|
||
timeout, err := cm.configClient.Variables().Get(timeoutConfigKey) | ||
if err != nil { | ||
return waitCertManagerTimeout |
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.
nit (not blocking) waitCertManagerDefaultTimeout
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.
changed it
- cert-manager-timeout can be set in config file - default of 10 minutes if no value is set
dec981a
to
cd655cd
Compare
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.
/lgtm
/milestone v0.3.4
/approve per @fabriziopandini approval above |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini, nader-ziada, vincepri 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 |
What this PR does / why we need it:
**Which issue(s) this PR fixes
Fixes #2822