-
Notifications
You must be signed in to change notification settings - Fork 772
[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
Conversation
f0c42ab
to
b75f632
Compare
This PR has become stale because it has been open for 30 days with no activity. Adding the |
This PR has become stale because it has been open for 30 days with no activity. Adding the |
edff22a
to
402ad07
Compare
tmpnetctl start-kind-cluster --install-chaos-mesh
tmpnetctl start-kind-cluster --install-chaos-mesh
402ad07
to
4610eb8
Compare
There was a problem hiding this 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 andinstallChaosMesh
parameter - Adds Chaos Mesh constants,
deployChaosMesh
,isChaosMeshRunning
, andwaitForChaosMesh
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"
e78a019
to
0b90032
Compare
e2231cd
to
7991525
Compare
0b90032
to
f565e8f
Compare
7991525
to
b9f3df7
Compare
f565e8f
to
7b13cb9
Compare
Updated to use a longer timeout - chaos mesh deployment on top of kind and nginx deployment can take more than 2 minutes. |
Updated to add a CI check of deployment |
5239c5c
to
a6e9a37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - also ran load test with chaos mesh which worked 👍
I'm curious about the architectural decision to have Kind cluster setup entirely in Go code rather than using a more declarative approach with YAML manifests, Helm charts, and scripts. My initial thoughts from a development workflow perspective, a declarative approach might offer some advantages like easier configuration where developers could modify YAML files without recompiling Go code or understanding the For example, something like: # scripts/setup-dev-cluster.sh
./scripts/kind-with-registry.sh
kubectl apply -k {{path}}
helm install ingress-nginx -f values/ingress.yaml
helm install chaos-mesh -f values/chaos-mesh.yaml --create-namespace
kubectl wait --for=condition=available deployment/ingress-nginx-controller However, I recognize there might be good reasons for the Go approach, just curios to understand what drove to having this programatic rather than declarative. |
What you're suggesting would involve replacing logic in golang with logic in a shell script. Sure, the golden path looks nice, but ensuring everything is logged and error checked ends up being more complicated and less reliable than what is possible with golang. I'm also not clear why 'recompiling golang code' would be an issue? ./bin/tmpnetctl already does this automatically, and even that invocation can be with tasks rather than directly. What modifications are you envisioning exactly? |
|
Why this should be merged
Deploying chaos mesh to a local kube cluster is intended to simplify local experimentation with fault injection testing.
How this works
tmpnetctl start-kind-cluster --install-chaos-mesh
How this was tested
tmpnetctl start-kind-cluster --install-chaos-mesh
and ran a chaos experimentNeed to be documented in RELEASES.md?
N/A
TODO