From bbb0b72cd37a6d0e854df26ddcca594e332d031d Mon Sep 17 00:00:00 2001 From: Louis Taylor Date: Wed, 28 Feb 2018 17:36:16 +0000 Subject: [PATCH] Add script to update example manifests Fixes #260. --- hack/testdata/cass-cluster-test.template.yaml | 2 +- hack/update-examples.sh | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 hack/update-examples.sh diff --git a/hack/testdata/cass-cluster-test.template.yaml b/hack/testdata/cass-cluster-test.template.yaml index 1d7b4f4f7..4e8e62032 100644 --- a/hack/testdata/cass-cluster-test.template.yaml +++ b/hack/testdata/cass-cluster-test.template.yaml @@ -11,7 +11,7 @@ spec: - name: "ringnodes" replicas: ${CASS_REPLICAS} datacenter: "${CASS_NAME}-datacenter" - rack: "{CASS_NAME}-rack" + rack: "${CASS_NAME}-rack" persistence: enabled: true size: "5Gi" diff --git a/hack/update-examples.sh b/hack/update-examples.sh new file mode 100755 index 000000000..a392e2655 --- /dev/null +++ b/hack/update-examples.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -o errexit +set -o nounset +set -o pipefail + +SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/.. + +CASS_TEMPLATE="${SCRIPT_ROOT}/hack/testdata/cass-cluster-test.template.yaml" +ES_TEMPLATE="${SCRIPT_ROOT}/hack/testdata/es-cluster-test.template.yaml" + +EXAMPLES_DIR="${SCRIPT_ROOT}/docs/quick-start/" +CASS_EXAMPLE="${EXAMPLES_DIR}/cassandra-cluster.yaml" +ES_EXAMPLE="${EXAMPLES_DIR}/es-cluster-demo.yaml" + +export NAVIGATOR_IMAGE_REPOSITORY="jetstackexperimental" +export NAVIGATOR_IMAGE_TAG="canary" +export NAVIGATOR_IMAGE_PULLPOLICY="IfNotPresent" + +export CASS_NAME="demo" +export CASS_REPLICAS=3 +export CASS_CQL_PORT=9042 +export CASS_VERSION="3.11.1" + +envsubst < ${CASS_TEMPLATE} > ${CASS_EXAMPLE}