diff --git a/.secrets-baseline b/.secrets-baseline index 98b4c98..e142ef0 100644 --- a/.secrets-baseline +++ b/.secrets-baseline @@ -171,7 +171,7 @@ "filename": "nomad/syslogng.nomad", "hashed_secret": "298b5925fe7c7458cb8a12a74621fdedafea5ad6", "is_verified": false, - "line_number": 163, + "line_number": 164, "is_secret": false }, { @@ -179,7 +179,7 @@ "filename": "nomad/syslogng.nomad", "hashed_secret": "3a1cec2d3c3de7e4da4d99c6731ca696c24b72b4", "is_verified": false, - "line_number": 163, + "line_number": 164, "is_secret": false } ], @@ -210,5 +210,5 @@ } ] }, - "generated_at": "2022-07-27T03:09:38Z" + "generated_at": "2022-08-30T23:13:37Z" } diff --git a/nomad/syslogng.nomad b/nomad/syslogng.nomad index 798b172..fe33c65 100644 --- a/nomad/syslogng.nomad +++ b/nomad/syslogng.nomad @@ -92,17 +92,11 @@ EOF group "syslogng" { count = 1 - constraint { - attribute = "${node.unique.name}" - # Needs to be on a predictable node for routing - # Maybe a loadbalancer could be used for routing from any node - value = "n2" - } - network { mode = "bridge" + port "main" { - static = 1514 + to = 1514 } } @@ -128,6 +122,13 @@ EOF } } } + + tags = [ + "traefik.enable=true", + "traefik.tcp.routers.syslogngtcp.entrypoints=syslogtcp", + "traefik.tcp.routers.syslogngtcp.rule=HostSNI(`*`)", + "traefik.udp.routers.syslogngudp.entrypoints=syslogudp", + ] } task "syslogng" { diff --git a/nomad/traefik/traefik.nomad b/nomad/traefik/traefik.nomad index 5ff0349..921773c 100644 --- a/nomad/traefik/traefik.nomad +++ b/nomad/traefik/traefik.nomad @@ -120,6 +120,12 @@ job "traefik" { [entryPoints.metrics] address = ":8989" + [entryPoints.syslogtcp] + address = ":514" + + [entryPoints.syslogudp] + address = ":514/udp" + [api] dashboard = true