This commit is contained in:
@@ -266,6 +266,7 @@ services:
|
||||
command: ["ensure"]
|
||||
volumes:
|
||||
- assistant_control_plane_service_secrets:/run/control-plane-secrets
|
||||
- assistant_core_secrets:/run/core-secrets
|
||||
|
||||
cognitive-worker:
|
||||
build: { context: .., dockerfile: deploy/images/runtime.Dockerfile, args: { TARGET: cognitive-worker, SOURCE_REVISION: "${ASSISTANT_SOURCE_REVISION:-unknown}" } }
|
||||
|
||||
@@ -10,6 +10,12 @@ COMPOSE_FILE="$REPO_DIR/deploy/docker-compose.prod.yml"
|
||||
VOLUME="assistant_control_plane_service_secrets"
|
||||
ACTION="${1:-ensure}"
|
||||
CREDENTIAL="${MACHINE_CREDENTIAL:-control-plane}"
|
||||
SECRET_ROOT="/run/control-plane-secrets"
|
||||
VOLUME="assistant_control_plane_service_secrets"
|
||||
if [[ "$CREDENTIAL" == "acceptance-harness" ]]; then
|
||||
SECRET_ROOT="/run/core-secrets"
|
||||
VOLUME="assistant_core_secrets"
|
||||
fi
|
||||
|
||||
case "$ACTION" in
|
||||
ensure|rotate) ;;
|
||||
@@ -33,7 +39,7 @@ if [[ "$ACTION" == "rotate" ]]; then
|
||||
owner-requested-rotation|exposure-detected) ;;
|
||||
*) echo "invalid rotation reason" >&2; exit 2 ;;
|
||||
esac
|
||||
ASSISTANT_SOURCE_REVISION="$revision" compose --profile secret-control-plane run --rm --no-deps secret-control-plane -credential "$CREDENTIAL" -reason "$reason" rotate
|
||||
ASSISTANT_SOURCE_REVISION="$revision" compose --profile secret-control-plane run --rm --no-deps -e "SECRET_CONTROL_PLANE_ROOT=$SECRET_ROOT" secret-control-plane -credential "$CREDENTIAL" -reason "$reason" rotate
|
||||
else
|
||||
ASSISTANT_SOURCE_REVISION="$revision" compose --profile secret-control-plane run --rm --no-deps secret-control-plane -credential "$CREDENTIAL" ensure
|
||||
ASSISTANT_SOURCE_REVISION="$revision" compose --profile secret-control-plane run --rm --no-deps -e "SECRET_CONTROL_PLANE_ROOT=$SECRET_ROOT" secret-control-plane -credential "$CREDENTIAL" ensure
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user