-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openshift app: use odf_nodes or localstorage_nodes in storage apps
- Loading branch information
Showing
2 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
{{ "storagecluster" | wait_crd }} | ||
sleep 10 | ||
{% if not odf_nodes %} | ||
{% set odf_nodes = odf_replicas|defaultnodes(cluster, domain, ctlplanes, workers) %} | ||
{% if odf_nodes %} | ||
{% set nodes = odf_nodes %} | ||
{% elif localstorage_nodes is defined %} | ||
{% set nodes = localstorage_nodes %} | ||
{% else %} | ||
{% set nodes = odf_replicas|defaultnodes(cluster, domain, ctlplanes, workers) %} | ||
{% endif %} | ||
|
||
{% if odf_nodes|length < odf_replicas %} | ||
{% if nodes|length < odf_replicas %} | ||
echo "Number of available nodes is lower than expected number of replicas" | ||
exit 1 | ||
{% endif %} | ||
|
||
{% if odf_nodes|has_ctlplane %} | ||
{% if nodes|has_ctlplane %} | ||
echo "Marking all ctlplane nodes as schedulable since one of them will be used for storage" | ||
oc patch scheduler cluster -p '{"spec":{"mastersSchedulable": true}}' --type merge | ||
{% endif %} | ||
|
||
|
||
{% for node in odf_nodes %} | ||
{% for node in nodes %} | ||
oc label node {{ node }} cluster.ocs.openshift.io/openshift-storage='' | ||
oc label node {{ node }} topology.rook.io/rack=rack{{ loop.index }} | ||
{% endfor %} |