Skip to content

Commit 4f4878c

Browse files
committed
fix Config export removal disables Traefik sync timer
1 parent 6c0cd11 commit 4f4878c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

ansible/roles/traefik/templates/terrarium-traefik-sync.service.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Description=Sync LXC proxy labels into Traefik configuration
33
Wants=network-online.target traefik.service snap.lxd.daemon.service
44
After=network-online.target traefik.service snap.lxd.daemon.service terrarium-oauth2-proxy.service
55
ConditionPathExists=/usr/local/bin/terrariumctl
6-
ConditionPathExists={{ terrarium_config_path }}
76
ConditionPathExists=/snap/bin/lxd
87
ConditionPathExists=/snap/bin/lxc
98
ConditionPathExists=/usr/bin/timeout

tests/ansible-base.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ describe("config store reconciliation", () => {
5555
expect(removeIndex).toBeGreaterThan(importIndex);
5656
expect(proxyIndex).toBeGreaterThan(removeIndex);
5757
});
58+
59+
test("keeps timer-driven proxy sync independent of the transient config export", () => {
60+
const service = readFileSync(join(repoRoot, "ansible/roles/traefik/templates/terrarium-traefik-sync.service.j2"), "utf8");
61+
62+
expect(service).toContain("ConditionPathExists=/usr/local/bin/terrariumctl");
63+
expect(service).not.toContain("ConditionPathExists={{ terrarium_config_path }}");
64+
expect(service).toContain("ExecStart=/usr/local/bin/terrariumctl proxy sync");
65+
});
5866
});
5967

6068
describe("partition-mode storage", () => {

0 commit comments

Comments
 (0)