feat(ingress): Move to Nginx Ingress Controller
This commit is contained in:
parent
96f0aba576
commit
549ecf4cc8
@ -1,32 +1,28 @@
|
|||||||
apiVersion: traefik.containo.us/v1alpha1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Middleware
|
kind: Ingress
|
||||||
metadata:
|
|
||||||
name: replace-regex
|
|
||||||
namespace: gitea
|
|
||||||
spec:
|
|
||||||
replacePathRegex:
|
|
||||||
regex: "^/metrics"
|
|
||||||
replacement: "/"
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: traefik.containo.us/v1alpha1
|
|
||||||
kind: IngressRoute
|
|
||||||
metadata:
|
metadata:
|
||||||
name: gitea-ingress
|
name: gitea-ingress
|
||||||
namespace: gitea
|
namespace: gitea
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: "traefik"
|
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||||
cert-manager.io/cluster-issuer: "letsencrypt-production"
|
kubernetes.io/ingress.class: nginx-external
|
||||||
|
acme.cert-manager.io/http01-edit-in-place: "true"
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
rewrite ^/metrics(/?)$ https://git.halis.io/$1 permanent;
|
||||||
spec:
|
spec:
|
||||||
entryPoints:
|
|
||||||
- websecure
|
|
||||||
routes:
|
|
||||||
- match: Host(`git.halis.io`) && PathPrefix(`/`)
|
|
||||||
kind: Rule
|
|
||||||
middlewares:
|
|
||||||
- name: replace-regex
|
|
||||||
services:
|
|
||||||
- name: gitea-svc
|
|
||||||
port: 80
|
|
||||||
tls:
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- git.halis.io
|
||||||
secretName: git-halis-io-tls
|
secretName: git-halis-io-tls
|
||||||
|
ingressClassName: nginx-external
|
||||||
|
rules:
|
||||||
|
- host: git.halis.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: gitea-svc
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
@ -9,7 +9,6 @@ resources:
|
|||||||
- service.yaml
|
- service.yaml
|
||||||
- servicemonitor.yaml
|
- servicemonitor.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
- certificate.yaml
|
|
||||||
- configmap.yaml
|
- configmap.yaml
|
||||||
- admin-creator.yaml
|
- admin-creator.yaml
|
||||||
- pvc.yaml
|
- pvc.yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user