Files
Bruno GaoandQwen-Coder a6a016e5ea feat: Batch 9 - Actuator security, metrics, cache resilience and K8s deployments
- Implement dual-tier security with ActuatorSecurityConfig having higher priority
- Add metrics collection for order creation with tenant tagging
- Enhance cache resilience with graceful error handling
- Create custom Redis ping health indicator
- Add comprehensive K8s deployment manifests with Kustomize overlays
- Update OrderController to align with Batch 8 AppService methods
- Configure management endpoints with separate port in production
- Add deployment scripts for image tag updates

Co-authored-by: Qwen-Coder <[email protected]>
2026-02-12 19:22:08 +08:00

28 lines
944 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
OVERLAY="${1:?Usage: $0 <overlay> <new-tag>}"
NEW_TAG="${2:?Usage: $0 <overlay> <new-tag>}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OVERLAY_DIR="${SCRIPT_DIR}/../overlays/${OVERLAY}"
if [[ ! -d "${OVERLAY_DIR}" ]]; then
echo "ERROR: overlay directory not found: ${OVERLAY_DIR}" >&2
exit 1
fi
if command -v kustomize &>/dev/null; then
echo "Updating ${OVERLAY} overlay: tmpl-api → ${NEW_TAG}"
cd "${OVERLAY_DIR}"
kustomize edit set image "tmpl-api=registry.example.com/tmpl-api:${NEW_TAG}"
echo "Done."
else
echo "kustomize CLI not found, falling back to sed"
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' "s/newTag: .*/newTag: ${NEW_TAG}/" "${OVERLAY_DIR}/kustomization.yaml"
else
sed -i "s/newTag: .*/newTag: ${NEW_TAG}/" "${OVERLAY_DIR}/kustomization.yaml"
fi
echo "Done. Updated ${OVERLAY_DIR}/kustomization.yaml"
fi