diff --git a/applications/base/traefik/values.yaml b/applications/base/traefik/values.yaml index 8ccdbb42a..da2a8277c 100644 --- a/applications/base/traefik/values.yaml +++ b/applications/base/traefik/values.yaml @@ -21,8 +21,14 @@ ingressRoute: # samplingParam: 1.0 providers: + kubernetesCRD: + enabled: true + allowCrossNamespace: true + allowExternalNameServices: true kubernetesIngress: enabled: true + allowCrossNamespace: true + allowExternalNameServices: true publishedService: enabled: true pathOverride: traefik/traefik diff --git a/applications/base/vector-aggregator/ingress-pfsense.yaml b/applications/base/vector-aggregator/ingress-pfsense.yaml new file mode 100644 index 000000000..049cd9f17 --- /dev/null +++ b/applications/base/vector-aggregator/ingress-pfsense.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRouteUDP +metadata: + name: pfsense-syslog + annotations: + 'external-dns.alpha.kubernetes.io/hostname': 'pfsense-syslog.home.macro.network' +spec: + entryPoints: + - pfsensesyslog + routes: + - services: + - name: pfsense-logs + port: 5140 + weight: 10 + nativeLB: true diff --git a/applications/base/vector-aggregator/main.jsonnet b/applications/base/vector-aggregator/main.jsonnet index 2328e0103..02b7d58fc 100644 --- a/applications/base/vector-aggregator/main.jsonnet +++ b/applications/base/vector-aggregator/main.jsonnet @@ -1,3 +1,5 @@ // jsonnet base/vector-aggregator/main.jsonnet -J vendor -[] +local ingressPfsense = std.parseYaml(importstr 'ingress-pfsense.yaml'); + +ingressPfsense diff --git a/applications/base/vector-aggregator/values.yaml b/applications/base/vector-aggregator/values.yaml index bb643dcc3..38bd27e6c 100644 --- a/applications/base/vector-aggregator/values.yaml +++ b/applications/base/vector-aggregator/values.yaml @@ -16,6 +16,10 @@ customConfig: type: vector address: 0.0.0.0:6010 version: "2" + pfsense_logs: + type: syslog + address: 0.0.0.0:5140 + mode: udp vector_metrics: type: internal_metrics transforms: @@ -42,6 +46,8 @@ customConfig: labels: hostname: >- {{`{{ host }}`}} + source: vector + job: kubernetes-journal loki_kubernetes: type: loki inputs: @@ -70,8 +76,22 @@ customConfig: pod: >- {{`{{ .pod_name }}`}} source: vector + job: kubernetes-pods stream: >- {{`{{ .stream }}`}} + loki_pfsense: + type: loki + inputs: + - pfsense_logs + endpoint: http://loki-gateway.loki.svc.cluster.local:80 + encoding: + codec: json + batch: + max_bytes: 2049000 + out_of_order_action: accept + labels: + source: vector + job: pfsense prom_exporter: type: prometheus_exporter inputs: diff --git a/applications/environments/home/traefik/application.libsonnet b/applications/environments/home/traefik/application.libsonnet index 0b21525d3..66dfddcbe 100644 --- a/applications/environments/home/traefik/application.libsonnet +++ b/applications/environments/home/traefik/application.libsonnet @@ -3,4 +3,8 @@ local app = import '../../../base/traefik/application.libsonnet'; app.withBasePath('applications/environments/home/traefik').withChartParams({ 'tlsOptions.default.clientAuth': 'null', 'service.annotations.metallb\\.universe\\.tf/loadBalancerIPs': '10.0.6.1', + 'ports.pfsensesyslog.expose': 'true', + 'ports.pfsensesyslog.port': '5140', + 'ports.pfsensesyslog.exposedPort': '5140', + 'ports.pfsensesyslog.protocol': 'UDP', })