#!/bin/bash set -e set -o pipefail if [ -z "${WILD_INSTANCE}" ]; then echo "ERROR: WILD_INSTANCE is not set" exit 1 fi if [ -z "${WILD_API_DATA_DIR}" ]; then echo "ERROR: WILD_API_DATA_DIR is not set" exit 1 fi if [ -z "${KUBECONFIG}" ]; then echo "ERROR: KUBECONFIG is not set" exit 1 fi INSTANCE_DIR="${WILD_API_DATA_DIR}/instances/${WILD_INSTANCE}" UTILS_DIR="${INSTANCE_DIR}/apps/utils" echo "=== Setting up Cluster Utilities ===" echo "" echo "Using compiled utils templates..." if [ ! -f "${UTILS_DIR}/kustomization.yaml" ]; then echo "ERROR: Compiled templates not found at ${UTILS_DIR}" echo "Templates should be compiled before deployment." exit 1 fi echo "Applying utility manifests..." kubectl apply -k ${UTILS_DIR}/ echo "" echo "Cluster utilities installed successfully" echo "" echo "Utility resources have been deployed to the cluster"