fix(api) support HTTP/2 status and metrics requests #8687
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Rework the status and metrics endpoint implementations to make them not break on HTTP/2.
Full changelog
Issue reference
Discovered that Kong/kubernetes-ingress-controller#2343 did not work with HTTPS during post-release testing. We'd prefer to change the Kong end rather than disable HTTP/2 across the board on the controller end.
Implements @dndx's suggestion from #8528
Draft problems
Edit: 671e15e works around this: #8687 (comment)
This exposes a possible issue in spec/02-integration/02-cmd/02-start_stop_spec.lua:
This change adds a unix socket that is almost always (either admin or status listen enabled) present. I think I'm hitting something in those tests that has multiple overlapping Kong instances. The
cat
error just before the conflict suggests we were trying to check if an instance was still up and/or kill it but failed due to a missing pidfile, but I'm not familiar enough with the tests to say for sure. I can't reproduce it when testing locally--I get no PID conflicts, just complaints about Cassandra and Postgres availability in 3 out of 39 tests. The issue flakes/does not occur consistently.Manual testing (do we have HTTP/2 test client stuff yet?): example.txt