Skip to content

Commit

Permalink
rename porter to porterlb
Browse files Browse the repository at this point in the history
Signed-off-by: Duan Jiong <[email protected]>
  • Loading branch information
duanjiong committed Mar 11, 2021
1 parent 7f0cc7f commit 65bff13
Show file tree
Hide file tree
Showing 35 changed files with 123 additions and 118 deletions.
24 changes: 12 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,39 @@ All notable changes to this project will be documented in this file.
## [ 0.1.1 ] - 2019-09-09

### Added
- [🚒 use annotation to store eip](https://github.com/kubesphere/porter/pull/57)
- [add Porter intro of English version](https://github.com/kubesphere/porter/pull/53)
- [🚒 use annotation to store eip](https://github.com/kubesphere/porterlb/pull/57)
- [add Porter intro of English version](https://github.com/kubesphere/porterlb/pull/53)

### Changed
- [🌟 upgrade to kubebuilder 2.0](https://github.com/kubesphere/porter/pull/54)
- [⏫upgrade kustomize](https://github.com/kubesphere/porter/pull/55)
- [🌟 upgrade to kubebuilder 2.0](https://github.com/kubesphere/porterlb/pull/54)
- [⏫upgrade kustomize](https://github.com/kubesphere/porterlb/pull/55)

### Fixed
- [🚒 fix e2e](https://github.com/kubesphere/porter/pull/56)
- [🚒 fix e2e](https://github.com/kubesphere/porterlb/pull/56)

## [ 0.1.0 ] - 2019-03-31

### Added
- add portforward for nonstandard bgp port <https://github.com/kubesphere/porter/pull/37>
- add doc about setting up in real router <https://github.com/kubesphere/porter/pull/36>
- add portforward for nonstandard bgp port <https://github.com/kubesphere/porterlb/pull/37>
- add doc about setting up in real router <https://github.com/kubesphere/porterlb/pull/36>
- more tests


## [ 0.0.3 ] - 2019-03-26

### Added
- new Jenkinsfile <https://github.com/kubesphere/porter/pull/29>
- new Jenkinsfile <https://github.com/kubesphere/porterlb/pull/29>

### Fixed
- duplicated externalIPs in `kubectl get svc` <https://github.com/kubesphere/porter/pull/27>
- duplicated externalIPs in `kubectl get svc` <https://github.com/kubesphere/porterlb/pull/27>
- update docs

## [ 0.0.2 ] - 2019-03-25

### Added
- auto detect main interface instead of using `eth0` <https://github.com/kubesphere/porter/pull/23>
- add e2e test <https://github.com/kubesphere/porter/pull/23>
- auto detect main interface instead of using `eth0` <https://github.com/kubesphere/porterlb/pull/23>
- add e2e test <https://github.com/kubesphere/porterlb/pull/23>

### Fixed
- fix the reconcile logic which add route without waiting for all endpoints <https://github.com/kubesphere/porter/pull/24>
- fix the reconcile logic which add route without waiting for all endpoints <https://github.com/kubesphere/porterlb/pull/24>
- Update readme
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

FROM golang:1.15 as porter-builder

COPY / /go/src/github.com/kubesphere/porter
COPY / /go/src/github.com/kubesphere/porterlb

WORKDIR /go/src/github.com/kubesphere/porter
RUN GO111MODULE=on CGO_ENABLED=0 go install -i -ldflags '-w -s' github.com/kubesphere/porter/cmd/...
WORKDIR /go/src/github.com/kubesphere/porterlb
RUN GO111MODULE=on CGO_ENABLED=0 go install -i -ldflags '-w -s' github.com/kubesphere/porterlb/cmd/...
RUN GO111MODULE=on CGO_ENABLED=0 go install -i -ldflags '-w -s' github.com/osrg/gobgp/cmd/gobgp

FROM alpine:3.9
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ test: fmt vet

# Build manager binary
manager: fmt vet
#CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o bin/manager github.com/kubesphere/porter/cmd/manager
CGO_ENABLED=0 go build -o bin/manager github.com/kubesphere/porter/cmd/manager
#CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o bin/manager github.com/kubesphere/porterlb/cmd/manager
CGO_ENABLED=0 go build -o bin/manager github.com/kubesphere/porterlb/cmd/manager


deploy: generate
Expand Down Expand Up @@ -61,11 +61,11 @@ clean-up:
./hack/cleanup.sh

release: deploy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/manager-linux-amd64 github.com/kubesphere/porter/cmd/manager
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/agent-linux-amd64 github.com/kubesphere/porter/cmd/agent
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/manager-linux-amd64 github.com/kubesphere/porterlb/cmd/manager
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/agent-linux-amd64 github.com/kubesphere/porterlb/cmd/agent
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/gobgp-linux-amd64 github.com/osrg/gobgp/cmd/gobgp
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o bin/manager-linux-arm64 github.com/kubesphere/porter/cmd/manager
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o bin/agent-linux-arm64 github.com/kubesphere/porter/cmd/agent
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o bin/manager-linux-arm64 github.com/kubesphere/porterlb/cmd/manager
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o bin/agent-linux-arm64 github.com/kubesphere/porterlb/cmd/agent
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o bin/gobgp-linux-arm64 github.com/osrg/gobgp/cmd/gobgp
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform linux/amd64,linux/arm64 -t ${IMG_AGENT} -f ./cmd/agent/Dockerfile . --push
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform linux/amd64,linux/arm64 -t ${IMG_MANAGER} -f ./cmd/manager/Dockerfile . --push
Expand Down
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
domain: kubesphere.io
repo: github.com/kubesphere/porter
repo: github.com/kubesphere/porterlb
resources:
- group: network
kind: Eip
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha2/eip_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"reflect"
"strings"

"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/manager/client"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/manager/client"
cnet "github.com/projectcalico/libcalico-go/lib/net"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
4 changes: 2 additions & 2 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package main
import (
"os"

"github.com/kubesphere/porter/pkg/log"
"github.com/kubesphere/porterlb/pkg/log"

networkv1alpha2 "github.com/kubesphere/porter/api/v1alpha2"
networkv1alpha2 "github.com/kubesphere/porterlb/api/v1alpha2"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
Expand Down
28 changes: 15 additions & 13 deletions cmd/manager/app/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ package app
import (
"flag"
"fmt"
networkv1alpha2 "github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/leader-elector"
"github.com/kubesphere/porter/pkg/speaker"
networkv1alpha2 "github.com/kubesphere/porterlb/api/v1alpha2"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/leader-elector"
"github.com/kubesphere/porterlb/pkg/speaker"
clientset "k8s.io/client-go/kubernetes"
"os"

"github.com/kubesphere/porter/cmd/manager/app/options"
"github.com/kubesphere/porter/pkg/controllers/bgp"
"github.com/kubesphere/porter/pkg/controllers/ipam"
"github.com/kubesphere/porter/pkg/controllers/lb"
"github.com/kubesphere/porter/pkg/log"
"github.com/kubesphere/porter/pkg/manager"
bgpd "github.com/kubesphere/porter/pkg/speaker/bgp"
"github.com/kubesphere/porterlb/cmd/manager/app/options"
"github.com/kubesphere/porterlb/pkg/controllers/bgp"
"github.com/kubesphere/porterlb/pkg/controllers/ipam"
"github.com/kubesphere/porterlb/pkg/controllers/lb"
"github.com/kubesphere/porterlb/pkg/log"
"github.com/kubesphere/porterlb/pkg/manager"
bgpd "github.com/kubesphere/porterlb/pkg/speaker/bgp"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
Expand Down Expand Up @@ -105,16 +105,18 @@ func Run(c *options.PorterManagerOptions) error {
return err
}

stopCh := ctrl.SetupSignalHandler()

k8sClient := clientset.NewForConfigOrDie(ctrl.GetConfigOrDie())
leader.LeaderElector(k8sClient, *c.Leader)
leader.LeaderElector(stopCh, k8sClient, *c.Leader)

err = speaker.RegisterSpeaker(constant.PorterProtocolBGP, bgpServer)
if err != nil {
setupLog.Error(err, "unable to register bgp speaker")
return err
}

if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
if err := mgr.Start(stopCh); err != nil {
setupLog.Error(err, "unable to run the manager")
return err
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/manager/app/options/options.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package options

import (
"github.com/kubesphere/porter/pkg/leader-elector"
"github.com/kubesphere/porter/pkg/log"
"github.com/kubesphere/porter/pkg/manager"
"github.com/kubesphere/porter/pkg/speaker/bgp"
"github.com/kubesphere/porterlb/pkg/leader-elector"
"github.com/kubesphere/porterlb/pkg/log"
"github.com/kubesphere/porterlb/pkg/manager"
"github.com/kubesphere/porterlb/pkg/speaker/bgp"
cliflag "k8s.io/component-base/cli/flag"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package main

import (
"github.com/kubesphere/porter/cmd/manager/app"
"github.com/kubesphere/porterlb/cmd/manager/app"
"os"
)

Expand Down
4 changes: 2 additions & 2 deletions doc/how-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ This document describes how to build the Porter project.
## Prerequisites

* You need to prepare a Linux environment.
* You need to install [Go 1.12 or later](https://github.com/kubesphere/porter/blob/master/doc/how-to-build.md).
* You need to install [Go 1.12 or later](https://github.com/kubesphere/porterlb/blob/master/doc/how-to-build.md).
* You need to install [Docker](https://www.docker.com/get-started).
* You need to install [Docker Buildx](https://www.docker.com/blog/getting-started-with-docker-for-arm-on-linux/).

## Procedure

1. Log in to your environment, and run the following commands to clone the Porter project and go to the `porter` directory:
```bash
git clone https://github.com/kubesphere/porter.git
git clone https://github.com/kubesphere/porterlb.git
```

```bash
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/kubesphere/porter
module github.com/kubesphere/porterlb

go 1.12

Expand Down
8 changes: 4 additions & 4 deletions pkg/controllers/bgp/bgpconf_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"reflect"
"time"

"github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/speaker/bgp"
"github.com/kubesphere/porter/pkg/util"
"github.com/kubesphere/porterlb/api/v1alpha2"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/speaker/bgp"
"github.com/kubesphere/porterlb/pkg/util"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
8 changes: 4 additions & 4 deletions pkg/controllers/bgp/bgppeer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"reflect"
"time"

"github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/speaker/bgp"
"github.com/kubesphere/porter/pkg/util"
"github.com/kubesphere/porterlb/api/v1alpha2"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/speaker/bgp"
"github.com/kubesphere/porterlb/pkg/util"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/bgp/eventhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bgp

import (
"context"
"github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porterlb/api/v1alpha2"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/workqueue"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down
12 changes: 6 additions & 6 deletions pkg/controllers/bgp/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ package bgp

import (
"context"
"github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/manager"
"github.com/kubesphere/porter/pkg/manager/client"
"github.com/kubesphere/porter/pkg/speaker/bgp"
"github.com/kubesphere/porter/pkg/util"
"github.com/kubesphere/porterlb/api/v1alpha2"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/manager"
"github.com/kubesphere/porterlb/pkg/manager/client"
"github.com/kubesphere/porterlb/pkg/speaker/bgp"
"github.com/kubesphere/porterlb/pkg/util"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
Expand Down
10 changes: 5 additions & 5 deletions pkg/controllers/ipam/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"strings"

"github.com/go-logr/logr"
networkv1alpha2 "github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/speaker"
"github.com/kubesphere/porter/pkg/speaker/layer2"
"github.com/kubesphere/porter/pkg/util"
networkv1alpha2 "github.com/kubesphere/porterlb/api/v1alpha2"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/speaker"
"github.com/kubesphere/porterlb/pkg/speaker/layer2"
"github.com/kubesphere/porterlb/pkg/util"
cnet "github.com/projectcalico/libcalico-go/lib/net"
v1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down
6 changes: 3 additions & 3 deletions pkg/controllers/ipam/ipam_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"testing"

"github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/speaker"
"github.com/kubesphere/porterlb/api/v1alpha2"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/speaker"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
Expand Down
10 changes: 5 additions & 5 deletions pkg/controllers/lb/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"math/rand"
"reflect"

"github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/controllers/ipam"
"github.com/kubesphere/porter/pkg/util"
"github.com/kubesphere/porter/pkg/validate"
"github.com/kubesphere/porterlb/api/v1alpha2"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/controllers/ipam"
"github.com/kubesphere/porterlb/pkg/util"
"github.com/kubesphere/porterlb/pkg/validate"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
14 changes: 7 additions & 7 deletions pkg/controllers/lb/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import (
"testing"
"time"

networkv1alpha2 "github.com/kubesphere/porter/api/v1alpha2"
"github.com/kubesphere/porter/pkg/constant"
"github.com/kubesphere/porter/pkg/controllers/ipam"
"github.com/kubesphere/porter/pkg/manager"
"github.com/kubesphere/porter/pkg/manager/client"
"github.com/kubesphere/porter/pkg/speaker"
"github.com/kubesphere/porter/pkg/util"
networkv1alpha2 "github.com/kubesphere/porterlb/api/v1alpha2"
"github.com/kubesphere/porterlb/pkg/constant"
"github.com/kubesphere/porterlb/pkg/controllers/ipam"
"github.com/kubesphere/porterlb/pkg/manager"
"github.com/kubesphere/porterlb/pkg/manager/client"
"github.com/kubesphere/porterlb/pkg/speaker"
"github.com/kubesphere/porterlb/pkg/util"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
Expand Down
Loading

0 comments on commit 65bff13

Please sign in to comment.