mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Split reactor files
There now are reactor files to run highstate on: * New nodes only * Master nodes * Minion nodes
This commit is contained in:
parent
d51c071982
commit
1152471db7
@ -38,7 +38,7 @@ cat <<EOF >/etc/salt/master.d/reactor.conf
|
||||
# React to new minions starting by running highstate on them.
|
||||
reactor:
|
||||
- 'salt/minion/*/start':
|
||||
- /srv/reactor/start.sls
|
||||
- /srv/reactor/highstate-new.sls
|
||||
EOF
|
||||
|
||||
# Install Salt
|
||||
|
@ -1,9 +0,0 @@
|
||||
# This runs highstate on the ALL nodes.
|
||||
#
|
||||
# Used from the vSphere provider. The IP addresses of the minons are passed to
|
||||
# the apiserver as arguments and every minion has static routes to every other
|
||||
# minion. This means every node should be refreshed when a node is added.
|
||||
#
|
||||
highstate_run:
|
||||
cmd.state.highstate:
|
||||
- tgt: '*'
|
10
cluster/saltbase/reactor/highstate-masters.sls
Normal file
10
cluster/saltbase/reactor/highstate-masters.sls
Normal file
@ -0,0 +1,10 @@
|
||||
# This runs highstate on the master node(s).
|
||||
#
|
||||
# Some of the cluster deployment scripts pass the list of minion addresses to
|
||||
# the apiserver as a command line argument. This list needs to be updated if a
|
||||
# new minion is started, so run highstate on the master(s) when this happens.
|
||||
#
|
||||
highstate_master:
|
||||
cmd.state.highstate:
|
||||
- tgt: 'roles:kubernetes-master'
|
||||
- expr_form: grain
|
11
cluster/saltbase/reactor/highstate-minions.sls
Normal file
11
cluster/saltbase/reactor/highstate-minions.sls
Normal file
@ -0,0 +1,11 @@
|
||||
# This runs highstate on the minion nodes.
|
||||
#
|
||||
# Some of the cluster deployment scripts use the list of minions on the minions
|
||||
# themselves (for example: every minion is configured with static routes to
|
||||
# every other minion on a vSphere deployment). To propagate changes throughout
|
||||
# the pool, run highstate on all minions whenever a single minion starts.
|
||||
#
|
||||
highstate_minions:
|
||||
cmd.state.highstate:
|
||||
- tgt: 'roles:kubernetes-pool'
|
||||
- expr_form: grain
|
4
cluster/saltbase/reactor/highstate-new.sls
Normal file
4
cluster/saltbase/reactor/highstate-new.sls
Normal file
@ -0,0 +1,4 @@
|
||||
# This runs highstate only on the NEW node, regardless of type.
|
||||
highstate_new:
|
||||
cmd.state.highstate:
|
||||
- tgt: {{ data['id'] }}
|
@ -1,5 +0,0 @@
|
||||
|
||||
# This runs highstate on the target node
|
||||
highstate_run:
|
||||
cmd.state.highstate:
|
||||
- tgt: {{ data['id'] }}
|
@ -92,7 +92,7 @@ cat <<EOF >/etc/salt/master.d/reactor.conf
|
||||
# React to new minions starting by running highstate on them.
|
||||
reactor:
|
||||
- 'salt/minion/*/start':
|
||||
- /srv/reactor/start.sls
|
||||
- /srv/reactor/highstate-new.sls
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/salt/master.d/salt-output.conf
|
||||
|
@ -42,7 +42,9 @@ cat <<EOF >/etc/salt/master.d/reactor.conf
|
||||
# React to new minions starting by running highstate on them.
|
||||
reactor:
|
||||
- 'salt/minion/*/start':
|
||||
- /srv/reactor/highstate-all.sls
|
||||
- /srv/reactor/highstate-new.sls
|
||||
- /srv/reactor/highstate-masters.sls
|
||||
- /srv/reactor/highstate-minions.sls
|
||||
EOF
|
||||
|
||||
mkdir -p /srv/salt/nginx
|
||||
|
Loading…
Reference in New Issue
Block a user