Skip to content

Commit

Permalink
ztp: dont create more bmh objects than total spoke ocp nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Nov 28, 2023
1 parent fce01ad commit 56136e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ztp/scripts/bmc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{% set spoke = ztp_spokes[index] %}
{% set spoke_name = spoke.name %}
{% set virtual_nodes_number = spoke["virtual_nodes_number"]|default(0) %}
{% set ocp_nodes_number = spoke["ctlplanes_number"]|default(0) + spoke["workers_number"]|default(0)%}
{% set nodes = spoke["nodes"]|default([]) %}

{% if virtual_nodes_number > 0 %}
Expand All @@ -19,6 +20,8 @@
---
{% for node in nodes %}
{% set num = loop.index0 %}
{% if num < ocp_nodes_number %}
{% endif %}
apiVersion: v1
data:
password: {{ bmc_password|string|base64 }}
Expand Down Expand Up @@ -80,4 +83,5 @@ spec:
wwn: "{{ node['wwn'] }}"
{% endif %}
---
{% endif %}
{% endfor %}

0 comments on commit 56136e0

Please sign in to comment.