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: values:
- '{{ requiredEnv "PWD" }}/istio.yaml' - '{{ requiredEnv "PWD" }}/istio.yaml'
ext-tcp-routes:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: traefik
values:
- '{{ requiredEnv "PWD" }}/tcp-route.yaml'
repositories: repositories:
- name: bedag - name: bedag
url: https://bedag.github.io/helm-charts/ url: https://bedag.github.io/helm-charts/
@ -28,3 +36,4 @@ releases:
- ./secrets.yaml - ./secrets.yaml
inherit: inherit:
- template: ext-istio-resource - 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 # -- Istio extenstion. Just because I'm
# -- not using ingress nginx # -- not using ingress nginx
# ------------------------------------------ # ------------------------------------------
istio: traefik:
enabled: true enabled: true
istio: tcpRoutes:
- name: minecraft-tcp - name: minecraft-tcp
entrypoint: minecraft
gateway: istio-system/badhouseplants-minecraft gateway: istio-system/badhouseplants-minecraft
kind: tcp match: HostSNI(`*`)
port_match: 25565
hostname: "*"
service: minecraft-minecraft service: minecraft-minecraft
port: 25565 port: 25565
# -------------------------------------------------- # --------------------------------------------------