chore: enhance Redis deploy configuration for constrained environments

- exclude `prod.cfg` from overlay processing in standalone GKE deployments
- add configurable Redis image registry and helm timeout for constrained networks
- update Helm chart to honor custom registry and timeout settings
This commit is contained in:
chrisfu 2026-04-11 08:35:27 -07:00
parent a14fa654e6
commit 9e352d74a5
2 changed files with 12 additions and 1 deletions

View File

@ -63,6 +63,11 @@ REDIS_PVC_SIZE="${REDIS_PVC_SIZE:-1Gi}"
# (Redis is used as a pub/sub broker — durable storage is not required)
REDIS_STORAGE_CLASS="${REDIS_STORAGE_CLASS:-${STORAGE_CLASS:-}}"
REDIS_PERSISTENCE_ENABLED="${REDIS_PERSISTENCE_ENABLED:-false}"
# Image registry override — set to "registry.bitnami.com" if docker.io is unreachable
# Bitnami OCI registry works as an alternative when Docker Hub times out on constrained networks.
REDIS_IMAGE_REGISTRY="${REDIS_IMAGE_REGISTRY:-}"
# Helm timeout — increase for slow image pulls on constrained network links (e.g. Pi cluster)
REDIS_HELM_TIMEOUT="${REDIS_HELM_TIMEOUT:-8m}"
log() { echo "[INFO] $*"; }
warn() { echo "[WARN] $*" >&2; }
@ -97,7 +102,7 @@ deploy_redis() {
upgrade --install "$REDIS_RELEASE" "$REDIS_CHART"
--namespace "$NAMESPACE"
--create-namespace
--timeout 5m
--timeout "$REDIS_HELM_TIMEOUT"
--wait
--set architecture=standalone
--set auth.enabled=false
@ -117,6 +122,11 @@ deploy_redis() {
helm_args+=(--set master.persistence.storageClass="$REDIS_STORAGE_CLASS")
fi
if [[ -n "$REDIS_IMAGE_REGISTRY" ]]; then
log "Using image registry override: ${REDIS_IMAGE_REGISTRY}"
helm_args+=(--set global.imageRegistry="$REDIS_IMAGE_REGISTRY")
fi
log "Deploying Redis (release=${REDIS_RELEASE}, ns=${NAMESPACE})..."
helm "${helm_args[@]}"

View File

@ -234,6 +234,7 @@ _prole_cfg_layer_files() {
for f in "$env_dir"/*.cfg; do
[[ -f "$f" ]] || continue
[[ "$(basename "$f")" == "prole.cfg" ]] && continue
[[ "$(basename "$f")" == "prod.cfg" ]] && continue # standalone GKE deploy config, not a prole.cfg overlay
[[ "$(basename "$f")" == .* ]] && continue
printf '%s\n' "$f"
done