Start using traefik

This commit is contained in:
Nikolai Rodionov 2024-06-02 15:44:16 +02:00
parent 3f3ee7549b
commit 90735a49b6
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
3 changed files with 33 additions and 5 deletions

View File

@ -11,6 +11,14 @@ templates:
values:
- '{{ requiredEnv "PWD" }}/istio.yaml'
ext-tcp-routes:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: traefik
values:
- '{{ requiredEnv "PWD" }}/tcp-route.yaml'
repositories:
- name: bedag
url: https://bedag.github.io/helm-charts/
@ -28,3 +36,4 @@ releases:
- ./secrets.yaml
inherit:
- template: ext-istio-resource
- template: ext-tcp-routes

20
tcp-route.yaml Normal file
View File

@ -0,0 +1,20 @@
---
traefik:
templates:
- |
{{ range .Values.tcpRoutes }}
---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: {{ .name }}
spec:
entryPoints:
- {{ .entrypoint }}
routes:
- match: {{ .match }}
services:
- name: {{ .service }}
nativeLB: true
port: {{ .port }}
{{- end }}

View File

@ -14,14 +14,13 @@ service-account:
# -- Istio extenstion. Just because I'm
# -- not using ingress nginx
# ------------------------------------------
istio:
traefik:
enabled: true
istio:
tcpRoutes:
- name: minecraft-tcp
entrypoint: minecraft
gateway: istio-system/badhouseplants-minecraft
kind: tcp
port_match: 25565
hostname: "*"
match: HostSNI(`*`)
service: minecraft-minecraft
port: 25565
# --------------------------------------------------