Kong / Kong/kubernetes-testing-framework
Dynamically provision and reserve TCP and UDP stream listen ports
- Dominant language
- Go
- Stars
- 44
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Follow-up from https://github.com/Kong/kubernetes-ingress-controller/pull/1702#discussion_r689675013
Currently Kong clusters spawn with [specific hard-coded TCP and UDP stream ports](https://github.com/Kong/kubernetes-testing-framework/blob/v0.6.1/pkg/clusters/addons/kong/kong.go#L239-L242). Because TCP and UDP routes generally use the destination port to match a route, you cannot run more than one TCP or UDP route test concurrently, or they will create overlapping routes and not make the intended configuration available to test clients.
To allow for concurrent tests, test clients should be able to request that KTF allocate a size N pool of TCP and UDP stream ports, which individual tests can reserve and release when done.
Acceptance criteria:
- [ ] KTF provides a means to request N TCP stream ports and M UDP stream ports when building a Kong cluster.
- [ ] KTF provides a function to reserve and release a random available stream port.
Contributor guide
Research direction
Start with pkg/clusters/addons/kong/kong.go, especially the hard-coded TCP and UDP stream port configuration linked in the issue, and trace how Kong clusters are built. Add cluster-builder options for TCP and UDP port pool sizes plus reservation and release operations, then verify that concurrent stream-route tests can obtain distinct available ports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100