Skip to content

Commit

Permalink
ARTESCA-10079 test - this commit will be revert
Browse files Browse the repository at this point in the history
  • Loading branch information
aprucolimartins committed Nov 13, 2023
1 parent f861bc8 commit 2d9f2a8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion salt/_pillar/metalk8s_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def node_info(node, ca_minion, pillar):
if "nodes" in pillar["metalk8s"]:
if ca_minion in pillar["metalk8s"]["nodes"]:
for role in pillar["metalk8s"]["nodes"][ca_minion].get("roles", []):
log.debug(
log.info(
"Workaround: Adding role '%s' to pillar in node '%s'",
role,
node["metadata"]["name"],
Expand Down
27 changes: 17 additions & 10 deletions salt/metalk8s/orchestrate/bootstrap/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -68,46 +68,50 @@ Get metalk8s:control_plane_ip grain:
}
%}

Sync all custom types:
{%- for i in range(2) %}

Sync all custom types {{ i }}:
salt.runner:
- name: saltutil.sync_all
- saltenv: {{ saltenv }}

Sync roster extmods:
Sync roster extmods {{ i }}:
salt.runner:
- name: saltutil.sync_roster
- saltenv: {{ saltenv }}

Sync auth extmods:
Sync auth extmods {{ i }}:
salt.runner:
- name: metalk8s_saltutil.sync_auth
- saltenv: {{ saltenv }}

Sync bootstrap minion:
Sync bootstrap minion {{ i }}:
salt.function:
- name: saltutil.sync_all
- tgt: {{ pillar.bootstrap_id }}
- kwarg:
saltenv: metalk8s-{{ version }}

Deploy CA role on bootstrap minion:
Deploy CA role on bootstrap minion {{ i }}:
salt.state:
- tgt: {{ pillar.bootstrap_id }}
- sls:
- metalk8s.roles.ca
- saltenv: metalk8s-{{ version }}
- pillar: {{ pillar_data | tojson }}
- require:
- salt: Sync bootstrap minion
- salt: Sync bootstrap minion {{ i }}

Bring bootstrap minion to highstate:
Bring bootstrap minion to highstate {{ i }}:
salt.state:
- tgt: {{ pillar.bootstrap_id }}
- highstate: true
- pillar: {{ pillar_data | tojson }}
- require:
- salt: Sync bootstrap minion
- salt: Deploy CA role on bootstrap minion
- salt: Sync bootstrap minion {{ i }}
- salt: Deploy CA role on bootstrap minion {{ i }}

{{- if i > 0 }}

Wait for API server to be available:
http.wait_for_successful_query:
Expand All @@ -116,7 +120,7 @@ Wait for API server to be available:
- status: 200
- verify_ssl: false
- require:
- salt: Bring bootstrap minion to highstate
- salt: Bring bootstrap minion to highstate {{ i }}

Configure bootstrap Node object:
salt.runner:
Expand Down Expand Up @@ -199,3 +203,6 @@ Reconfigure control plane Ingress:
- saltenv: {{ saltenv }}
- require:
- salt: Deploy Kubernetes objects

{%- endif %}
{%- endfor %}

0 comments on commit 2d9f2a8

Please sign in to comment.