init
This commit is contained in:
18
start.sh
18
start.sh
@@ -5,21 +5,24 @@ source .env
|
||||
export PROXMOX_VE_USERNAME=${PROXMOX_VE_USERNAME}
|
||||
export PROXMOX_VE_PASSWORD=${PROXMOX_VE_PASSWORD}
|
||||
|
||||
confirm() {
|
||||
local message="$1"
|
||||
read -p "$message (y/n): " response
|
||||
[[ "$response" == "y" ]]
|
||||
}
|
||||
|
||||
tfplan=$(terraform plan -out=tfplan)
|
||||
|
||||
echo "$tfplan"
|
||||
read -p "Apply? (y/n): " apply
|
||||
if [ "$apply" == "y" ]; then
|
||||
if confirm "Apply?"; then
|
||||
terraform apply tfplan
|
||||
fi
|
||||
|
||||
read -p "Save kubeconfig? (y/n): " save_kubeconfig
|
||||
if [ "$save_kubeconfig" == "y" ]; then
|
||||
if confirm "Save kubeconfig?"; then
|
||||
terraform output -raw kubeconfig > ~/.kube/${TALOS_CLUSTER_NAME}.yaml
|
||||
fi
|
||||
|
||||
read -p "Install Cilium? (y/n): " install_cilium
|
||||
if [ "$install_cilium" == "y" ]; then
|
||||
if confirm "Install Cilium?"; then
|
||||
helm repo add cilium https://helm.cilium.io/
|
||||
helm repo update
|
||||
helm upgrade \
|
||||
@@ -33,8 +36,7 @@ if [ "$install_cilium" == "y" ]; then
|
||||
--set cluster.id=1
|
||||
fi
|
||||
|
||||
read -p "Apply Cilium IP Pool and L2 Announcement Policy? (y/n): " apply_ip_pool
|
||||
if [ "$apply_ip_pool" == "y" ]; then
|
||||
if confirm "Apply Cilium IP Pool and L2 Announcement Policy?"; then
|
||||
kubectl apply -f cilium/ippool.yaml
|
||||
kubectl apply -f cilium/l2-announcement-policy.yaml
|
||||
fi
|
||||
|
Reference in New Issue
Block a user