Skip to content

Commit 11a0274

Browse files
authored
Merge pull request #266 from arangodb/test/templates
Test/templates
2 parents 7606315 + f19cb17 commit 11a0274

11 files changed

+154
-0
lines changed

tests/acceptance/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
generated
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,11 @@
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+
storageClassName: acceptance
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
dbservers:
12+
count: 5
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+
dbservers:
12+
count: 5
13+
coordinators:
14+
count: 4
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+
dbservers:
12+
count: 2
13+
coordinators:
14+
count: 4
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+
dbservers:
12+
count: 2
13+
coordinators:
14+
count: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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
+10
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/generate.sh

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
set -u
3+
4+
version="arangodb-preview:3.4.0-rc.3"
5+
enterprise_secret="9c169fe900ff79790395784287bfa82f0dc0059375a34a2881b9b745c8efd42e"
6+
community="arangodb/$version"
7+
enterprise="registry.arangodb.com/arangodb/$version-$enterprise_secret"
8+
9+
rm -fr generated
10+
mkdir -p generated
11+
12+
for path in *.template.yaml; do
13+
base_file="${path%.template.yaml}"
14+
target="./generated/$base_file-community-dev.yaml"
15+
cp "$path" "$target"
16+
sed -i "s|@IMAGE@|$community|" "$target"
17+
sed -i "s|@ENVIRONMENT@|Development|" "$target"
18+
echo "created $target"
19+
done
20+
21+
for path in *.template.yaml; do
22+
base_file="${path%.template.yaml}"
23+
target="./generated/$base_file-community-pro.yaml"
24+
cp "$path" "$target"
25+
sed -i "s|@IMAGE@|$community|" "$target"
26+
sed -i "s|@ENVIRONMENT@|Production|" "$target"
27+
echo "created $target"
28+
done
29+
30+
for path in *.template.yaml; do
31+
base_file="${path%.template.yaml}"
32+
target="./generated/$base_file-enterprise-dev.yaml"
33+
cp "$path" "$target"
34+
sed -i "s|@IMAGE@|$enterprise|" "$target"
35+
sed -i "s|@ENVIRONMENT@|Development|" "$target"
36+
echo "created $target"
37+
done
38+
39+
for path in *.template.yaml; do
40+
base_file="${path%.template.yaml}"
41+
target="./generated/$base_file-enterprise-pro.yaml"
42+
cp "$path" "$target"
43+
sed -i "s|@IMAGE@|$enterprise|" "$target"
44+
sed -i "s|@ENVIRONMENT@|Production|" "$target"
45+
echo "created $target"
46+
done

tests/acceptance/single.template.yaml

+10
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

0 commit comments

Comments
 (0)