Skip to content

Commit

Permalink
Switch from Kubernetes Ingress to Contour HTTPProxy for wiki-cedille …
Browse files Browse the repository at this point in the history
…with retry policies
  • Loading branch information
SonOfLope committed Nov 10, 2024
1 parent e41f7f2 commit 40c5d88
Showing 1 changed file with 55 additions and 23 deletions.
78 changes: 55 additions & 23 deletions apps/cedille-wiki/prod/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,57 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
# name: wiki-cedille-ingress
# annotations:
# cert-manager.io/cluster-issuer: letsencrypt-prod
# ingress.kubernetes.io/force-ssl-redirect: "true"
# kubernetes.io/tls-acme: "true"
# spec:
# ingressClassName: contour
# tls:
# - secretName: wiki-tls
# hosts:
# - wiki.omni.cedille.club
# rules:
# - host: wiki.omni.cedille.club
# http:
# paths:
# - pathType: Prefix
# path: /
# backend:
# service:
# name: wiki-cedille
# port:
# name: http

apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: wiki-cedille-ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
ingress.kubernetes.io/force-ssl-redirect: "true"
kubernetes.io/tls-acme: "true"
name: wiki-cedille
spec:
ingressClassName: contour
tls:
- secretName: wiki-tls
hosts:
- wiki.omni.cedille.club
rules:
- host: wiki.omni.cedille.club
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: wiki-cedille
port:
name: http
virtualhost:
fqdn: wiki.omni.cedille.club
routes:
- conditions:
- prefix: /
timeoutPolicy:
response: 60s # Increase to allow ample time for backend response
idle: 10s # Set idle timeout to handle slow connections
retryPolicy:
count: 3 # Allow up to 3 retries
perTryTimeout: 15s # Timeout per retry attempt
services:
- name: wiki-cedille
port: 80
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: wiki-tls
spec:
secretName: wiki-tls
dnsNames:
- wiki.omni.cedille.club
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer

0 comments on commit 40c5d88

Please sign in to comment.