Files
deploy/hack/start-redis-with-password.sh
zeekayandHanzo Dev dead2da249 cd: the configuration speaks CD_ and KV_
The fork was already ours everywhere that matters — our image, our IAM (dex
is not deployed), hanzo kv behind what the env still called REDIS. Only the
vocabulary was upstream's: ARGOCD_* across the Go, the manifests, the docs
and the plugin contract, and mkdocs still titled 'Argo CD' pointing at
argoproj/argo-cd.

ARGOCD_ -> CD_ and REDIS_ -> KV_ across 345 files, plus the 8 e2e/cmp
fixtures that assert the plugin env contract — those had to move with the
binary, which now emits CD_APP_NAME where they expected ARGOCD_APP_NAME.

Left alone deliberately, because renaming them would be wrong:
- util/helm/testdata/redis/ and gitops-engine/.../statefulset*.yaml are
  fixtures for a THIRD-PARTY chart named redis, not our config
- util/kustomize/testdata/ likewise
- generated.proto regenerates from types.go, which is already clean

go build ./... exit 0.

LOCKSTEP: the live StatefulSet sets 47 ARGOCD_* names the binary no longer
reads. universe 4a5375735 carries the matching manifest change; they deploy
together or the controller falls back to defaults.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 15:55:46 -07:00

30 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Default values for environment variables
KV_PORT="${CD_E2E_KV_PORT:-6379}"
KV_IMAGE_TAG=$(grep 'image: redis' manifests/base/redis/argocd-redis-deployment.yaml | cut -d':' -f3)
if [ "$CD_KV_LOCAL" = 'true' ]; then
if ! command -v redis-server &>/dev/null; then
echo "Redis server is not installed locally. Please install Redis or set CD_KV_LOCAL to false."
exit 1
fi
# Start local Redis server with password if defined
if [ -z "$KV_PASSWORD" ]; then
echo "Starting local Redis server without password."
redis-server --save '' --appendonly no --port "$KV_PORT"
else
echo "Starting local Redis server with password."
redis-server --save '' --appendonly no --port "$KV_PORT" --requirepass "$KV_PASSWORD"
fi
else
# Run Redis in a Docker container with password if defined
if [ -z "$KV_PASSWORD" ]; then
echo "Starting Docker container without password."
docker run --rm --name argocd-redis -i -p "$KV_PORT:$KV_PORT" docker.io/library/redis:"$KV_IMAGE_TAG" --save '' --appendonly no --port "$KV_PORT"
else
echo "Starting Docker container with password."
docker run --rm --name argocd-redis -i -p "$KV_PORT:$KV_PORT" -e KV_PASSWORD="$KV_PASSWORD" docker.io/library/redis:"$KV_IMAGE_TAG" redis-server --save '' --requirepass "$KV_PASSWORD" --appendonly no --port "$KV_PORT"
fi
fi