13 Commits

Author SHA1 Message Date
096008617d Merge pull request 'fix: add direct IngressRoutes for nginx-stable and nginx-canary subdomains' (#5) from feat/nginx-direct-routes into main
Reviewed-on: #5
2026-03-04 19:02:24 +00:00
Claude AI
128857d740 feat: IngressRoute direct access to canary at nginx-canary.thedevops.dev 2026-03-04 19:01:07 +00:00
Claude AI
a74380c917 feat: IngressRoute direct access to stable at nginx-stable.thedevops.dev 2026-03-04 19:01:01 +00:00
Claude AI
e0ef0e683f feat: TLS certificate for nginx-canary.thedevops.dev 2026-03-04 19:00:54 +00:00
Claude AI
7fec458a39 feat: TLS certificate for nginx-stable.thedevops.dev 2026-03-04 19:00:49 +00:00
a09690feba Merge pull request 'feat: deploy nginx-weighted traffic layer (TraefikService 90/10, TLS, HTTP redirect)' (#4) from feat/nginx-weighted into main
Reviewed-on: #4
2026-03-04 18:43:12 +00:00
Claude AI
cdb736d5b2 feat: nginx-weighted ArgoCD application — destination nginx-mcp namespace 2026-03-04 18:41:39 +00:00
Claude AI
e9823e56ad feat: IngressRoutes — websecure (weighted) + web (redirect) 2026-03-04 18:41:33 +00:00
Claude AI
d906dd2d25 feat: Traefik Middleware HTTP→HTTPS permanent redirect 2026-03-04 18:41:26 +00:00
Claude AI
ebef2bf36e feat: cert-manager Certificate for nginx.thedevops.dev 2026-03-04 18:41:21 +00:00
Claude AI
9447fe8b01 feat: TraefikService weighted routing 90/10 stable/canary 2026-03-04 18:41:15 +00:00
Claude AI
539483b4b5 feat: canary ExternalName proxy service (namespace bridge) 2026-03-04 18:41:08 +00:00
047b1cbde8 Merge pull request 'feat/nginx-canary' (#3) from feat/nginx-canary into main
Reviewed-on: #3
2026-03-04 18:40:19 +00:00
10 changed files with 220 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: nginx-canary-tls
namespace: nginx-canary
spec:
secretName: nginx-canary-tls
issuerRef:
name: letsencrypt-http
kind: ClusterIssuer
dnsNames:
- nginx-canary.thedevops.dev

View File

@@ -0,0 +1,37 @@
---
# Direct HTTPS access to canary app at nginx-canary.thedevops.dev
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: nginx-canary-direct
namespace: nginx-canary
spec:
entryPoints:
- websecure
routes:
- match: Host(`nginx-canary.thedevops.dev`)
kind: Rule
services:
- name: nginx-canary
port: 80
tls:
secretName: nginx-canary-tls
---
# HTTP redirect for nginx-canary.thedevops.dev
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: nginx-canary-direct-http
namespace: nginx-canary
spec:
entryPoints:
- web
routes:
- match: Host(`nginx-canary.thedevops.dev`)
kind: Rule
middlewares:
- name: redirect-https
namespace: nginx-mcp
services:
- name: nginx-canary
port: 80

View File

@@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nginx-weighted
namespace: argocd
spec:
project: default
source:
repoURL: http://gitea-http.gitea.svc.cluster.local:3000/admin/k3s-gitops
path: apps/nginx-weighted
targetRevision: HEAD
destination:
server: https://kubernetes.default.svc
namespace: nginx-mcp
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

View File

@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: nginx-canary-proxy
namespace: nginx-mcp
labels:
app: nginx-canary-proxy
annotations:
description: >
ExternalName proxy required because Traefik v3 does not allow
cross-namespace service references inside TraefikService weighted config.
This service bridges nginx-mcp namespace → nginx-canary namespace.
spec:
type: ExternalName
externalName: nginx-canary.nginx-canary.svc.cluster.local
ports:
- port: 80
targetPort: 80

View File

@@ -0,0 +1,12 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: nginx-stable-tls
namespace: nginx-mcp
spec:
secretName: nginx-stable-tls
issuerRef:
name: letsencrypt-http
kind: ClusterIssuer
dnsNames:
- nginx-stable.thedevops.dev

View File

@@ -0,0 +1,12 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: nginx-weighted-tls
namespace: nginx-mcp
spec:
secretName: nginx-weighted-tls
issuerRef:
name: letsencrypt-http
kind: ClusterIssuer
dnsNames:
- nginx.thedevops.dev

View File

@@ -0,0 +1,37 @@
---
# Direct HTTPS access to stable app at nginx-stable.thedevops.dev
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: nginx-stable-direct
namespace: nginx-mcp
spec:
entryPoints:
- websecure
routes:
- match: Host(`nginx-stable.thedevops.dev`)
kind: Rule
services:
- name: nginx-mcp
port: 80
tls:
secretName: nginx-stable-tls
---
# HTTP redirect for nginx-stable.thedevops.dev
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: nginx-stable-direct-http
namespace: nginx-mcp
spec:
entryPoints:
- web
routes:
- match: Host(`nginx-stable.thedevops.dev`)
kind: Rule
middlewares:
- name: redirect-https
namespace: nginx-mcp
services:
- name: nginx-mcp
port: 80

View File

@@ -0,0 +1,38 @@
---
# HTTPS entrypoint — routes nginx.thedevops.dev through weighted TraefikService
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: nginx-weighted
namespace: nginx-mcp
spec:
entryPoints:
- websecure
routes:
- match: Host(`nginx.thedevops.dev`)
kind: Rule
services:
- name: nginx-weighted
namespace: nginx-mcp
kind: TraefikService
tls:
secretName: nginx-weighted-tls
---
# HTTP entrypoint — redirects all HTTP traffic to HTTPS via middleware
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: nginx-weighted-http
namespace: nginx-mcp
spec:
entryPoints:
- web
routes:
- match: Host(`nginx.thedevops.dev`)
kind: Rule
middlewares:
- name: redirect-https
namespace: nginx-mcp
services:
- name: nginx-mcp
port: 80

View File

@@ -0,0 +1,9 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: redirect-https
namespace: nginx-mcp
spec:
redirectScheme:
scheme: https
permanent: true

View File

@@ -0,0 +1,25 @@
---
# TraefikService — weighted load balancer between stable and canary.
# THIS IS THE ONLY FILE YOU NEED TO EDIT to shift traffic weights.
#
# Weight scenarios:
# Initial canary test → stable: 90 canary: 10
# Extended testing → stable: 50 canary: 50
# Full promote to canary → stable: 0 canary: 100
# Emergency rollback → stable: 100 canary: 0
apiVersion: traefik.io/v1alpha1
kind: TraefikService
metadata:
name: nginx-weighted
namespace: nginx-mcp
spec:
weighted:
services:
- name: nginx-mcp
namespace: nginx-mcp
port: 80
weight: 90
- name: nginx-canary-proxy
namespace: nginx-mcp
port: 80
weight: 10