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:
2026-01-07 13:28:09 +09:00
parent 87d5d4ccdb
commit 6d59d6774b
3 changed files with 75 additions and 16 deletions

View File

@@ -7,17 +7,8 @@ metadata:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
spec: spec:
project: default project: default
sources: source:
- repoURL: https://dl.gitea.com/charts/ repoURL: https://github.com/K3S-HOME/applications.git
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
targetRevision: main targetRevision: main
path: gitea path: gitea
destination: destination:
@@ -38,7 +29,4 @@ spec:
duration: 5s duration: 5s
factor: 2 factor: 2
maxDuration: 3m maxDuration: 3m
managedNamespaceMetadata:
labels:
goldilocks.fairwinds.com/enabled: 'true'
revisionHistoryLimit: 10 revisionHistoryLimit: 10

View File

@@ -1,4 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
# Secret is created manually via kubectl resources:
resources: [] - redirect.yaml
namespace: gitea

70
gitea/redirect.yaml Normal file
View 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