Skip to content

Commit

Permalink
Merge pull request #266 from arangodb/test/templates
Browse files Browse the repository at this point in the history
Test/templates
  • Loading branch information
neunhoef authored Oct 23, 2018
2 parents 7606315 + f19cb17 commit 11a0274
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/acceptance/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generated
10 changes: 10 additions & 0 deletions tests/acceptance/activefailover.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-activefailover"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: ActiveFailover
11 changes: 11 additions & 0 deletions tests/acceptance/cluster-local-storage.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
storageClassName: acceptance
12 changes: 12 additions & 0 deletions tests/acceptance/cluster-scale-1.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
dbservers:
count: 5
14 changes: 14 additions & 0 deletions tests/acceptance/cluster-scale-2.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
dbservers:
count: 5
coordinators:
count: 4
14 changes: 14 additions & 0 deletions tests/acceptance/cluster-scale-3.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
dbservers:
count: 2
coordinators:
count: 4
14 changes: 14 additions & 0 deletions tests/acceptance/cluster-scale-4.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
dbservers:
count: 2
coordinators:
count: 1
12 changes: 12 additions & 0 deletions tests/acceptance/cluster-sync.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
sync:
enabled: true
10 changes: 10 additions & 0 deletions tests/acceptance/cluster.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Cluster
46 changes: 46 additions & 0 deletions tests/acceptance/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash
set -u

version="arangodb-preview:3.4.0-rc.3"
enterprise_secret="9c169fe900ff79790395784287bfa82f0dc0059375a34a2881b9b745c8efd42e"
community="arangodb/$version"
enterprise="registry.arangodb.com/arangodb/$version-$enterprise_secret"

rm -fr generated
mkdir -p generated

for path in *.template.yaml; do
base_file="${path%.template.yaml}"
target="./generated/$base_file-community-dev.yaml"
cp "$path" "$target"
sed -i "s|@IMAGE@|$community|" "$target"
sed -i "s|@ENVIRONMENT@|Development|" "$target"
echo "created $target"
done

for path in *.template.yaml; do
base_file="${path%.template.yaml}"
target="./generated/$base_file-community-pro.yaml"
cp "$path" "$target"
sed -i "s|@IMAGE@|$community|" "$target"
sed -i "s|@ENVIRONMENT@|Production|" "$target"
echo "created $target"
done

for path in *.template.yaml; do
base_file="${path%.template.yaml}"
target="./generated/$base_file-enterprise-dev.yaml"
cp "$path" "$target"
sed -i "s|@IMAGE@|$enterprise|" "$target"
sed -i "s|@ENVIRONMENT@|Development|" "$target"
echo "created $target"
done

for path in *.template.yaml; do
base_file="${path%.template.yaml}"
target="./generated/$base_file-enterprise-pro.yaml"
cp "$path" "$target"
sed -i "s|@IMAGE@|$enterprise|" "$target"
sed -i "s|@ENVIRONMENT@|Production|" "$target"
echo "created $target"
done
10 changes: 10 additions & 0 deletions tests/acceptance/single.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-single"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
externalAccess:
type: LoadBalancer
mode: Single

0 comments on commit 11a0274

Please sign in to comment.