Skip to content

Commit b1d4297

Browse files
committed
Merge branch 'master' of ssh://github.com/arangodb/kube-arangodb
2 parents 6a438db + f46ef15 commit b1d4297

31 files changed

+231
-79
lines changed
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: "database.arangodb.com/v1alpha"
2+
kind: "ArangoDeployment"
3+
metadata:
4+
name: "acceptance-cluster"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: Cluster
11+
agents:
12+
storageClassName: acceptance
13+
dbservers:
14+
storageClassName: acceptance
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: "database.arangodb.com/v1alpha"
2+
kind: "ArangoDeployment"
3+
metadata:
4+
name: "acceptance-cluster"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: Cluster
11+
sync:
12+
enabled: true
13+
externalAccess:
14+
type: LoadBalancer
15+
accessPackageSecretNames: ["src-accesspackage"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: "database.arangodb.com/v1alpha"
2+
kind: "ArangoDeployment"
3+
metadata:
4+
name: "acceptance-cluster2"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: Cluster
11+
sync:
12+
enabled: true
13+
externalAccess:
14+
type: LoadBalancer
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-cluster"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: Cluster

tests/acceptance/semiautomation/helper.fish

+19
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,22 @@ function fail
9191
output "Failed" $argv
9292
exit 1
9393
end
94+
95+
function patchYamlFile
96+
set -l YAMLFILE $argv[1]
97+
set -l IMAGE $argv[2]
98+
set -l ENVIRONMENT $argv[3]
99+
set -l RESULT $argv[4]
100+
cp "$YAMLFILE" "$RESULT"
101+
sed -i "s|@IMAGE@|$IMAGE|" "$RESULT"
102+
sed -i "s|@ENVIRONMENT|$ENVIRONMENT|" "$RESULT"
103+
end
104+
105+
function checkImages
106+
if test -z "$ARANGODB_COMMUNITY" -o -z "$ARANGODB_ENTERPRISE"
107+
echo "Need ARANGODB_COMMUNITY and ARANGODB_ENTERPRISE."
108+
exit 1
109+
end
110+
end
111+
112+
checkImages
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: "storage.arangodb.com/v1alpha"
2+
kind: "ArangoLocalStorage"
3+
metadata:
4+
name: "acceptance-local-storage"
5+
spec:
6+
storageClass:
7+
name: acceptance
8+
localPath:
9+
- /var/lib/acceptance-test
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-single"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: Single

tests/acceptance/semiautomation/test1a.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test1a
66
set -g TESTDESC "Deployment of mode single (development)"
7-
set -g YAMLFILE generated/single-community-dev.yaml
7+
set -g YAMLFILE single.yaml
88
set -g DEPLOYMENT acceptance-single
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Development work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 120
1416
and waitForKubectl "get service" "$DEPLOYMENT *ClusterIP" 8529 1 120
1517
and waitForKubectl "get service" "$DEPLOYMENT-ea *LoadBalancer" "-v;pending" 1 180
@@ -25,7 +27,7 @@ output "Work" "Now please check external access on this URL with your browser:"
2527
inputAndLogResult
2628

2729
# Cleanup
28-
kubectl delete -f $YAMLFILE
30+
kubectl delete -f work.yaml
2931
waitForKubectl "get pod" $DEPLOYMENT-sngl "" 0 120
3032
or fail "Could not delete deployment."
3133

tests/acceptance/semiautomation/test1b.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test1b
66
set -g TESTDESC "Deployment of mode active/failover (development)"
7-
set -g YAMLFILE generated/activefailover-community-dev.yaml
7+
set -g YAMLFILE activefailover.yaml
88
set -g DEPLOYMENT acceptance-activefailover
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Development work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 120
1416
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*1/1 *Running" "" 1 120
1517
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*0/1 *Running" "" 1 120
@@ -27,7 +29,7 @@ output "Work" "Now please check external access on this URL with your browser:"
2729
inputAndLogResult
2830

2931
# Cleanup
30-
kubectl delete -f $YAMLFILE
32+
kubectl delete -f work.yaml
3133
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
3234
or fail "Could not delete deployment."
3335

tests/acceptance/semiautomation/test1c.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test1c
66
set -g TESTDESC "Deployment of mode cluster (development, enterprise)"
7-
set -g YAMLFILE generated/cluster-enterprise-dev.yaml
7+
set -g YAMLFILE cluster.yaml
88
set -g DEPLOYMENT acceptance-cluster
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
1416
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
1517
and waitForKubectl "get pod" "$DEPLOYMENT-crdn" "1/1 *Running" 3 120
@@ -27,7 +29,7 @@ output "Work" "Now please check external access on this URL with your browser:"
2729
inputAndLogResult
2830

2931
# Cleanup
30-
kubectl delete -f $YAMLFILE
32+
kubectl delete -f work.yaml
3133
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
3234
or fail "Could not delete deployment."
3335

tests/acceptance/semiautomation/test1d.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test1d
66
set -g TESTDESC "Deployment of mode cluster with sync (development, enterprise)"
7-
set -g YAMLFILE generated/cluster-sync-enterprise-dev.yaml
7+
set -g YAMLFILE cluster-sync.yaml
88
set -g DEPLOYMENT acceptance-cluster
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 15 120
1416
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
1517
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
@@ -31,7 +33,7 @@ output "Work" "Now please check external access on this URL with your browser:"
3133
inputAndLogResult
3234

3335
# Cleanup
34-
kubectl delete -f $YAMLFILE
36+
kubectl delete -f work.yaml
3537
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
3638
or fail "Could not delete deployment."
3739

tests/acceptance/semiautomation/test2a.fish

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
source helper.fish
44

55
set -g TESTNAME test2a
6-
set -g TESTDESC "Scale an active failover deployment (enterprise)"
7-
set -g YAMLFILE generated/activefailover-enterprise-dev.yaml
6+
set -g TESTDESC "Scale an active failover deployment (enterprise, development)"
7+
set -g YAMLFILE activefailover.yaml
88
set -g DEPLOYMENT acceptance-activefailover
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 120
1416
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*1/1 *Running" "" 1 120
1517
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*0/1 *Running" "" 1 120
@@ -43,7 +45,7 @@ output "Work" "Now please check external access on this URL with your browser:"
4345
inputAndLogResult
4446

4547
# Cleanup
46-
kubectl delete -f $YAMLFILE
48+
kubectl delete -f work.yaml
4749
waitForKubectl "get pod" $DEPLOYMENT-sngl "" 0 120
4850
or fail "Could not delete deployment."
4951

tests/acceptance/semiautomation/test2b.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test2b
66
set -g TESTDESC "Scale a cluster deployment (development, enterprise)"
7-
set -g YAMLFILE generated/cluster-enterprise-dev.yaml
7+
set -g YAMLFILE cluster.yaml
88
set -g DEPLOYMENT acceptance-cluster
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Development work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 9 120
1416
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
1517
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
@@ -64,7 +66,7 @@ output "Work" "Now please check external access on this URL with your browser:"
6466
inputAndLogResult
6567

6668
# Cleanup
67-
kubectl delete -f $YAMLFILE
69+
kubectl delete -f work.yaml
6870
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 0 120
6971
or fail "Could not delete deployment."
7072

tests/acceptance/semiautomation/test3a.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test3a
66
set -g TESTDESC "Deployment of mode single (production)"
7-
set -g YAMLFILE generated/single-enterprise-pro.yaml
7+
set -g YAMLFILE single.yaml
88
set -g DEPLOYMENT acceptance-single
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" "$DEPLOYMENT-sngl" "1/1 *Running" 1 120
1416
and waitForKubectl "get service" "$DEPLOYMENT *ClusterIP" 8529 1 120
1517
and waitForKubectl "get service" "$DEPLOYMENT-ea *LoadBalancer" "-v;pending" 1 180
@@ -25,7 +27,7 @@ output "Work" "Now please check external access on this URL with your browser:"
2527
inputAndLogResult
2628

2729
# Cleanup
28-
kubectl delete -f $YAMLFILE
30+
kubectl delete -f work.yaml
2931
waitForKubectl "get pod" $DEPLOYMENT-sngl "" 0 120
3032
or fail "Could not delete deployment."
3133

tests/acceptance/semiautomation/test3b.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test3b
66
set -g TESTDESC "Deployment of mode active/failover (production)"
7-
set -g YAMLFILE generated/activefailover-community-pro.yaml
7+
set -g YAMLFILE activefailover.yaml
88
set -g DEPLOYMENT acceptance-activefailover
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_COMMUNITY Production work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" $DEPLOYMENT "1 *Running" 5 120
1416
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*1/1 *Running" "" 1 120
1517
and waitForKubectl "get pod" "$DEPLOYMENT-sngl.*0/1 *Running" "" 1 120
@@ -27,7 +29,7 @@ output "Work" "Now please check external access on this URL with your browser:"
2729
inputAndLogResult
2830

2931
# Cleanup
30-
kubectl delete -f $YAMLFILE
32+
kubectl delete -f work.yaml
3133
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
3234
or fail "Could not delete deployment."
3335

tests/acceptance/semiautomation/test3c.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test3c
66
set -g TESTDESC "Deployment of mode cluster (production, enterprise)"
7-
set -g YAMLFILE generated/cluster-enterprise-pro.yaml
7+
set -g YAMLFILE cluster.yaml
88
set -g DEPLOYMENT acceptance-cluster
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
1416
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
1517
and waitForKubectl "get pod" "$DEPLOYMENT-crdn" "1/1 *Running" 3 120
@@ -27,7 +29,7 @@ output "Work" "Now please check external access on this URL with your browser:"
2729
inputAndLogResult
2830

2931
# Cleanup
30-
kubectl delete -f $YAMLFILE
32+
kubectl delete -f work.yaml
3133
waitForKubectl "get pod" $DEPLOYMENT "" 0 120
3234
or fail "Could not delete deployment."
3335

tests/acceptance/semiautomation/test3d.fish

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ source helper.fish
44

55
set -g TESTNAME test3d
66
set -g TESTDESC "Scale a cluster deployment (production, enterprise)"
7-
set -g YAMLFILE generated/cluster-enterprise-pro.yaml
7+
set -g YAMLFILE cluster.yaml
88
set -g DEPLOYMENT acceptance-cluster
99
printheader
1010

11+
patchYamlFile $YAMLFILE $ARANGODB_ENTERPRISE Production work.yaml
12+
1113
# Deploy and check
12-
kubectl apply -f $YAMLFILE
14+
kubectl apply -f work.yaml
1315
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 9 120
1416
and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120
1517
and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120
@@ -64,7 +66,7 @@ output "Work" "Now please check external access on this URL with your browser:"
6466
inputAndLogResult
6567

6668
# Cleanup
67-
kubectl delete -f $YAMLFILE
69+
kubectl delete -f work.yaml
6870
and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 0 120
6971
or fail "Could not delete deployment."
7072

0 commit comments

Comments
 (0)