23 lines
704 B
Bash
Executable File
23 lines
704 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Redis for this overlay: cache and broker (Celery), no persistence.
|
|
# Notes: ../README.md
|
|
set -euo pipefail
|
|
ADDON_DIR="$(cd "$(dirname "$0")" && pwd)" # its manifest sits beside it
|
|
cd "${RIG_CTRL:?run it through rig: bash ctrl/addons.sh install}"
|
|
|
|
source ./lib/config.sh
|
|
load_config
|
|
|
|
K="kubectl --context ${KUBECONTEXT}"
|
|
NS="${DATA_NAMESPACE:-data}"
|
|
|
|
$K get namespace "$NS" >/dev/null 2>&1 || $K create namespace "$NS"
|
|
|
|
echo " applying manifests"
|
|
render_manifest "$ADDON_DIR/redis.yaml" | $K apply -n "$NS" -f - >/dev/null
|
|
|
|
echo " waiting for redis..."
|
|
$K rollout status deployment/redis -n "$NS" --timeout=180s
|
|
|
|
echo " in-cluster: redis://redis.${NS}.svc.cluster.local:6379/0"
|