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

Compass-Manager: Increase reconciliation requeue time when kubeconfig is missing #142

Merged

Conversation

koala7659
Copy link
Contributor

@koala7659 koala7659 commented Mar 22, 2024

When Kubeconfig for reconcilled Kyma reosource is missing - the reconciliation ends and is scheduled again after requeueTime.

This kubecofing secret might just yet not be created by KIM and we need just to wait for it.

But from the other side this may cause that reconciliation is endlessly processed for Kymas when kubeconfig secret is missing permanetly.

To avoid service overload the decission is to increase the requeue time in such a case from 5 seconds into 3 minutes.

Additionally

  • Golang version update to 1.21.8
  • Golang libs update to latest versions
  • Vulnerable libs update after trivy scan

@koala7659 koala7659 requested a review from a team as a code owner March 22, 2024 14:45
@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 22, 2024
@kyma-bot kyma-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 22, 2024
@kyma-bot kyma-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 22, 2024
@koala7659 koala7659 changed the title Increase requeue time when kubeconfig is missing Compass-Manager: Increase requeue time when kubeconfig is missing Mar 22, 2024
@@ -151,8 +154,8 @@ func (cm *CompassManagerReconciler) Reconcile(ctx context.Context, req ctrl.Requ

// Kubeconfig doesn't exist / is empty
if isNotFound(err) || len(kubeconfig) == 0 {
cm.Log.Infof("Kubeconfig for Kyma resource %s not available.", req.Name)
return ctrl.Result{RequeueAfter: cm.requeueTime}, nil
cm.Log.Infof("Kubeconfig for Kyma resource %s not available. Next attempt in 3 minutes", req.Name)
Copy link
Member

Choose a reason for hiding this comment

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

Next attempt in 3 minutes will be false if the requeueTimeForKubeconfig is changed to a different value.
Could it be changed e.g. to use the current requeueTimeForKubeconfig?

@koala7659 koala7659 changed the title Compass-Manager: Increase requeue time when kubeconfig is missing Compass-Manager: Increase reconciliation requeue time when kubeconfig is missing Mar 25, 2024
@kyma-bot kyma-bot added the lgtm Looks good to me! label Mar 25, 2024
@kyma-bot kyma-bot merged commit e935366 into kyma-project:main Mar 25, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! 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.

3 participants