Skip to content

[tmpnet] Enable installation of chaos mesh to local kind cluster #3674

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 12 commits into
base: tmpnet-nginx-ingress
Choose a base branch
from

Conversation

maru-ava
Copy link
Contributor

@maru-ava maru-ava commented Jan 25, 2025

Why this should be merged

Deploying chaos mesh to a local kube cluster simplifies learning about the reactions of an avalanchego network to fault injection scenarios.

How this works

  • Updates

How this was tested

  • CI against regression
  • Manually invoked tmpnetctl start-kind-cluster --install-chaos-mesh and ran a chaos experiment
    • A future fault injection CI job will validate chaos mesh deployment

Need to be documented in RELEASES.md?

N/A

TODO

@maru-ava maru-ava added the testing This primarily focuses on testing label Jan 25, 2025
@maru-ava maru-ava self-assigned this Jan 25, 2025
Copy link

github-actions bot commented Mar 2, 2025

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

@joshua-kim joshua-kim moved this from In Progress 🏗️ to Backlog 🧊 in avalanchego May 1, 2025
Copy link

github-actions bot commented Jun 1, 2025

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

@maru-ava maru-ava moved this from Backlog 🧊 to Ready 🚦 in avalanchego Jul 9, 2025
@maru-ava maru-ava force-pushed the install-chaos-mesh branch from edff22a to 402ad07 Compare July 9, 2025 02:40
@maru-ava maru-ava changed the base branch from reuse-kube-install to tmpnet-nginx-ingress July 9, 2025 02:40
@maru-ava maru-ava changed the title [testing] Install chaos mesh in local kind cluster [tmpnet] Enable tmpnetctl start-kind-cluster --install-chaos-mesh Jul 9, 2025
@maru-ava maru-ava changed the title [tmpnet] Enable tmpnetctl start-kind-cluster --install-chaos-mesh [tmpnet] Enable installation of chaos mesh to local kind cluster Jul 9, 2025
@maru-ava maru-ava force-pushed the install-chaos-mesh branch from 402ad07 to 4610eb8 Compare July 9, 2025 02:41
@maru-ava maru-ava requested a review from Copilot July 9, 2025 02:41
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 adds an optional flag to install Chaos Mesh into a local kind cluster, updates existing ingress controller port usage to a shared constant, and integrates Chaos Mesh deployment logic with Helm and readiness checks.

  • Introduces --install-chaos-mesh flag and installChaosMesh parameter
  • Adds Chaos Mesh constants, deployChaosMesh, isChaosMeshRunning, and waitForChaosMesh functions
  • Refactors ingress port settings to use ingressNodePort constant and updates the kind script comment

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/fixture/tmpnet/tmpnetctl/main.go Adds installChaosMesh flag and passes it through to StartKindCluster
tests/fixture/tmpnet/start_kind_cluster.go Defines Chaos Mesh constants, handles installChaosMesh branch, and implements Helm deployment and readiness polling
scripts/kind-with-registry.sh Updates comment to reference the ingressNodePort constant
Comments suppressed due to low confidence (2)

tests/fixture/tmpnet/start_kind_cluster.go:131

  • No existing tests cover the installChaosMesh branch; consider adding a unit or integration test to verify that Chaos Mesh is deployed when the flag is set.
	if installChaosMesh {

tests/fixture/tmpnet/start_kind_cluster.go:58

  • Accessing the dashboard at chaos-mesh.localhost requires a hosts entry (e.g., /etc/hosts); please document this requirement in the README or RELEASES.md.
	chaosMeshDashboardHost  = "chaos-mesh.localhost"

@maru-ava maru-ava force-pushed the install-chaos-mesh branch 2 times, most recently from e78a019 to 0b90032 Compare July 9, 2025 02:51
@maru-ava maru-ava force-pushed the tmpnet-nginx-ingress branch from e2231cd to 7991525 Compare July 18, 2025 05:18
@maru-ava maru-ava force-pushed the install-chaos-mesh branch from 0b90032 to f565e8f Compare July 18, 2025 05:20
@maru-ava maru-ava force-pushed the tmpnet-nginx-ingress branch from 7991525 to b9f3df7 Compare July 18, 2025 16:41
maru-ava added 7 commits July 21, 2025 02:54
Previously the scheduling label and value required to enable exclusive
scheduling were defined as flag defaults. To enable the cluster to
define these defaults, the defaults are now sourced from a configmap
in the target namespace.
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.
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
Projects
Status: Ready 🚦
Development

Successfully merging this pull request may close these issues.

2 participants