Enhance installation scripts to prompt for configuration variables and initialize Wild-Cloud environment
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Source common utilities
|
||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bin/wild-common.sh"
|
||||
|
||||
# Initialize Wild-Cloud environment
|
||||
init_wild_env
|
||||
|
||||
if [ -z "${WC_HOME}" ]; then
|
||||
echo "Please source the wildcloud environment first. (e.g., \`source ./env.sh\`)"
|
||||
@@ -9,6 +16,20 @@ fi
|
||||
CLUSTER_SETUP_DIR="${WC_HOME}/setup/cluster"
|
||||
EXTERNALDNS_DIR="${CLUSTER_SETUP_DIR}/externaldns"
|
||||
|
||||
print_header "Setting up ExternalDNS"
|
||||
|
||||
# Collect required configuration variables
|
||||
print_info "Collecting ExternalDNS configuration..."
|
||||
|
||||
# Get current value
|
||||
current_owner_id=$(get_current_config "cluster.externalDns.ownerId")
|
||||
|
||||
# Prompt for ExternalDNS owner ID
|
||||
owner_id=$(prompt_with_default "Enter ExternalDNS owner ID (unique identifier for this cluster)" "wild-cloud-$(hostname -s)" "${current_owner_id}")
|
||||
wild-config-set "cluster.externalDns.ownerId" "${owner_id}"
|
||||
|
||||
print_success "Configuration collected successfully"
|
||||
|
||||
# Templates should already be compiled by wild-cluster-services-generate
|
||||
echo "Using pre-compiled ExternalDNS templates..."
|
||||
if [ ! -d "${EXTERNALDNS_DIR}/kustomize" ]; then
|
||||
|
Reference in New Issue
Block a user