mirror of
https://github.com/apricote/home-cloud.git
synced 2026-01-13 13:01:03 +00:00
deploy with k3s
This commit is contained in:
parent
0f08cfb0d2
commit
2863062e44
26 changed files with 456 additions and 207 deletions
20
k3s_cluster/files/setup-floating-ip.sh
Normal file
20
k3s_cluster/files/setup-floating-ip.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
%{ if use_netdata }
|
||||
cat >> /etc/netplan/60-floating.cfg <<- EOM
|
||||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
eth0:
|
||||
addresses:
|
||||
- ${floating_ip}/32
|
||||
EOM
|
||||
netplan apply
|
||||
%{ else }
|
||||
cat >> /etc/network/interfaces.d/99-floating.cfg <<- EOM
|
||||
auto eth0:1
|
||||
iface eth0:1 inet static
|
||||
address ${floating_ip}
|
||||
netmask 255.255.255.255
|
||||
EOM
|
||||
ifdown eth0:1 ; ifup eth0:1
|
||||
%{ endif }
|
||||
Loading…
Add table
Add a link
Reference in a new issue