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

fix: added may resync check for EKS #2846

Merged
merged 1 commit into from Oct 18, 2021
Merged

fix: added may resync check for EKS #2846

merged 1 commit into from Oct 18, 2021

Conversation

richardcase
Copy link
Member

What type of PR is this?

/kind regression

What this PR does / why we need it:

When EKS was graduated the check to make sure that the
max sync time wasn't greater than 10 mins was missed.

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

Special notes for your reviewer:

Checklist:

  • squashed commits

Release note:

Reinstating the check for the maximum allowed resync period when EKS is enabled.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/regression Categorizes issue or PR as related to a regression from a prior release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 13, 2021
@k8s-ci-robot
Copy link
Contributor

@richardcase: This issue is currently awaiting triage.

If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 13, 2021
main.go Outdated
@@ -289,6 +291,11 @@ func enableGates(ctx context.Context, mgr ctrl.Manager, awsServiceEndpoints []sc
if feature.Gates.Enabled(feature.EKS) {
setupLog.Info("enabling EKS controllers")

if syncPeriod > maxEKSSyncPeriod {
setupLog.Error(errMaxSyncPeriodExceeded, "sync period exceeded maximum allowed when using EKS", "max-sync-period", maxEKSSyncPeriod)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think this will show the same message twice?

""sync period exceeded maximum allowed when using EKS: sync period greater than maximum allowed"

Suggested change
setupLog.Error(errMaxSyncPeriodExceeded, "sync period exceeded maximum allowed when using EKS", "max-sync-period", maxEKSSyncPeriod)
setupLog.Error(errMaxSyncPeriodExceeded, "failed to enable EKS controllers")

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed

@@ -105,7 +105,9 @@ var (
healthAddr string
serviceEndpoints string

errEKSInvalidFlags = errors.New("invalid EKS flag combination")
maxEKSSyncPeriod = time.Minute * 10
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please explain why 10m is the period in a comment, or reference to doc 🙏

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment added

@dlipovetsky
Copy link
Contributor

I hope you can address the comments, but overall looks good. Thanks for fixing this!

/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 13, 2021
When EKS was graduated the check to make sure that the
max sync time wasn't greater than 10 mins was missed.

Signed-off-by: Richard Case <richard@weave.works>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 14, 2021
@randomvariable
Copy link
Member

/priority critical/urgent
/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

@randomvariable: The label(s) priority/critical/urgent cannot be applied, because the repository doesn't have them.

In response to this:

/priority critical/urgent
/lgtm
/approve

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 the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 18, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: randomvariable

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 18, 2021
@randomvariable
Copy link
Member

/cherrypick release-0.7

@k8s-ci-robot k8s-ci-robot merged commit 1c6d0fa into kubernetes-sigs:main Oct 18, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.x milestone Oct 18, 2021
@randomvariable
Copy link
Member

/cherrypick release-0.7

@k8s-infra-cherrypick-robot

@randomvariable: new pull request created: #2856

In response to this:

/cherrypick release-0.7

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.

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. kind/regression Categorizes issue or PR as related to a regression from a prior release. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression of max resync for EKS
5 participants