Improved how the cluster is defined
This commit is contained in:
@@ -5,7 +5,7 @@ CONFIGS=${ROOT}/configs
|
||||
|
||||
# Generate the configuration for each node
|
||||
{% for node in nodes -%}
|
||||
talosctl gen config {{ node.clusterName }} https://{{ node.controlPlaneIp }}:6443 -f \
|
||||
talosctl gen config {{ node.cluster.name }} https://{{ node.cluster.controlPlaneIp }}:6443 -f \
|
||||
--with-secrets ${ROOT}/secrets.yaml \
|
||||
--talos-version {{ node.talosVersion }} \
|
||||
--kubernetes-version {{ node.kubernesVersion }} \
|
||||
@@ -24,7 +24,6 @@ talosctl gen config {{ node.clusterName }} https://{{ node.controlPlaneIp }}:644
|
||||
{% endfor %}
|
||||
|
||||
# Generate the talosconfig file for each cluster
|
||||
{# NOTE: This assumes that each node in a cluster specifies the same control plane IP -#}
|
||||
{% for cluster in clusters -%}
|
||||
talosctl gen config {{ cluster.name }} https://{{ cluster.controlPlaneIp }}:6443 -f \
|
||||
--with-secrets ${ROOT}/secrets.yaml \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export TALOSCONFIG={{ root }}/configs/talosconfig
|
||||
{% set paths = [] %}
|
||||
{%- for cluster_name in nodes|map(attribute="clusterName")|unique -%}
|
||||
{%- do paths.append(root ~ "/configs/" ~ cluster_name ~ "/kubeconfig") -%}
|
||||
{%- for cluster in clusters -%}
|
||||
{%- do paths.append(root ~ "/configs/" ~ cluster.name ~ "/kubeconfig") -%}
|
||||
{% endfor -%}
|
||||
export KUBECONFIG={{ paths|join(":") }}
|
||||
|
||||
Reference in New Issue
Block a user