diff --git a/tests/acceptance/.gitignore b/tests/acceptance/.gitignore new file mode 100644 index 000000000..86d4c2dd3 --- /dev/null +++ b/tests/acceptance/.gitignore @@ -0,0 +1 @@ +generated diff --git a/tests/acceptance/activefailover.template.yaml b/tests/acceptance/activefailover.template.yaml new file mode 100644 index 000000000..32d8acea6 --- /dev/null +++ b/tests/acceptance/activefailover.template.yaml @@ -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 diff --git a/tests/acceptance/cluster-local-storage.template.yaml b/tests/acceptance/cluster-local-storage.template.yaml new file mode 100644 index 000000000..65a32bdaf --- /dev/null +++ b/tests/acceptance/cluster-local-storage.template.yaml @@ -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 diff --git a/tests/acceptance/cluster-scale-1.template.yaml b/tests/acceptance/cluster-scale-1.template.yaml new file mode 100644 index 000000000..04a93aecc --- /dev/null +++ b/tests/acceptance/cluster-scale-1.template.yaml @@ -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 diff --git a/tests/acceptance/cluster-scale-2.template.yaml b/tests/acceptance/cluster-scale-2.template.yaml new file mode 100644 index 000000000..3562664ec --- /dev/null +++ b/tests/acceptance/cluster-scale-2.template.yaml @@ -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 diff --git a/tests/acceptance/cluster-scale-3.template.yaml b/tests/acceptance/cluster-scale-3.template.yaml new file mode 100644 index 000000000..3509d14b3 --- /dev/null +++ b/tests/acceptance/cluster-scale-3.template.yaml @@ -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 diff --git a/tests/acceptance/cluster-scale-4.template.yaml b/tests/acceptance/cluster-scale-4.template.yaml new file mode 100644 index 000000000..f3679a411 --- /dev/null +++ b/tests/acceptance/cluster-scale-4.template.yaml @@ -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 diff --git a/tests/acceptance/cluster-sync.template.yaml b/tests/acceptance/cluster-sync.template.yaml new file mode 100644 index 000000000..b0c15f547 --- /dev/null +++ b/tests/acceptance/cluster-sync.template.yaml @@ -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 diff --git a/tests/acceptance/cluster.template.yaml b/tests/acceptance/cluster.template.yaml new file mode 100644 index 000000000..94ab5cc6e --- /dev/null +++ b/tests/acceptance/cluster.template.yaml @@ -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 diff --git a/tests/acceptance/generate.sh b/tests/acceptance/generate.sh new file mode 100755 index 000000000..016dc4a7d --- /dev/null +++ b/tests/acceptance/generate.sh @@ -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 diff --git a/tests/acceptance/single.template.yaml b/tests/acceptance/single.template.yaml new file mode 100644 index 000000000..58b5a6b74 --- /dev/null +++ b/tests/acceptance/single.template.yaml @@ -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