Two corrections on top of the naming pass, both found by checking the live cluster rather than the source. The rename had silently changed the user-facing annotation key from argocd.argoproj.io/sync-wave to cd.argoproj.io/sync-wave — 63 live Applications carry the old key, so deploying that would have ignored every sync-wave and broken fleet deploy ordering. The key is now cd.hanzo.ai/*, and universe 575650286 moves the ApplicationSet template that stamps it, so the controller regenerates all 63 consistently. The API group in code said argoproj.io/v1alpha1 in 157 places while the cluster has served apps.hanzo.ai/v1alpha1 since 2026-07-23 (the CRDs are applications.apps.hanzo.ai). Code now matches what is actually served. The legacy applications.argoproj.io/app-name label had ZERO live users, so it went with the rest. foo.argoproj.io test fixtures became foo.example.com — arbitrary test domains should not carry a vendor name. go build ./... exit 0. Co-authored-by: Hanzo Dev <[email protected]>
3.8 KiB
Debugging a Remote Hanzo CD Environment
In this guide, we will describe how to debug a remote Hanzo CD environment with Telepresence.
Telepresence allows you to connect & debug a service deployed in a remote environment and to "cherry-pick" one service to run locally, staying connected to the remote cluster. This will:
- Reduce resource footprint on the local machine
- Decrease the feedback loop time
- Result in more confidence about the delivered code.
To read more about it, refer to the official documentation at telepresence.io or Medium.
Install Hanzo CD
First of all, install Hanzo CD on your cluster
kubectl create ns cd
curl -sSfL https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml | kubectl apply -n cd -f -
Connect
Connect to one of the services, for example, to debug the main Hanzo CD server run:
kubectl config set-context --current --namespace cd
telepresence helm install --set-json agent.securityContext={} # Installs telepresence into your cluster
telepresence connect # Starts the connection to your cluster (bound to the current namespace)
telepresence intercept cd-server --port 8080:http --env-file .envrc.remote # Starts the interception
--portforwards traffic of remote port http to 8080 locally (use--port 8080:httpsif cd-server terminates TLS)--env-filewrites all the environment variables of the remote pod into a local file, the variables are also set on the subprocess of the--runcommand
With this, any traffic that hits your cd-server service in the cluster (e.g. through a LB / ingress) will be forwarded to your laptop on port 8080. So that you can now start cd-server locally to debug or test new code. If you launch cd-server using the environment variables in .envrc.remote, it is able to fetch all the configmaps, secrets and so on from the cluster and transparently connect to the other microservices so that no further configuration should be necessary, and it behaves exactly the same as in the cluster.
List current status of Telepresence using:
telepresence status
Stop the intercept using:
telepresence leave cd-server
And uninstall telepresence from your cluster:
telepresence helm uninstall
See this quickstart for more information on how to intercept services using Telepresence.
Connect (telepresence v1)
Use the following command instead:
telepresence --swap-deployment cd-server --namespace cd --env-file .envrc.remote --expose 8080:8080 --expose 8083:8083 --run bash
--swap-deploymentchanges the cd-server deployment--exposeforwards traffic of remote ports 8080 and 8083 to the same ports locally--env-filewrites all the environment variables of the remote pod into a local file, the variables are also set on the subprocess of the--runcommand--rundefines which command to run once a connection is established, usebash,zshor others
Debug
Once a connection is established, use your favorite tools to start the server locally.
Terminal
- Compile
make server - Run
./dist/cd-server
VSCode
In VSCode use the following launch configuration to run cd-server:
{
"name": "Launch cd-server",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/main.go",
"envFile": [
"${workspaceFolder}/.envrc.remote",
],
"env": {
"CD_BINARY_NAME": "cd-server",
"CGO_ENABLED": "0",
"KUBECONFIG": "/path/to/kube/config"
}
}