diff --git a/charts/fp/Chart.yaml b/charts/fp/Chart.yaml index c9670fa..c093e44 100644 --- a/charts/fp/Chart.yaml +++ b/charts/fp/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: fp description: The Galaxy's Best VTuber Hentai Site -version: 0.0.41 +version: 0.0.42 keywords: - fp - futureporn diff --git a/charts/fp/templates/echo.yaml b/charts/fp/templates/echo.yaml index 737b5bf..3495813 100644 --- a/charts/fp/templates/echo.yaml +++ b/charts/fp/templates/echo.yaml @@ -37,42 +37,11 @@ metadata: spec: selector: app: echo - type: LoadBalancer ports: - protocol: TCP port: 80 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" }} --- apiVersion: chisel-operator.io/v1 @@ -88,22 +57,21 @@ spec: -# --- -# apiVersion: traefik.io/v1alpha1 -# kind: IngressRoute -# metadata: -# name: echo -# namespace: futureporn +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: echo + namespace: futureporn -# spec: -# entryPoints: -# - web -# - websecure -# tls: -# secretName: echo-cert -# routes: -# - match: Host(`echo.fp.sbtp.xyz`) || PathPrefix(`/extra/echo`) -# kind: Rule -# services: -# - name: echo -# port: 8001 +spec: + entryPoints: + - web + tls: + secretName: echo-cert + routes: + - match: Host(`echo.fp.sbtp.xyz`) || PathPrefix(`/extra/echo`) + kind: Rule + services: + - name: echo + port: 8001 diff --git a/charts/fp/templates/next.yaml b/charts/fp/templates/next.yaml index 4bffc64..50538e9 100644 --- a/charts/fp/templates/next.yaml +++ b/charts/fp/templates/next.yaml @@ -37,44 +37,43 @@ spec: port: 3000 targetPort: web protocol: TCP - type: LoadBalancer -{{ if eq .Values.environment "production" }} ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: next - namespace: futureporn - annotations: - traefik.ingress.kubernetes.io/router.entrypoints: http - traefik.ingress.kubernetes.io/router.tls: "true" - cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" - kubernetes.io/ingress.class: traefik - external-dns.alpha.kubernetes.io/hostname: "{{ .Values.next.hostname }}" -spec: - ingressClassName: traefik - backend: - serviceName: next - servicePort: 3000 - tls: - - secretName: next-tls - hosts: - - "{{ .Values.next.hostname }}" - rules: - - host: "{{ .Values.next.hostname }}" - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: next - port: - number: 3000 -{{ end }} +# {{ if eq .Values.environment "production" }} +# --- +# apiVersion: networking.k8s.io/v1 +# kind: Ingress +# metadata: +# name: next +# namespace: futureporn +# annotations: +# traefik.ingress.kubernetes.io/router.entrypoints: http +# traefik.ingress.kubernetes.io/router.tls: "true" +# cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" +# kubernetes.io/ingress.class: traefik +# external-dns.alpha.kubernetes.io/hostname: "{{ .Values.next.hostname }}" +# spec: +# ingressClassName: traefik +# backend: +# serviceName: next +# servicePort: 3000 +# tls: +# - secretName: next-tls +# hosts: +# - "{{ .Values.next.hostname }}" +# rules: +# - host: "{{ .Values.next.hostname }}" +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: next +# port: +# number: 3000 +# {{ end }} {{ if eq .Values.environment "development" }} --- @@ -90,29 +89,29 @@ spec: {{ end }} ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: next - namespace: futureporn - annotations: - traefik.ingress.kubernetes.io/router.entrypoints: web - traefik.ingress.kubernetes.io/router.tls: "true" - cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" -spec: - rules: - - host: next.fp.sbtp.xyz - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: next - port: - number: 3000 - tls: - - hosts: - - "{{ .Values.next.hostname }}" - secretName: next-cert \ No newline at end of file +# --- +# apiVersion: networking.k8s.io/v1 +# kind: Ingress +# metadata: +# name: next +# namespace: futureporn +# annotations: +# traefik.ingress.kubernetes.io/router.entrypoints: web +# traefik.ingress.kubernetes.io/router.tls: "true" +# cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" +# spec: +# rules: +# - host: next.fp.sbtp.xyz +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: next +# port: +# number: 3000 +# tls: +# - hosts: +# - "{{ .Values.next.hostname }}" +# secretName: next-cert \ No newline at end of file diff --git a/charts/fp/templates/strapi.yaml b/charts/fp/templates/strapi.yaml index 3b2f0e0..addec9b 100644 --- a/charts/fp/templates/strapi.yaml +++ b/charts/fp/templates/strapi.yaml @@ -15,7 +15,6 @@ spec: port: 1339 targetPort: http protocol: TCP - type: LoadBalancer --- apiVersion: v1 @@ -154,33 +153,33 @@ spec: ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: strapi - namespace: futureporn - annotations: - kubernetes.io/ingress.class: traefik - traefik.ingress.kubernetes.io/router.entrypoints: websecure,web - traefik.ingress.kubernetes.io/router.tls: "false" - cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" -spec: - tls: - - hosts: - - "{{ .Values.strapi.hostname }}" - secretName: strapi-cert - rules: - - host: "{{ .Values.strapi.hostname }}" - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: strapi - port: - number: 1339 +# --- +# apiVersion: networking.k8s.io/v1 +# kind: Ingress +# metadata: +# name: strapi +# namespace: futureporn +# annotations: +# kubernetes.io/ingress.class: traefik +# traefik.ingress.kubernetes.io/router.entrypoints: websecure,web +# traefik.ingress.kubernetes.io/router.tls: "false" +# cert-manager.io/cluster-issuer: "{{ .Values.certManager.issuer }}" +# spec: +# tls: +# - hosts: +# - "{{ .Values.strapi.hostname }}" +# secretName: strapi-cert +# rules: +# - host: "{{ .Values.strapi.hostname }}" +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: strapi +# port: +# number: 1339 {{ if eq .Values.environment "development" }} --- diff --git a/charts/fp/templates/traefik.yaml b/charts/fp/templates/traefik.yaml index e96f119..da916c7 100644 --- a/charts/fp/templates/traefik.yaml +++ b/charts/fp/templates/traefik.yaml @@ -9,3 +9,48 @@ spec: redirectScheme: scheme: https 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