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 10, 2023
1 parent 64c8416 commit 4609048
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions salt/metalk8s/orchestrate/bootstrap/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -68,55 +68,58 @@ 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:
- name: https://127.0.0.1:7443/healthz
- match: 'ok'
- 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 +202,6 @@ Reconfigure control plane Ingress:
- saltenv: {{ saltenv }}
- require:
- salt: Deploy Kubernetes objects

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

0 comments on commit 4609048

Please sign in to comment.