use one ingress
ci / build (push) Waiting to run Details

This commit is contained in:
CJ_Clippy 2024-06-29 20:34:12 -08:00
parent 2ef5f3329f
commit 273be0f4da
5 changed files with 150 additions and 139 deletions

View File

@ -1,7 +1,7 @@
apiVersion: v1 apiVersion: v1
name: fp name: fp
description: The Galaxy's Best VTuber Hentai Site description: The Galaxy's Best VTuber Hentai Site
version: 0.0.41 version: 0.0.42
keywords: keywords:
- fp - fp
- futureporn - futureporn

View File

@ -37,42 +37,11 @@ metadata:
spec: spec:
selector: selector:
app: echo app: echo
type: LoadBalancer
ports: ports:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: 5678 targetPort: 5678
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: echo
namespace: futureporn
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}"
traefik.ingress.kubernetes.io/router.middlewares: futureporn-redirect@kubernetescrd
spec:
ingressClassName: traefik
rules:
- host: "{{ .Values.echo.hostname }}"
http:
paths:
- path: /extra/echo
pathType: Prefix
backend:
service:
name: echo
port:
number: 80
tls:
- secretName: echo-cert
hosts:
- "{{ .Values.echo.hostname }}"
{{ if eq .Values.environment "development" }} {{ if eq .Values.environment "development" }}
--- ---
apiVersion: chisel-operator.io/v1 apiVersion: chisel-operator.io/v1
@ -88,22 +57,21 @@ spec:
# --- ---
# apiVersion: traefik.io/v1alpha1 apiVersion: traefik.io/v1alpha1
# kind: IngressRoute kind: IngressRoute
# metadata: metadata:
# name: echo name: echo
# namespace: futureporn namespace: futureporn
# spec: spec:
# entryPoints: entryPoints:
# - web - web
# - websecure tls:
# tls: secretName: echo-cert
# secretName: echo-cert routes:
# routes: - match: Host(`echo.fp.sbtp.xyz`) || PathPrefix(`/extra/echo`)
# - match: Host(`echo.fp.sbtp.xyz`) || PathPrefix(`/extra/echo`) kind: Rule
# kind: Rule services:
# services: - name: echo
# - name: echo port: 8001
# port: 8001

View File

@ -37,44 +37,43 @@ spec:
port: 3000 port: 3000
targetPort: web targetPort: web
protocol: TCP protocol: TCP
type: LoadBalancer
{{ if eq .Values.environment "production" }} # {{ if eq .Values.environment "production" }}
--- # ---
apiVersion: networking.k8s.io/v1 # apiVersion: networking.k8s.io/v1
kind: Ingress # kind: Ingress
metadata: # metadata:
name: next # name: next
namespace: futureporn # namespace: futureporn
annotations: # annotations:
traefik.ingress.kubernetes.io/router.entrypoints: http # traefik.ingress.kubernetes.io/router.entrypoints: http
traefik.ingress.kubernetes.io/router.tls: "true" # traefik.ingress.kubernetes.io/router.tls: "true"
cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" # cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}"
kubernetes.io/ingress.class: traefik # kubernetes.io/ingress.class: traefik
external-dns.alpha.kubernetes.io/hostname: "{{ .Values.next.hostname }}" # external-dns.alpha.kubernetes.io/hostname: "{{ .Values.next.hostname }}"
spec: # spec:
ingressClassName: traefik # ingressClassName: traefik
backend: # backend:
serviceName: next # serviceName: next
servicePort: 3000 # servicePort: 3000
tls: # tls:
- secretName: next-tls # - secretName: next-tls
hosts: # hosts:
- "{{ .Values.next.hostname }}" # - "{{ .Values.next.hostname }}"
rules: # rules:
- host: "{{ .Values.next.hostname }}" # - host: "{{ .Values.next.hostname }}"
http: # http:
paths: # paths:
- path: / # - path: /
pathType: Prefix # pathType: Prefix
backend: # backend:
service: # service:
name: next # name: next
port: # port:
number: 3000 # number: 3000
{{ end }} # {{ end }}
{{ if eq .Values.environment "development" }} {{ if eq .Values.environment "development" }}
--- ---
@ -90,29 +89,29 @@ spec:
{{ end }} {{ end }}
--- # ---
apiVersion: networking.k8s.io/v1 # apiVersion: networking.k8s.io/v1
kind: Ingress # kind: Ingress
metadata: # metadata:
name: next # name: next
namespace: futureporn # namespace: futureporn
annotations: # annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web # traefik.ingress.kubernetes.io/router.entrypoints: web
traefik.ingress.kubernetes.io/router.tls: "true" # traefik.ingress.kubernetes.io/router.tls: "true"
cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" # cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}"
spec: # spec:
rules: # rules:
- host: next.fp.sbtp.xyz # - host: next.fp.sbtp.xyz
http: # http:
paths: # paths:
- path: / # - path: /
pathType: Prefix # pathType: Prefix
backend: # backend:
service: # service:
name: next # name: next
port: # port:
number: 3000 # number: 3000
tls: # tls:
- hosts: # - hosts:
- "{{ .Values.next.hostname }}" # - "{{ .Values.next.hostname }}"
secretName: next-cert # secretName: next-cert

View File

@ -15,7 +15,6 @@ spec:
port: 1339 port: 1339
targetPort: http targetPort: http
protocol: TCP protocol: TCP
type: LoadBalancer
--- ---
apiVersion: v1 apiVersion: v1
@ -154,33 +153,33 @@ spec:
--- # ---
apiVersion: networking.k8s.io/v1 # apiVersion: networking.k8s.io/v1
kind: Ingress # kind: Ingress
metadata: # metadata:
name: strapi # name: strapi
namespace: futureporn # namespace: futureporn
annotations: # annotations:
kubernetes.io/ingress.class: traefik # kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.entrypoints: websecure,web # traefik.ingress.kubernetes.io/router.entrypoints: websecure,web
traefik.ingress.kubernetes.io/router.tls: "false" # traefik.ingress.kubernetes.io/router.tls: "false"
cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" # cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}"
spec: # spec:
tls: # tls:
- hosts: # - hosts:
- "{{ .Values.strapi.hostname }}" # - "{{ .Values.strapi.hostname }}"
secretName: strapi-cert # secretName: strapi-cert
rules: # rules:
- host: "{{ .Values.strapi.hostname }}" # - host: "{{ .Values.strapi.hostname }}"
http: # http:
paths: # paths:
- path: / # - path: /
pathType: Prefix # pathType: Prefix
backend: # backend:
service: # service:
name: strapi # name: strapi
port: # port:
number: 1339 # number: 1339
{{ if eq .Values.environment "development" }} {{ if eq .Values.environment "development" }}
--- ---

View File

@ -9,3 +9,48 @@ spec:
redirectScheme: redirectScheme:
scheme: https scheme: https
permanent: true permanent: true
---
apiVersion: v1
kind: Service
metadata:
name: traefik
namespace: futureporn
annotations:
external-dns.alpha.kubernetes.io/hostname: "{{ .Values.echo.hostname }}"
external-dns.alpha.kubernetes.io/hostname: "{{ .Values.next.hostname }}"
external-dns.alpha.kubernetes.io/hostname: "{{ .Values.strapi.hostname }}"
cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}"
spec:
type: LoadBalancer
selector:
app: traefik
ports:
- protocol: TCP
port: 443
targetPort: 8443
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: traefik
namespace: futureporn
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}"
traefik.ingress.kubernetes.io/router.middlewares: futureporn-redirect@kubernetescrd
spec:
ingressClassName: traefik
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: traefik
port:
number: 443