- 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]>
28 lines
944 B
Bash
Executable File
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 |