Skip to content

Commit 8780b0b

Browse files
author
lamai93
committed
Merge remote-tracking branch 'origin/master' into bug-fix/scale-up-error
2 parents 18cff92 + afd5dea commit 8780b0b

23 files changed

+270
-25
lines changed

Makefile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ GOVERSION := 1.10.0-alpine
2727
PULSAR := $(GOBUILDDIR)/bin/pulsar$(shell go env GOEXE)
2828
GOASSETSBUILDER := $(GOBUILDDIR)/bin/go-assets-builder$(shell go env GOEXE)
2929

30-
DOCKERFILE := Dockerfile
30+
DOCKERFILE := Dockerfile
3131
DOCKERTESTFILE := Dockerfile.test
3232
DOCKERDURATIONTESTFILE := tests/duration/Dockerfile
3333

34-
ifndef LOCALONLY
34+
ifndef LOCALONLY
3535
PUSHIMAGES := 1
3636
IMAGESHA256 := true
3737
else
3838
IMAGESHA256 := false
3939
endif
4040

41-
ifdef IMAGETAG
41+
ifdef IMAGETAG
4242
IMAGESUFFIX := :$(IMAGETAG)
43-
else
43+
else
4444
IMAGESUFFIX := :dev
4545
endif
4646

@@ -84,8 +84,8 @@ TESTBINNAME := $(PROJECT)_test
8484
TESTBIN := $(BINDIR)/$(TESTBINNAME)
8585
DURATIONTESTBINNAME := $(PROJECT)_duration_test
8686
DURATIONTESTBIN := $(BINDIR)/$(DURATIONTESTBINNAME)
87-
RELEASE := $(GOBUILDDIR)/bin/release
88-
GHRELEASE := $(GOBUILDDIR)/bin/github-release
87+
RELEASE := $(GOBUILDDIR)/bin/release
88+
GHRELEASE := $(GOBUILDDIR)/bin/github-release
8989

9090
TESTLENGTHOPTIONS := -test.short
9191
TESTTIMEOUT := 20m
@@ -94,7 +94,7 @@ ifeq ($(LONG), 1)
9494
TESTTIMEOUT := 180m
9595
endif
9696
ifdef VERBOSE
97-
TESTVERBOSEOPTIONS := -v
97+
TESTVERBOSEOPTIONS := -v
9898
endif
9999

100100
SOURCES := $(shell find $(SRCDIR) -name '*.go' -not -path './test/*')
@@ -176,7 +176,7 @@ update-vendor:
176176
# Manually restore arangosync vendor with: git checkout deps/github.com/arangodb/arangosync
177177

178178
.PHONY: update-generated
179-
update-generated: $(GOBUILDDIR)
179+
update-generated: $(GOBUILDDIR)
180180
@docker build $(SRCDIR)/tools/codegen --build-arg GOVERSION=$(GOVERSION) -t k8s-codegen
181181
docker run \
182182
--rm \
@@ -232,7 +232,7 @@ ifdef PUSHIMAGES
232232
docker push $(OPERATORIMAGE)
233233
endif
234234

235-
# Manifests
235+
# Manifests
236236

237237
.PHONY: manifests
238238
manifests: $(GOBUILDDIR)
@@ -268,7 +268,7 @@ run-unit-tests: $(GOBUILDDIR) $(SOURCES)
268268
$(REPOPATH)/pkg/util/k8sutil \
269269
$(REPOPATH)/pkg/util/k8sutil/test \
270270
$(REPOPATH)/pkg/util/probe \
271-
$(REPOPATH)/pkg/util/validation
271+
$(REPOPATH)/pkg/util/validation
272272

273273
$(TESTBIN): $(GOBUILDDIR) $(SOURCES)
274274
@mkdir -p $(BINDIR)
@@ -376,20 +376,20 @@ $(RELEASE): $(GOBUILDDIR) $(SOURCES) $(GHRELEASE)
376376
.PHONY: build-ghrelease
377377
build-ghrelease: $(GHRELEASE)
378378

379-
$(GHRELEASE): $(GOBUILDDIR)
379+
$(GHRELEASE): $(GOBUILDDIR)
380380
GOPATH=$(GOBUILDDIR) go build -o $(GHRELEASE) github.com/aktau/github-release
381381

382382
.PHONY: release-patch
383383
release-patch: $(RELEASE)
384-
GOPATH=$(GOBUILDDIR) $(RELEASE) -type=patch
384+
GOPATH=$(GOBUILDDIR) $(RELEASE) -type=patch
385385

386386
.PHONY: release-minor
387387
release-minor: $(RELEASE)
388388
GOPATH=$(GOBUILDDIR) $(RELEASE) -type=minor
389389

390390
.PHONY: release-major
391391
release-major: $(RELEASE)
392-
GOPATH=$(GOBUILDDIR) $(RELEASE) -type=major
392+
GOPATH=$(GOBUILDDIR) $(RELEASE) -type=major
393393

394394
## Kubernetes utilities
395395

@@ -410,4 +410,4 @@ redeploy-operator: delete-operator manifests
410410
kubectl apply -f $(MANIFESTPATHDEPLOYMENT)
411411
kubectl apply -f $(MANIFESTPATHDEPLOYMENTREPLICATION)
412412
kubectl apply -f $(MANIFESTPATHTEST)
413-
kubectl get pods
413+
kubectl get pods

docs/design/acceptance_test.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,3 +472,62 @@ Remove the collections with the replication factor of 1
472472

473473
- [ ] The remaining `Pods` running on the `Node` must be restarted on another `Node`
474474
- [ ] After the `Pods` have restarted, the server must have the same data, except for the removed collections, and be responsive again
475+
476+
### Test 7a: Test DC2DC on 2 clusters, running in the same Kubernetes cluster
477+
478+
This test requires the use of the enterprise image.
479+
480+
Create 2 `ArangoDeployment` of mode `Cluster` and dc2dc enabled.
481+
482+
Hint: Derive from `tests/acceptance/cluster-sync.yaml`, name the deployments `cluster1` and `cluster2`.
483+
484+
Make sure to include a name ('cluster1-to-2`) for an external access package.
485+
486+
```yaml
487+
apiVersion: "database.arangodb.com/v1alpha"
488+
kind: "ArangoDeployment"
489+
metadata:
490+
name: "cluster1"
491+
spec:
492+
mode: Cluster
493+
image: ewoutp/arangodb:3.3.14
494+
sync:
495+
enabled: true
496+
externalAccess:
497+
accessPackageSecretNames: ["cluster1-to-2"]
498+
```
499+
500+
- [ ] The deployments must start
501+
- [ ] The deployments must yield 15 `Pods`
502+
- [ ] The deployments must yield a `Service` named `cluster[1|2]`
503+
- [ ] The deployments must yield a `Service` named `cluster[1|2]-ea`
504+
- [ ] The deployments must yield a `Service` named `cluster[1|2]-sync`
505+
- [ ] The `Services` named `cluster[1|2]-ea` must be accessible from outside (LoadBalancer or NodePort) and show WebUI
506+
507+
Create an `ArangoDeploymentReplication` from `tests/acceptance/cluster12-replication.yaml`.
508+
509+
It will take some time until the synchronization (from `cluster1` to `cluster2`) is configured.
510+
511+
- [ ] The status of the `cluster12-replication` resource shows ....
512+
- [ ] The webUI of `cluster1` shows that you can create a new collection there.
513+
- [ ] The webUI of `cluster2` shows that you cannot create a new collection there.
514+
515+
Create a collection named `testcol` with a replication factor 2 and 3 shards (using the webUI of `cluster1`).
516+
517+
- [ ] The webUI of `cluster2` shows collection `testcol` with the given replication factor and number of shards.
518+
519+
Create multiple documents in the collection named `testcol` (using the webUI of `cluster1`).
520+
521+
- [ ] The documents are visible in webUI of `cluster2`.
522+
523+
Modify multiple documents in the collection named `testcol` (using the webUI of `cluster1`).
524+
525+
- [ ] The modified documents are visible in webUI of `cluster2`.
526+
527+
Remove one or more documents from the collection named `testcol` (using the webUI of `cluster1`).
528+
529+
- [ ] The documents are no longer visible in webUI of `cluster2`.
530+
531+
Create a new database called `db2` (using the webUI of `cluster1`).
532+
533+
- [ ] The webUI of `cluster2` shows database `db2`.

examples/cluster1-with-sync.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: "cluster1-with-sync"
55
spec:
66
mode: Cluster
7-
image: ewoutp/arangodb:3.3.8
7+
image: arangodb/arangodb:3.3.17
88
tls:
99
altNames: ["kube-01", "kube-02", "kube-03"]
1010
sync:

examples/cluster2-with-sync.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: "cluster2-with-sync"
55
spec:
66
mode: Cluster
7-
image: ewoutp/arangodb:3.3.8
7+
image: arangodb/arangodb:3.3.17
88
tls:
99
altNames: ["kube-01", "kube-02", "kube-03"]
1010
sync:

examples/production-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ metadata:
44
name: "production-cluster"
55
spec:
66
mode: Cluster
7-
image: arangodb/arangodb:3.3.10
7+
image: arangodb/arangodb:3.3.17
88
environment: Production

examples/simple-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ metadata:
44
name: "example-simple-cluster"
55
spec:
66
mode: Cluster
7-
image: arangodb/arangodb:3.3.10
7+
image: arangodb/arangodb:3.3.17

examples/single-server.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ metadata:
44
name: "example-simple-single"
55
spec:
66
mode: Single
7-
image: arangodb/arangodb-preview:3.3
7+
image: arangodb/arangodb:3.3.17

pkg/deployment/resources/pod_creator.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,6 @@ func (r *Resources) createReadinessProbe(spec api.DeploymentSpec, group api.Serv
375375
InitialDelaySeconds: 2,
376376
PeriodSeconds: 2,
377377
}
378-
switch spec.GetMode() {
379-
case api.DeploymentModeActiveFailover:
380-
probeCfg.LocalPath = "/_admin/echo"
381-
}
382378
return probeCfg, nil
383379
}
384380

tests/acceptance/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cluster1.yaml
2+
cluster2.yaml
3+
generated
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: "database.arangodb.com/v1alpha"
2+
kind: "ArangoDeployment"
3+
metadata:
4+
name: "acceptance-activefailover"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: ActiveFailover

0 commit comments

Comments
 (0)