refactor: refactor command dev (#309)

This commit is contained in:
naison
2024-07-26 21:11:59 +08:00
committed by GitHub
parent 9283c2f8f7
commit 49adeac14c
16 changed files with 1011 additions and 2379 deletions

View File

@@ -400,7 +400,7 @@ Run the Kubernetes pod in the local Docker container, and cooperate with the ser
the specified header to the local, or all the traffic to the local.
```shell
➜ ~ kubevpn dev deployment/authors --headers a=1 -it --rm --entrypoint sh
➜ ~ kubevpn dev deployment/authors --headers a=1 --entrypoint sh
connectting to cluster
start to connect
got cidr from cache
@@ -500,13 +500,13 @@ docker logs $(docker ps --format '{{.Names}}' | grep nginx_default_kubevpn)
If you just want to start up a docker image, you can use a simple way like this:
```shell
kubevpn dev deployment/authors --no-proxy -it --rm
kubevpn dev deployment/authors --no-proxy
```
Example
```shell
➜ ~ kubevpn dev deployment/authors --no-proxy -it --rm
➜ ~ kubevpn dev deployment/authors --no-proxy
connectting to cluster
start to connect
got cidr from cache
@@ -567,14 +567,7 @@ e008f553422a: Pull complete
33f0298d1d4f: Pull complete
Digest: sha256:115b975a97edd0b41ce7a0bc1d8428e6b8569c91a72fe31ea0bada63c685742e
Status: Downloaded newer image for naison/kubevpn:v2.0.0
root@d0b3dab8912a:/app# kubevpn dev deployment/authors --headers user=naison -it --entrypoint sh
----------------------------------------------------------------------------------
Warn: Use sudo to execute command kubevpn can not use user env KUBECONFIG.
Because of sudo user env and user env are different.
Current env KUBECONFIG value:
----------------------------------------------------------------------------------
root@d0b3dab8912a:/app# kubevpn dev deployment/authors --headers user=naison --entrypoint sh
hostname is d0b3dab8912a
connectting to cluster
start to connect