first commit

This commit is contained in:
2026-09-09 16:50:00 -03:00
commit b2a368d71a
104 changed files with 7462 additions and 0 deletions

30
deploy/scripts/deploy.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -Eeuo pipefail
source "$(dirname "$0")/common.sh"
require_command kubectl
validate_environment
REGISTRY="${REGISTRY:?Defina REGISTRY, por exemplo: tim.azurecr.io}"
IMAGE_NAME="${IMAGE_NAME:-agent-framework-evaluator}"
IMAGE_TAG="${IMAGE_TAG:?Defina IMAGE_TAG com a versão já publicada}"
IMAGE="${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}"
RUN_INIT_DB="${RUN_INIT_DB:-true}"
TIMEOUT="${TIMEOUT:-300s}"
kubectl kustomize "${OVERLAY_DIR}" \
| sed "s#REPLACE_REGISTRY/agent-framework-evaluator:[^[:space:]]*#${IMAGE}#g" \
| kubectl apply -f -
if [[ "${RUN_INIT_DB}" == "true" ]]; then
job_name="evaluator-init-db-${ENVIRONMENT}-$(date +%s)"
sed -e "s#agent-evaluator#${NAMESPACE}#g" \
-e "s#name: evaluator-init-db#name: ${job_name}#" \
-e "s#agent-framework-evaluator:latest#${IMAGE}#" \
"${ROOT_DIR}/deploy/k8s/base/init-db-job.yaml" | kubectl apply -f -
kubectl -n "${NAMESPACE}" wait --for=condition=complete "job/${job_name}" --timeout="${TIMEOUT}" || {
kubectl -n "${NAMESPACE}" logs "job/${job_name}" --all-containers=true || true
exit 1
}
fi
kubectl -n "${NAMESPACE}" get cronjob,pod,jobs