-
Notifications
You must be signed in to change notification settings - Fork 589
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
feat(konnect): allow configuring license polling periods #4178
Conversation
7cf1b7c
to
4475453
Compare
E2E (targeted) tests were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/5268606896 |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #4178 +/- ##
=======================================
+ Coverage 60.5% 61.0% +0.4%
=======================================
Files 150 150
Lines 16822 16897 +75
=======================================
+ Hits 10194 10320 +126
+ Misses 5984 5931 -53
- Partials 644 646 +2
☔ View full report in Codecov by Sentry. |
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.
The upstream endpoint apparently does weird things that it kinda shouldn't re 404s, but it looks like it was already kinda doing that. It's not clear whether the existing 404 case should have ever occurred in practice, but it was in the code, so 🤷
Main change request is to treat that as not an error, since it's expected, so we shouldn't make that the odd error out that's actually control flow. Rest is mostly comment/log clarification.
Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com>
I was coding this following the To address the concerns about the weirdness of 404 being handled in our code differently based on the error type down the stack, I refactored the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.10.x release/2.10.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.10.x
# Create a new branch
git switch --create backport-4178-to-release/2.10.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 991908b2e489add251064425e3879b5145a66dfa
# Push it to GitHub
git push --set-upstream origin backport-4178-to-release/2.10.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.10.x Then, create a pull request where the |
Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com>
…d tests (#4172) * tests: migrate GatewayClass related integration tests to envtest based tests * chore(deps): bump k8s.io/code-generator in /third_party (#4189) Bumps [k8s.io/code-generator](https://github.com/kubernetes/code-generator) from 0.27.2 to 0.27.3. - [Commits](kubernetes/code-generator@v0.27.2...v0.27.3) --- updated-dependencies: - dependency-name: k8s.io/code-generator dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat(konnect): allow configuring license polling periods (#4178) Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com> * chore(deps): bump github.com/golangci/golangci-lint in /third_party (#4188) Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.53.2 to 1.53.3. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](golangci/golangci-lint@v1.53.2...v1.53.3) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/api from 0.27.2 to 0.27.3 (#4183) Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.27.2 to 0.27.3. - [Commits](kubernetes/api@v0.27.2...v0.27.3) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/component-base from 0.27.2 to 0.27.3 (#4185) Bumps [k8s.io/component-base](https://github.com/kubernetes/component-base) from 0.27.2 to 0.27.3. - [Commits](kubernetes/component-base@v0.27.2...v0.27.3) --- updated-dependencies: - dependency-name: k8s.io/component-base dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/kubectl from 0.27.2 to 0.27.3 (#4187) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.27.2 to 0.27.3. - [Commits](kubernetes/kubectl@v0.27.2...v0.27.3) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump google.golang.org/api from 0.127.0 to 0.128.0 (#4192) Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.127.0 to 0.128.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.127.0...v0.128.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/prometheus/client_golang (#4184) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests: fix flaky updates in TestGatewayFilters --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com> Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com>
Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com>
What this PR does / why we need it:
Adds
--konnect-initial-license-polling-period
and--konnect-license-polling-period
CLI flags that allow configuring periods at which we poll license from Konnect.Changes the
license.Agent
's behavior so that if it fails to fetch a license at the first attempt, it will retry with the initial period (which by default is1m
) instead of the regular period (which is12h
). It will make it possible to perform smoother upgrades from free to higher Konnect tiers with no KIC restart required.Which issue this PR fixes:
Closes #4147.
Special notes for your reviewer:
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR