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

WIP: Add script to update example manifests #271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}