Skip to content

Commit e0a4c8b

Browse files
authored
[Feature] Rebalancer ALPHA (#839)
1 parent b87b641 commit e0a4c8b

27 files changed

+934
-13
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ deps/
99
.vscode/
1010
**/*.enterprise.go
1111
**/enterprise/**
12-
enterprise.mk
12+
enterprise.mk
13+
local/

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Add Topology Discovery
1010
- Add Support for StartupProbe
1111
- Add ARM64 support for Operator Docker image
12+
- Add ALPHA Rebalancer support
1213

1314
## [1.2.4](https://github.com/arangodb/kube-arangodb/tree/1.2.4) (2021-10-22)
1415
- Replace `beta.kubernetes.io/arch` Pod label with `kubernetes.io/arch` using Silent Rotation

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ COMMIT := $(shell git rev-parse --short HEAD)
1212
DOCKERCLI := $(shell which docker)
1313
RELEASE_MODE ?= community
1414

15-
include $(ROOT)/$(RELEASE_MODE).mk
16-
1715
MAIN_DIR := $(ROOT)/pkg/entry/$(RELEASE_MODE)
1816

1917
GOBUILDDIR := $(SCRIPTDIR)/.gobuild
@@ -23,13 +21,16 @@ BINDIR := $(ROOTDIR)/bin
2321
VBINDIR := $(BINDIR)/$(RELEASE_MODE)
2422
VENDORDIR := $(ROOTDIR)/deps
2523
DASHBOARDDIR := $(ROOTDIR)/dashboard
24+
LOCALDIR := $(ROOT)/local
2625

2726
ORGPATH := github.com/arangodb
2827
ORGDIR := $(GOBUILDDIR)/src/$(ORGPATH)
2928
REPONAME := kube-arangodb
3029
REPODIR := $(ORGDIR)/$(REPONAME)
3130
REPOPATH := $(ORGPATH)/$(REPONAME)
3231

32+
include $(ROOT)/$(RELEASE_MODE).mk
33+
3334
GOPATH := $(GOBUILDDIR)
3435
GOVERSION := 1.10.0-alpine
3536

@@ -256,11 +257,11 @@ bin-all: $(BIN) $(VBIN_LINUX_AMD64) $(VBIN_LINUX_ARM64)
256257

257258
$(VBIN_LINUX_AMD64): $(SOURCES) dashboard/assets.go VERSION
258259
@mkdir -p $(BINDIR)/$(RELEASE_MODE)/linux/amd64
259-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build --tags "$(RELEASE_MODE)" -installsuffix netgo -ldflags "-X $(REPOPATH)/pkg/version.version=$(VERSION) -X $(REPOPATH)/pkg/version.buildDate=$(BUILDTIME) -X $(REPOPATH)/pkg/version.build=$(COMMIT)" -o $(VBIN_LINUX_AMD64) ./main.go
260+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build --tags "$(RELEASE_MODE)" -installsuffix netgo -ldflags "-X $(REPOPATH)/pkg/version.version=$(VERSION) -X $(REPOPATH)/pkg/version.buildDate=$(BUILDTIME) -X $(REPOPATH)/pkg/version.build=$(COMMIT)" -o $(VBIN_LINUX_AMD64) ./
260261

261262
$(VBIN_LINUX_ARM64): $(SOURCES) dashboard/assets.go VERSION
262263
@mkdir -p $(BINDIR)/$(RELEASE_MODE)/linux/arm64
263-
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build --tags "$(RELEASE_MODE)" -installsuffix netgo -ldflags "-X $(REPOPATH)/pkg/version.version=$(VERSION) -X $(REPOPATH)/pkg/version.buildDate=$(BUILDTIME) -X $(REPOPATH)/pkg/version.build=$(COMMIT)" -o $(VBIN_LINUX_ARM64) ./main.go
264+
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build --tags "$(RELEASE_MODE)" -installsuffix netgo -ldflags "-X $(REPOPATH)/pkg/version.version=$(VERSION) -X $(REPOPATH)/pkg/version.buildDate=$(BUILDTIME) -X $(REPOPATH)/pkg/version.build=$(COMMIT)" -o $(VBIN_LINUX_ARM64) ./
264265

265266
$(BIN): $(VBIN_LINUX_AMD64)
266267
@cp "$(VBIN_LINUX_AMD64)" "$(BIN)"
@@ -413,7 +414,7 @@ tools: update-vendor
413414
.PHONY: vendor
414415
vendor:
415416
@echo ">> Updating vendor"
416-
@ go mod vendor
417+
@go mod vendor -e
417418

418419
set-deployment-api-version-v2alpha1: export API_VERSION=2alpha1
419420
set-deployment-api-version-v2alpha1: set-api-version/deployment set-api-version/replication

community.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.PHONY: vendor-pre
2+
3+
vendor-pre:
4+
@sed -i "s#\tgithub.com/arangodb/rebalancer#\t// github.com/arangodb/rebalancer#g" "$(ROOT)/go.mod"
5+
6+
vendor: vendor-pre

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ require (
2828
github.com/arangodb/go-driver v1.2.1
2929
github.com/arangodb/go-driver/v2 v2.0.0-20211021031401-d92dcd5a4c83
3030
github.com/arangodb/go-upgrade-rules v0.0.0-20180809110947-031b4774ff21
31+
//github.com/arangodb/rebalancer v0.1.1
3132
github.com/cenkalti/backoff v2.2.1+incompatible
3233
github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9
3334
github.com/evanphx/json-patch v4.9.0+incompatible
@@ -43,7 +44,7 @@ require (
4344
github.com/jessevdk/go-flags v1.5.0 // indirect
4445
github.com/json-iterator/go v1.1.11 // indirect
4546
github.com/julienschmidt/httprouter v1.3.0
46-
github.com/magiconair/properties v1.8.0
47+
github.com/magiconair/properties v1.8.5
4748
github.com/mattn/go-isatty v0.0.13 // indirect
4849
github.com/onsi/gomega v1.7.1 // indirect
4950
github.com/pkg/errors v0.9.1
@@ -52,13 +53,12 @@ require (
5253
github.com/prometheus/client_golang v1.7.1
5354
github.com/robfig/cron v1.2.0
5455
github.com/rs/zerolog v1.19.0
55-
github.com/spf13/cobra v1.0.0
56+
github.com/spf13/cobra v1.2.1
5657
github.com/spf13/pflag v1.0.5
57-
github.com/stretchr/testify v1.6.1
58+
github.com/stretchr/testify v1.7.0
5859
github.com/ugorji/go/codec v1.2.6 // indirect
5960
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
6061
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
61-
golang.org/x/tools v0.1.1-0.20210504181558-0bb7e5c47b1a // indirect
6262
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
6363
google.golang.org/protobuf v1.27.1 // indirect
6464
gopkg.in/yaml.v2 v2.4.0 // indirect

0 commit comments

Comments
 (0)