apecloud / kubeblocks

KubeBlocks is an open-source control plane software that runs and manages databases, message queues and other stateful applications on K8s.
https://kubeblocks.io
GNU Affero General Public License v3.0
2.09k stars 170 forks source link

[Improvement] Add back k8s exec client in kb-agent #8198

Open cjc7373 opened 3 weeks ago

cjc7373 commented 3 weeks ago

Lorry used to have a k8s exec client, which invokes lorry container through kubectl's exec capabilities. It is useful in local debug, as we often run kubeblocks as a process (with go run commands) instead of building an image and running as a pod.

In kb-agent, this exec client is missing and local debug becomes more complicated. I suggest add back exec client.

cjc7373 commented 6 days ago

Using port forward to achieve the same functionality seems to be better, as it reuses the HTTP client. (So that we don't need to deal with things like escaping quotes)