Skip to content

Commit

Permalink
move to kube-proxy2
Browse files Browse the repository at this point in the history
  • Loading branch information
mcluseau committed Jan 24, 2020
1 parent 6193623 commit a2481ef
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/kube-localnet-api
/kube-proxy2
.*.sw[po]
/test-run.*.log
2 changes: 1 addition & 1 deletion .off/endpoints-ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net"

"k8s.io/klog"
"github.com/mcluseau/kube-localnet-api/pkg/diffstore"
"github.com/mcluseau/kube-proxy2/pkg/diffstore"
)

var endpointsIPsStore = diffstore.New()
Expand Down
2 changes: 1 addition & 1 deletion .off/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/OneOfOne/xxhash"
"github.com/golang/protobuf/proto"

"github.com/mcluseau/kube-localnet-api/pkg/api/localnetv1"
"github.com/mcluseau/kube-proxy2/pkg/api/localnetv1"
)

func localnetExtIptables() {
Expand Down
4 changes: 2 additions & 2 deletions .off/localnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"path"
"sort"

"github.com/mcluseau/kube-localnet-api/pkg/api/localnetv1"
"github.com/mcluseau/kube-localnet-api/pkg/store"
"github.com/mcluseau/kube-proxy2/pkg/api/localnetv1"
"github.com/mcluseau/kube-proxy2/pkg/store"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion .off/service-port-targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net"

"github.com/mcluseau/kube-localnet-api/pkg/diffstore"
"github.com/mcluseau/kube-proxy2/pkg/diffstore"
)

var servicePortTargetsStore = diffstore.New()
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from mcluseau/golang-builder:1.13.6 as build
from alpine:3.10
entrypoint ["/bin/kube-localnet-api"]
entrypoint ["/bin/kube-proxy2"]
run apk add --update iptables iproute2
copy --from=build /go/bin/ /bin/
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/mcluseau/kube-localnet-api
module github.com/mcluseau/kube-proxy2

go 1.13

require (
github.com/OneOfOne/xxhash v1.2.7
github.com/OneOfOne/xxhash v1.2.7 // indirect
github.com/cespare/xxhash v1.1.0
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 // indirect
github.com/gogo/protobuf v1.3.1
Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"github.com/spf13/cobra"

"github.com/mcluseau/kube-localnet-api/pkg/api/localnetv1"
"github.com/mcluseau/kube-localnet-api/pkg/endpoints"
"github.com/mcluseau/kube-localnet-api/pkg/proxy"
srvendpoints "github.com/mcluseau/kube-localnet-api/pkg/server/endpoints"
"github.com/mcluseau/kube-proxy2/pkg/api/localnetv1"
"github.com/mcluseau/kube-proxy2/pkg/endpoints"
"github.com/mcluseau/kube-proxy2/pkg/proxy"
srvendpoints "github.com/mcluseau/kube-proxy2/pkg/server/endpoints"

"k8s.io/klog"
)
Expand All @@ -23,7 +23,7 @@ func main() {
proxy.InitFlags(flag.CommandLine)

cmd := cobra.Command{
Use: "localnet-api",
Use: "proxy2",
Run: run,
}

Expand Down
4 changes: 2 additions & 2 deletions modd.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
**/*.go go.mod go.sum {
prep: go test ./...
prep: go build .
daemon: ./kube-localnet-api --kubeconfig "$KUBECONFIG" --master "$KUBE_MASTER"
#daemon: ./kube-localnet-api --kubeconfig "$KUBECONFIG" --master "$KUBE_MASTER" --netns test \
daemon: ./kube-proxy2 --kubeconfig "$KUBECONFIG" --master "$KUBE_MASTER"
#daemon: ./kube-proxy2 --kubeconfig "$KUBECONFIG" --master "$KUBE_MASTER" --netns test \
# --iptables-chain-prefix KUBE-
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/endpoints/correlator.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/google/btree"
"k8s.io/klog"

"github.com/mcluseau/kube-localnet-api/pkg/api/localnetv1"
"github.com/mcluseau/kube-localnet-api/pkg/proxy"
"github.com/mcluseau/kube-proxy2/pkg/api/localnetv1"
"github.com/mcluseau/kube-proxy2/pkg/proxy"
)

type Correlator struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoints/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package endpoints
import (
"github.com/google/btree"

"github.com/mcluseau/kube-localnet-api/pkg/api/localnetv1"
"github.com/mcluseau/kube-proxy2/pkg/api/localnetv1"
)

type endpointsKV struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoints/service-endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
discovery "k8s.io/api/discovery/v1beta1"
"k8s.io/apimachinery/pkg/util/sets"

"github.com/mcluseau/kube-localnet-api/pkg/api/localnetv1"
"github.com/mcluseau/kube-proxy2/pkg/api/localnetv1"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/endpoints/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/mcluseau/kube-localnet-api/pkg/api/localnetv1"
"github.com/mcluseau/kube-proxy2/pkg/api/localnetv1"
)

var _ localnetv1.EndpointsServer = &Server{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/endpoints/server.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package endpoints

import "github.com/mcluseau/kube-localnet-api/pkg/endpoints"
import "github.com/mcluseau/kube-proxy2/pkg/endpoints"

type Server struct {
InstanceID uint64
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package store
import (
"testing"

"github.com/mcluseau/kube-localnet-api/pkg/api/localnetv1"
"github.com/mcluseau/kube-proxy2/pkg/api/localnetv1"
)

func TestNext(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ docker pull mcluseau/kube-proxy2
* rev = real changes that would be propagated to listeners
* eventCount = number of API events received

Collected using `time timeout 30m ./kube-localnet-api --kubeconfig $KUBECONFIG |tee test-run.XXX.log`
Collected using `time timeout 30m ./kube-proxy2 --kubeconfig $KUBECONFIG |tee test-run.XXX.log`

On an empty KinD cluster:
```
Expand Down

0 comments on commit a2481ef

Please sign in to comment.