Added cluster variables for flux substitutions

This commit is contained in:
2025-12-02 02:18:46 +01:00
parent f5798dae4c
commit 5eeba518a9
4 changed files with 19 additions and 0 deletions

View File

@@ -32,3 +32,4 @@ patches:
patchesControlPlane:
- !patch allow-control-plane-workloads
- !patch sops
- !patch cluster-variables

View File

@@ -4,6 +4,7 @@ installDisk: /dev/vda
autoInstall: true
cluster:
name: testing
production: false
controlPlaneIp: 192.168.1.100
secretsFile: !realpath _secrets.yaml
sopsKeyFile: !realpath _age.agekey

View File

@@ -3,6 +3,7 @@ gateway: 10.0.0.1
installDisk: /dev/sda
cluster:
name: titan
production: true
controlPlaneIp: 10.0.2.1
secretsFile: !realpath _secrets.yaml
sopsKeyFile: !realpath _age.agekey

View File

@@ -0,0 +1,16 @@
cluster:
inlineManifests:
- name: cluster-variables
contents: |
apiVersion: v1
kind: Namespace
metadata:
name: flux-system
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-variables
namespace: flux-system
data:
cluster_env: {%- if node.cluster.production %} production {%- else %} staging {%- endif %}