Skip to content

Commit

Permalink
(feat) Update generate config script to get talos schematic
Browse files Browse the repository at this point in the history
  • Loading branch information
aisling136 committed Apr 16, 2024
1 parent 9f319e2 commit b058b02
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion configs/inventory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ nodes:
kubernetes_version: 1.29.2
# renovate: datasource=docker depName=ghcr.io/siderolabs/installer
talos_version: v1.6.7
talos_factory_key: 613e1592b2da41ae5e265e8789429f22e121aab91cb4deb6bc3c0b6262961245
talos_factory_key: cc169ba41a8764e704b81d10b4319b2f2f0b530810ea3e881e0a3a5597213ce0
cluster_name: aisling-homelab
controlplane_proxy_hostname: kube.dex136.xyz
controlplane_proxy_ip: 192.168.1.230
7 changes: 7 additions & 0 deletions configs/schematic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
customization:
extraKernelArgs:
- mitigations=off
systemExtensions:
officialExtensions:
- siderolabs/iscsi-tools
- siderolabs/util-linux-tools
7 changes: 7 additions & 0 deletions scripts/generate_configs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/bin/sh

#Get talos schematic ID and update inventory.yaml
resp=$(curl -X POST --data-binary @configs/schematic.yaml https://factory.talos.dev/schematics)
schematic=$(echo $resp | jq -r '.id')
yq -i ".talos_factory_key = \"$schematic\"" configs/inventory.yaml

#Build gomplate templates
gomplate -f configs/templates/machineconfig.yaml.tmpl
gomplate -f configs/templates/cluster-build.tfvars.tmpl

#Decrypt tfvars
sops --decrypt configs/external.tfvars.json > configs/generated_configs/external.tfvars.json

0 comments on commit b058b02

Please sign in to comment.