diff --git a/README.md b/README.md index 5383b74..9374191 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,10 @@ Like KubeOrbit idea? ⭐ Give us a GitHub Star! ⭐ ![work in progress badge](https://img.shields.io/badge/stability-work_in_progress-lightgrey.svg?style=flat-square) [![Apache License 2.0](https://img.shields.io/github/license/teamcode-inc/kubeorbit?style=flat-square)](https://github.com/teamcode-inc/kubeorbit/blob/master/LICENSE) -![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/teamcode2021/kubeorbit?style=flat-square) [![Discord channel](https://img.shields.io/discord/930779108818956298?style=flat-square)](https://discord.gg/5XaTS9VArf) -**KubeOrbit** is an open-source abstraction layer library that turns easy apps testing&debuging on Kubernetes in a new way. Our KubeOrbit is meant to create a channel automatically. You can *test* your *cloud-native* applications through this channel in a *hands-free* style. +**KubeOrbit** is an open-source tool that turns easy apps testing&debuging on Kubernetes in a new way. Our KubeOrbit is meant to create a channel automatically. You can *test* your *cloud-native* applications through this channel in a *hands-free* style. It solves the following problems during integration tests: - Under limited resource and restricted environment, developers in a team may be blocked by others who are testing their own functionalities, and it slows down the development progress. @@ -28,20 +27,17 @@ It solves the following problems during integration tests: ## Features From now on, stop testing your application in local infra naively. Also, no more endless efforts in managing various cloud-based test environments. -- **Workload tag**: tag your workload by creating a new channel. Then your request can be routed to the right workload replica, where you can work with your mates to test&debug the same feature together. - **KubeOrbit CLI**: just using one command, forward the traffic from in-cluster service to local service in a flash, no matter your service discovery is based on Eureka, Consul, Nacos or Kubernetes SVC. - **Protocol support**: various protocols based on Layer-7 are supported. HTTP, gRPC, Thrift, Dubbo ... -- **Cost-effective**: when test your app, you don't need to configure the *entire* infra environment. Save your costs by using less resource according to your *incremental* environment request only. That is, you can have an isolated environment built from your base environment, which is achieved by KubeOrbit's high-scalability. +- **Workload tag**: tag your workload by creating a new channel. Then your request can be routed to the right workload replica, where you can work with your mates to test&debug the same feature together. + ## Getting Started With the following tutorials: **KubeOrbit CLI**: * [Getting started](https://www.kubeorbit.io/docs/local-development) - -**KubeOrbit**: -* [Before you begin](https://www.kubeorbit.io/docs/before-you-begin) -* [Getting started](https://www.kubeorbit.io/docs/getting-started) +* [How to build](https://www.kubeorbit.io/docs/how-to-build) ## Contributing diff --git a/go.mod b/go.mod index ce0580b..946d10a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module kubeorbit.io -go 1.16 +go 1.17 require ( github.com/go-logr/logr v1.2.0 @@ -19,3 +19,65 @@ require ( k8s.io/client-go v0.23.0 sigs.k8s.io/controller-runtime v0.11.0 ) + +require ( + cloud.google.com/go v0.81.0 // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.18 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/go-logr/zapr v1.2.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/moby/spdystream v0.2.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/nxadm/tail v1.4.8 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.28.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.19.1 // indirect + golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect + golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect + golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.27.1 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + istio.io/gogo-genproto v0.0.0-20211208193508-5ab4acc9eb1e // indirect + k8s.io/apiextensions-apiserver v0.23.0 // indirect + k8s.io/component-base v0.23.0 // indirect + k8s.io/klog/v2 v2.30.0 // indirect + k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect + k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect + sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) diff --git a/pkg/cli/core/channel.go b/pkg/cli/core/channel.go index 8b06e16..d80f06e 100644 --- a/pkg/cli/core/channel.go +++ b/pkg/cli/core/channel.go @@ -94,8 +94,8 @@ func (c *ChannelListener) ForwardToLocal() error { localConn, err := net.Dial("tcp", localPortAddress) if err != nil { sshConn.Close() - break log.Errorf("connection err %v", err) + break } go func() { var wg sync.WaitGroup diff --git a/pkg/cli/core/forward.go b/pkg/cli/core/forward.go index ac2cd4f..7c7a7a0 100644 --- a/pkg/cli/core/forward.go +++ b/pkg/cli/core/forward.go @@ -41,7 +41,7 @@ func init() { var namespace, deploymentName string func setupCloseHandler() { - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, syscall.SIGTERM) go func() { <-c