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

Resend config if status reports hash empty #2343

Merged
merged 4 commits into from
Mar 30, 2022
Merged

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Mar 21, 2022

What this PR does / why we need it:
Bumps the Kong version to 2.8, the first version that supports this.

Resends configuration when the proxy instance reports its initial, no config present hash.

Adds tests to verify config recovers after a crash. Fixes a bug where we trusted the standard proxy 404 response when verifying Ingresses due to an improperly-bounded if.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #2107

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@rainest rainest temporarily deployed to Configure ci March 21, 2022 20:56 Inactive
@rainest rainest temporarily deployed to Configure ci March 21, 2022 20:56 Inactive
@rainest rainest temporarily deployed to Configure ci March 21, 2022 20:58 Inactive
@rainest rainest temporarily deployed to Configure ci March 21, 2022 20:59 Inactive
@rainest rainest temporarily deployed to Configure ci March 21, 2022 21:16 Inactive
@rainest rainest temporarily deployed to Configure ci March 21, 2022 21:45 Inactive
@rainest rainest temporarily deployed to Configure ci March 21, 2022 21:46 Inactive
@rainest rainest temporarily deployed to Configure ci March 21, 2022 21:46 Inactive
@rainest
Copy link
Contributor Author

rainest commented Mar 21, 2022

Initial E2E run ran this PR's test successfully, but failed on another existing test due to it not actually deploying an Ingress. Second run after fixing that: https://github.com/Kong/kubernetes-ingress-controller/actions/runs/2018941298

@rainest rainest temporarily deployed to Configure ci March 21, 2022 22:03 Inactive
Check Kong's status endpoint and read its config hash during the update
loop. If the config hash reported by Kong is the known empty hash, send
configuration even our hash is unchanged. This provides configuration to
Kong instances that have unexpectedly crashed and lost their
configuration.
Add a utility function to kill a Kong container to the E2E helpers.

Kill the Kong container at the end of the DB-less E2E test to ensure the
controller pushes configuration after it restarts.

Fix a bug in verifying Ingresses. Previously the helper continued
testing on non-200 responses, and would consider the standard 404
response valid.
@rainest rainest temporarily deployed to Configure ci March 25, 2022 18:24 Inactive
@rainest rainest marked this pull request as ready for review March 25, 2022 18:24
@rainest rainest requested a review from a team as a code owner March 25, 2022 18:24
@rainest rainest temporarily deployed to Configure ci March 25, 2022 18:25 Inactive
@rainest rainest temporarily deployed to Configure ci March 25, 2022 18:40 Inactive
@rainest rainest requested review from shaneutt and a team March 25, 2022 20:34
@rainest rainest changed the title Resent config if status reports hash empty Resend config if status reports hash empty Mar 28, 2022
internal/dataplane/sendconfig/sendconfig.go Show resolved Hide resolved
test/e2e/helpers_test.go Show resolved Hide resolved
@rainest rainest merged commit 32947a5 into main Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingress controller leaves replacement proxy containers without pushed configuration
2 participants