Skip to content

Commit fc9a908

Browse files
DavidePrincipigsanchietti
authored andcommitted
fix(create-cluster): use Traefik config of workers (#817)
Traefik API connections originate only from the localhost, access from cluster VPN is not needed. The cluster VPN is not automatically inserted in Traefik configuration of worker nodes. As result there is a configuration difference between the original cluster leader and other nodes. This commit wants to remove this conflicting configuration. Revert 7c90ee2
1 parent 4cf55fb commit fc9a908

File tree

1 file changed

+0
-7
lines changed
  • core/imageroot/var/lib/nethserver/cluster/actions/create-cluster

1 file changed

+0
-7
lines changed

core/imageroot/var/lib/nethserver/cluster/actions/create-cluster/50update

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import agent.tasks
2929
import cluster.grants
3030
import cluster.vpn
3131
import uuid
32-
import pwd
3332

3433
request = json.load(sys.stdin)
3534

@@ -64,17 +63,11 @@ rdb.hset(f'node/{NODE_ID}/vpn', mapping={
6463
"endpoint": endpoint
6564
})
6665

67-
# Our first Traefik instance is missing the VPN network: fix it here.
68-
agent.run_helper('sed', '-i',
69-
f'/- 127.0.0.1$/a\ \ \ \ \ \ \ \ - {network}',
70-
f'{pwd.getpwnam("traefik1").pw_dir}/.config/state/configs/_api.yml').check_returncode()
71-
7266
# Update the cluster-localnode record in /etc/hosts
7367
agent.run_helper('sed', '-i',
7468
'-e', f'/cluster-localnode$/c\{ip_address} cluster-localnode',
7569
'/etc/hosts').check_returncode()
7670

77-
7871
# VPN bootstrap
7972
agent.run_helper('systemctl', 'stop', '[email protected]')
8073
cluster.vpn.initialize_wgconf(ip_address)

0 commit comments

Comments
 (0)