CHORE(gitea): temporarily redirect to GitHub
- Replace Gitea deployment with GitHub redirect - Use Traefik Middleware for 301 redirect to github.com/mayne0213 - Keep TLS certificate for gitea0213.kro.kr
This commit is contained in:
@@ -7,17 +7,8 @@ metadata:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
sources:
|
||||
- repoURL: https://dl.gitea.com/charts/
|
||||
chart: gitea
|
||||
targetRevision: 12.4.0
|
||||
helm:
|
||||
valueFiles:
|
||||
- $values/gitea/helm-values.yaml
|
||||
- repoURL: https://github.com/K3S-HOME/applications.git
|
||||
targetRevision: main
|
||||
ref: values
|
||||
- repoURL: https://github.com/K3S-HOME/applications.git
|
||||
source:
|
||||
repoURL: https://github.com/K3S-HOME/applications.git
|
||||
targetRevision: main
|
||||
path: gitea
|
||||
destination:
|
||||
@@ -38,7 +29,4 @@ spec:
|
||||
duration: 5s
|
||||
factor: 2
|
||||
maxDuration: 3m
|
||||
managedNamespaceMetadata:
|
||||
labels:
|
||||
goldilocks.fairwinds.com/enabled: 'true'
|
||||
revisionHistoryLimit: 10
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
# Secret is created manually via kubectl
|
||||
resources: []
|
||||
resources:
|
||||
- redirect.yaml
|
||||
namespace: gitea
|
||||
|
||||
70
gitea/redirect.yaml
Normal file
70
gitea/redirect.yaml
Normal file
@@ -0,0 +1,70 @@
|
||||
# Traefik Middleware for GitHub redirect
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: redirect-to-github
|
||||
namespace: gitea
|
||||
spec:
|
||||
redirectRegex:
|
||||
regex: ".*"
|
||||
replacement: "https://github.com/mayne0213"
|
||||
permanent: true
|
||||
---
|
||||
# IngressRoute for HTTPS
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: gitea-redirect-https
|
||||
namespace: gitea
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`gitea0213.kro.kr`) || Host(`www.gitea0213.kro.kr`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: redirect-to-github
|
||||
services:
|
||||
- name: noop@internal
|
||||
kind: TraefikService
|
||||
tls:
|
||||
secretName: gitea-tls
|
||||
domains:
|
||||
- main: gitea0213.kro.kr
|
||||
sans:
|
||||
- www.gitea0213.kro.kr
|
||||
---
|
||||
# IngressRoute for HTTP (redirect to HTTPS first, then to GitHub)
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: gitea-redirect-http
|
||||
namespace: gitea
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`gitea0213.kro.kr`) || Host(`www.gitea0213.kro.kr`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: redirect-to-github
|
||||
services:
|
||||
- name: noop@internal
|
||||
kind: TraefikService
|
||||
---
|
||||
# Certificate for TLS
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: gitea-certificate
|
||||
namespace: gitea
|
||||
spec:
|
||||
secretName: gitea-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-prod
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- gitea0213.kro.kr
|
||||
- www.gitea0213.kro.kr
|
||||
Reference in New Issue
Block a user