26 lines
691 B
Bash
Executable file
26 lines
691 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
echo "Generating individual node configs..."
|
|
|
|
# Generate control plane configs
|
|
for node in cp-1 cp-2 cp-3; do
|
|
echo " Creating nodes/${node}.yaml (control plane)"
|
|
talosctl machineconfig patch controlplane.yaml \
|
|
--patch @patches/cloud-provider.yaml \
|
|
--patch @patches/${node}.yaml \
|
|
-o nodes/${node}.yaml
|
|
done
|
|
|
|
# Generate worker configs
|
|
for node in worker-1 worker-2 worker-3; do
|
|
echo " Creating nodes/${node}.yaml (worker)"
|
|
talosctl machineconfig patch worker-base.yaml \
|
|
--patch @patches/cloud-provider.yaml \
|
|
--patch @patches/${node}.yaml \
|
|
-o nodes/${node}.yaml
|
|
done
|
|
|
|
echo "Done! Node configs created in nodes/"
|