Skip to content
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

feature: enable debugging locally without building images #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ptyin
Copy link
Member

@ptyin ptyin commented Feb 28, 2024

What this PR does?

  1. Modify the statefulset pod qualified name from seata-server-0.seata-server-cluster.default.svc to seata-server-0.seata-server-cluster.default.svc.cluster.local (the former can not be resolved using telepresence).
  2. Add developer usage in README

Usage

See README.md or README.zh.md.

To debug this operator locally, we suggest you use a test k8s environment like minikube.

  1. Method 1. Modify code and build the controller image:

    Assume you are using minikube for testing,

    eval $(minikube docker-env)
    make docker-build deploy
  2. Method 2. Locally debug without building images

    You need to use telepresence to proxy traffic to the k8s cluster, see telepresence tutorial to install its cli tool and traffic manager. After installing telepresence, you can connect to minikube by following commands:

    telepresence connect
    # Check if traffic manager connected
    telepresence status

    By executing above commands, you can use in-cluster DNS resolution and proxy your requests to the cluster. And then you can use IDE to run or debug locally:

    # Make sure generate proper resources first
    make manifests generate fmt vet
    
    go run .
    # Or you can use IDE to run locally instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant