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
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
Lines changed: 14 additions & 0 deletions
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
Lines changed: 15 additions & 0 deletions
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"]
Lines changed: 14 additions & 0 deletions
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
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-cluster"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: Cluster

tests/acceptance/semiautomation/helper.fish

Lines changed: 19 additions & 0 deletions
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
Lines changed: 9 additions & 0 deletions
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
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-single"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: Single

tests/acceptance/semiautomation/test1a.fish

Lines changed: 5 additions & 3 deletions
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

Lines changed: 5 additions & 3 deletions
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

0 commit comments

Comments
 (0)