-
Notifications
You must be signed in to change notification settings - Fork 108
🐛 Download and store manifests from provider URL #131
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
Conversation
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexander-demicev 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 |
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.
Few nits, overall LGTM, thanks for the PR @Fedosin
|
||
log := ctrl.LoggerFrom(ctx) | ||
|
||
log.Info("Downloading provider manifests") |
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 could add a verbosity to the logger:
log.Info("Downloading provider manifests") | |
log.V(5).Info("Downloading provider manifests") |
func (p *phaseReconciler) load(ctx context.Context) (reconcile.Result, error) { | ||
log := ctrl.LoggerFrom(ctx) | ||
|
||
log.Info("Loading provider") |
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.
log.Info("Loading provider") | |
log.V(5).Info("Loading provider") |
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 actually moved these logs to the 0 level some time ago so the operator is not too silent by default
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.
@alexander-demicev you mean in all cases? Because I spotted
log.V(5).Info("Custom ConfigMap was provided for fetching manifests") |
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 think setting log level is not strictly related to this PR, so for now we can keep it as-is and address it later.
803636e
to
6c819f6
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
/hold
in case you want someone else as well to do another round of reviews before it is merged.
(@Fedosin feel free to unhold)
6c819f6
to
67bed92
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
/hold cancel |
What this PR does / why we need it:
Currently Cluster API Operator keeps refetching data from the specified URL after successful provider installation. It means that in case of network error Operator can't download manifests again and marks providers as unhealthy.
To prevent this, we fetch manifests only once in the beginning and store them in a configmap. For all the following reconciliations we take data from the configmap instead of downloading it from github/gitlab.
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 #119