init
This commit is contained in:
40
start.sh
Executable file
40
start.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
source .env
|
||||
|
||||
export PROXMOX_VE_USERNAME=${PROXMOX_VE_USERNAME}
|
||||
export PROXMOX_VE_PASSWORD=${PROXMOX_VE_PASSWORD}
|
||||
|
||||
tfplan=$(terraform plan -out=tfplan)
|
||||
|
||||
echo "$tfplan"
|
||||
read -p "Apply? (y/n): " apply
|
||||
if [ "$apply" == "y" ]; then
|
||||
terraform apply tfplan
|
||||
fi
|
||||
|
||||
read -p "Save kubeconfig? (y/n): " save_kubeconfig
|
||||
if [ "$save_kubeconfig" == "y" ]; then
|
||||
terraform output -raw kubeconfig > ~/.kube/${TALOS_CLUSTER_NAME}.yaml
|
||||
fi
|
||||
|
||||
read -p "Install Cilium? (y/n): " install_cilium
|
||||
if [ "$install_cilium" == "y" ]; then
|
||||
helm repo add cilium https://helm.cilium.io/
|
||||
helm repo update
|
||||
helm upgrade \
|
||||
--kubeconfig ~/.kube/${TALOS_CLUSTER_NAME}.yaml \
|
||||
--install \
|
||||
cilium \
|
||||
cilium/cilium \
|
||||
--namespace kube-system \
|
||||
--values cilium/values.yaml \
|
||||
--set cluster.name=${TALOS_CLUSTER_NAME} \
|
||||
--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
|
||||
kubectl apply -f cilium/ippool.yaml
|
||||
kubectl apply -f cilium/l2-announcement-policy.yaml
|
||||
fi
|
Reference in New Issue
Block a user