diff --git a/helmfile.yaml b/helmfile.yaml index e6e3cee..60be0ca 100644 --- a/helmfile.yaml +++ b/helmfile.yaml @@ -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 diff --git a/tcp-route.yaml b/tcp-route.yaml new file mode 100644 index 0000000..5331ede --- /dev/null +++ b/tcp-route.yaml @@ -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 }} diff --git a/values.yaml b/values.yaml index e5df96a..d3e55fa 100644 --- a/values.yaml +++ b/values.yaml @@ -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 # --------------------------------------------------