Skip to content

[tmpnet] Enable externally accessible URIs for kube-hosted nodes #4016

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

maru-ava
Copy link
Contributor

@maru-ava maru-ava commented Jun 17, 2025

Why this should be merged

Previously, access from outside of a kube cluster was enabled by port-forwarding through the kube API. This approach turned out incompatible with load testing because it greatly limited the rate at which transactions could be sent.

The port-forwarding is replaced with nginx+ingress to ensure minimum overhead when running outside of a kube cluster.

How this works

  • deploy kind cluster with a static NodePort
  • deploy the nginx ingress operator with helm and configure to use the NodePort
  • update kube runtime to create a service and ingress for each node to configure external accessibility via nginx
  • replace GetLocalURI with simplified GetAccessibleURI
  • enabled configuration of the base accessible URI to enable use of a hosted kube cluster

How this was tested

CI

Need to be documented in RELEASES.md?

N/A

TODO

  • Perform self-review
  • Ensure attribution for kind-with-registry.sh

Previously, access from outside of a kube cluster was enabled by
port-forwarding through the kube API. This approach turned out
incompatible with load testing because it greatly limited the rate at
which transactions could be sent.

The port-forwarding is replaced with nginx+ingress to ensure minimum
overhead when running outside of a kube cluster.
@maru-ava maru-ava self-assigned this Jun 17, 2025
@Copilot Copilot AI review requested due to automatic review settings June 17, 2025 07:34
@maru-ava maru-ava added testing This primarily focuses on testing tooling Build, test and development tooling labels Jun 17, 2025
@maru-ava maru-ava marked this pull request as draft June 17, 2025 07:35
@maru-ava maru-ava moved this to In Progress 🏗️ in avalanchego Jun 17, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces port-forwarding with an externally accessible URI approach for kube-hosted nodes in order to improve load testing performance. Key changes include refactoring functions from GetLocalURI to GetAccessibleURI (and staking address equivalents), adding new logic to create Kubernetes Service and Ingress resources, and updating tests to use the new accessible URI methods.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/fixture/tmpnet/utils.go Updated error handling in CheckNodeHealth and simplified Node URI retrieval
tests/fixture/tmpnet/start_kind_cluster.go Added functions to deploy and verify the nginx ingress controller via Helm
tests/fixture/tmpnet/process_runtime.go Replaced GetLocalURI with GetAccessibleURI and updated staking address method
tests/fixture/tmpnet/node.go Updated Node interface methods to use the accessible URI versions
tests/fixture/tmpnet/network.go Updated network URI retrieval to use GetAccessibleURI
tests/fixture/tmpnet/kube_runtime.go Refactored URI retrieval for nodes to support external access and added Service/Ingress
tests/fixture/tmpnet/flags/kube_runtime.go Introduced new flag for base accessible URI configuration
tests/e2e/* Updated tests to use GetAccessibleURI (and staking address) throughout
scripts/kind-with-registry.sh Added a new script to set up kind with a local registry
flake.nix Removed kind-with-registry derivation and updated PATH configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing This primarily focuses on testing tooling Build, test and development tooling
Projects
Status: In Progress 🏗️
Development

Successfully merging this pull request may close these issues.

1 participant