Made secrets file configurable

This commit is contained in:
2025-11-09 03:43:52 +01:00
parent 1931ab71ca
commit d9def74cf3
6 changed files with 6 additions and 5 deletions

2
.gitattributes vendored
View File

@@ -1 +1 @@
secrets.yaml filter=git-crypt diff=git-crypt
_secrets.yaml filter=git-crypt diff=git-crypt

View File

@@ -4,3 +4,4 @@ installDisk: /dev/sda
cluster:
name: hellas
controlPlaneIp: 10.0.2.1
secretsFile: !realpath _secrets.yaml

BIN
nodes/hellas/_secrets.yaml Normal file

Binary file not shown.

View File

@@ -4,3 +4,4 @@ installDisk: /dev/vda
cluster:
name: testing
controlPlaneIp: 192.168.1.100
secretsFile: !realpath _secrets.yaml

View File

@@ -1,12 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT={{ root }}
CONFIGS=${ROOT}/configs
CONFIGS={{ root }}/configs
# Generate the configuration for each node
{% for node in nodes -%}
talosctl gen config {{ node.cluster.name }} https://{{ node.cluster.controlPlaneIp }}:6443 -f \
--with-secrets ${ROOT}/secrets.yaml \
--with-secrets {{ node.cluster.secretsFile }} \
--talos-version {{ node.talosVersion }} \
--kubernetes-version {{ node.kubernesVersion }} \
--output-types {{ node.type }} \
@@ -26,7 +25,7 @@ talosctl gen config {{ node.cluster.name }} https://{{ node.cluster.controlPlane
# Generate the talosconfig file for each cluster
{% for cluster in clusters -%}
talosctl gen config {{ cluster.name }} https://{{ cluster.controlPlaneIp }}:6443 -f \
--with-secrets ${ROOT}/secrets.yaml \
--with-secrets {{ cluster.secretsFile }} \
--output-types talosconfig \
-o ${CONFIGS}/{{ cluster.name }}/talosconfig
{% endfor %}