Skip to content

Commit

Permalink
feat: change project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
chen-keinan committed Oct 6, 2021
1 parent f61ee92 commit 935952b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ coverage.md
coverage.out
mock*
*.iml
mesh-kridik
29 changes: 29 additions & 0 deletions cmd/mesh-kridik/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
##Remote Debug
###Install dlv
$ git clone https://github.com/go-delve/delve.git $GOPATH/src/github.com/go-delve/delve
$ cd $GOPATH/src/github.com/go-delve/delve
$ make install

### export dlv bin path
export PATH=$PATH:/home/vagrant/go/bin
export PATH=$PATH:/root/go/bin

### compile binary with debug params
GOOS=linux GOARCH=amd64 go build -v -gcflags='-N -l' cmd/mesh-kridik/mesh-kridik.go

### run on remote machine

dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./mesh-kridik

docker run --pid=host -v /etc:/etc:ro -v /var:/var:ro -v /*/cni/*:/*/cni/* -t mesh-kridik

docker build ./ -t mesh-kridik -f Dockerfile

export KUBECONFIG=/etc/kubernetes/admin.conf
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
https://github.com/oracle/vagrant-projects

kubectl taint nodes master-node node-role.kubernetes.io/master-
kubectl create clusterrolebinding default-admin --clusterrole cluster-admin --serviceaccount=default:default
9 changes: 9 additions & 0 deletions cmd/mesh-kridik/mesh-kridik.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
"github.com/chen-keinan/mesh-kridik/internal/cli"
)

func main() {
cli.StartCLI()
}

0 comments on commit 935952b

Please sign in to comment.