Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Add script to update example manifests
Browse files Browse the repository at this point in the history
Fixes #260.
  • Loading branch information
kragniz committed Feb 28, 2018
1 parent 3ad0b4f commit bbb0b72
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hack/testdata/cass-cluster-test.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
25 changes: 25 additions & 0 deletions hack/update-examples.sh
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit bbb0b72

Please sign in to comment.