Skip to content

Commit

Permalink
k3s orchestrate
Browse files Browse the repository at this point in the history
  • Loading branch information
kiemlicz committed Jan 28, 2024
1 parent 344b10e commit bef97a1
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions salt/kubernetes/_orchestrate/k3s.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
sync_modules_master:
salt.runner:
- name: saltutil.sync_all

setup_k3s_single_master:
salt.state:
- tgt: "k3sm1*"
- highstate: True
- pillar:
kubernetes:
nodes:
masters: {{ salt.saltutil.runner('manage.up', tgt="k3sm*") }}
workers: {{ salt.saltutil.runner('manage.up', tgt="k3sw*") }}
- require:
- salt: sync_modules_master

setup_k3s_workers:
salt.state:
- tgt: "k3sw*"
- highstate: True
- pillar:
kubernetes:
nodes:
masters: {{ salt.saltutil.runner('manage.up', tgt="k3sm*") }}
workers: {{ salt.saltutil.runner('manage.up', tgt="k3sw*") }}
- require:
- salt: setup_k3s_single_master

0 comments on commit bef97a1

Please sign in to comment.