From 3a6b6179f36ec2ad16db048727477f16b8fb0501 Mon Sep 17 00:00:00 2001 From: CJ_Clippy Date: Fri, 28 Jun 2024 20:42:10 -0800 Subject: [PATCH] use ingressroute --- charts/fp/templates/echo.yaml | 70 ++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/charts/fp/templates/echo.yaml b/charts/fp/templates/echo.yaml index 0e89b21..c245496 100644 --- a/charts/fp/templates/echo.yaml +++ b/charts/fp/templates/echo.yaml @@ -38,6 +38,51 @@ spec: port: 8001 targetPort: 5678 +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: echo + namespace: futureporn + +spec: + entryPoints: + - web + + routes: + - match: Host(`echo.fp.sbtp.xyz`) + kind: Rule + services: + - name: echo + port: 80 + + +# --- +# apiVersion: networking.k8s.io/v1 +# kind: Ingress +# metadata: +# name: echo +# namespace: futureporn +# annotations: +# traefik.ingress.kubernetes.io/router.entrypoints: web +# traefik.ingress.kubernetes.io/router.tls: "false" +# # cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" +# spec: +# rules: +# - host: "{{ .Values.echo.hostname }}" +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: echo +# port: +# number: 8001 +# tls: +# - secretName: echo-cert + + {{ if eq .Values.environment "development" }} --- apiVersion: chisel-operator.io/v1 @@ -50,28 +95,3 @@ spec: port: 9090 auth: chisel {{ end }} - ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: echo - namespace: futureporn - annotations: - traefik.ingress.kubernetes.io/router.entrypoints: web - traefik.ingress.kubernetes.io/router.tls: "false" - # cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" -spec: - rules: - - host: "{{ .Values.echo.hostname }}" - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: echo - port: - number: 8001 - tls: - - secretName: echo-cert