mirror of
https://github.com/vhaudiquet/homeprod.git
synced 2026-10-17 04:24:54 +00:00
209 lines
7.2 KiB
YAML
209 lines
7.2 KiB
YAML
# Caddy Edge Proxy
|
|
replicaCount: 2
|
|
# Listen on standard HTTP port
|
|
listenPort: 80
|
|
# Enable HTTPS
|
|
https:
|
|
enabled: true
|
|
port: 443
|
|
image:
|
|
repository: caddy
|
|
pullPolicy: IfNotPresent
|
|
tagSuffix: ""
|
|
tag: 2.11.7
|
|
service:
|
|
type: LoadBalancer
|
|
# Cluster (not Local) so any node can forward to pods on any other node.
|
|
externalTrafficPolicy: Cluster
|
|
# Disable ingress - Caddy IS the edge proxy
|
|
ingress:
|
|
enabled: false
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
# Caddy needs root to bind to ports 80/443 and write runtime data
|
|
# Using restrictive security context causes "operation not permitted"
|
|
podSecurityContext: {}
|
|
securityContext: {}
|
|
health:
|
|
path: /
|
|
port: 9999
|
|
# Extra volumes: TLS certificates from cert-manager + external routes ConfigMap
|
|
volumes:
|
|
- name: vhaudiquet-fr-tls
|
|
secret:
|
|
secretName: vhaudiquet-fr-tls
|
|
optional: true
|
|
- name: wildcard-vhaudiquet-fr-tls
|
|
secret:
|
|
secretName: wildcard-vhaudiquet-fr-tls
|
|
optional: true
|
|
# semery.fr certs from cert-manager (OVH DNS-01)
|
|
- name: semery-fr-tls
|
|
secret:
|
|
secretName: semery-fr-tls
|
|
optional: true
|
|
- name: wildcard-semery-fr-tls
|
|
secret:
|
|
secretName: wildcard-semery-fr-tls
|
|
optional: true
|
|
- name: buildpath-win-tls
|
|
secret:
|
|
secretName: buildpath-win-tls
|
|
optional: true
|
|
# saggar.dev cert from cert-manager (Porkbun DNS-01)
|
|
- name: saggar-dev-tls
|
|
secret:
|
|
secretName: saggar-dev-tls
|
|
optional: true
|
|
- name: api-saggar-dev-tls
|
|
secret:
|
|
secretName: api-saggar-dev-tls
|
|
optional: true
|
|
# docs.saggar.dev cert — the saggar book (static nginx)
|
|
- name: docs-saggar-dev-tls
|
|
secret:
|
|
secretName: docs-saggar-dev-tls
|
|
optional: true
|
|
# get.saggar.dev cert — the saggar distribution host (garage web)
|
|
- name: get-saggar-dev-tls
|
|
secret:
|
|
secretName: get-saggar-dev-tls
|
|
optional: true
|
|
# rhema.rs certs from cert-manager (Cloudflare DNS-01)
|
|
- name: rhema-rs-tls
|
|
secret:
|
|
secretName: rhema-rs-tls
|
|
optional: true
|
|
- name: www-rhema-rs-tls
|
|
secret:
|
|
secretName: www-rhema-rs-tls
|
|
optional: true
|
|
- name: get-rhema-rs-tls
|
|
secret:
|
|
secretName: get-rhema-rs-tls
|
|
optional: true
|
|
- name: s3-rhema-rs-tls
|
|
secret:
|
|
secretName: s3-rhema-rs-tls
|
|
optional: true
|
|
- name: routes
|
|
configMap:
|
|
name: caddy-routes
|
|
# Extra volume mounts - each secret mounted as a directory with tls.crt/tls.key
|
|
volumeMounts:
|
|
- name: vhaudiquet-fr-tls
|
|
mountPath: /etc/caddy/certs/vhaudiquet-fr
|
|
readOnly: true
|
|
- name: wildcard-vhaudiquet-fr-tls
|
|
mountPath: /etc/caddy/certs/wildcard-vhaudiquet-fr
|
|
readOnly: true
|
|
- name: semery-fr-tls
|
|
mountPath: /etc/caddy/certs/semery-fr
|
|
readOnly: true
|
|
- name: wildcard-semery-fr-tls
|
|
mountPath: /etc/caddy/certs/wildcard-semery-fr
|
|
readOnly: true
|
|
- name: buildpath-win-tls
|
|
mountPath: /etc/caddy/certs/buildpath-win
|
|
readOnly: true
|
|
- name: saggar-dev-tls
|
|
mountPath: /etc/caddy/certs/saggar-dev
|
|
readOnly: true
|
|
- name: api-saggar-dev-tls
|
|
mountPath: /etc/caddy/certs/api-saggar-dev
|
|
readOnly: true
|
|
- name: docs-saggar-dev-tls
|
|
mountPath: /etc/caddy/certs/docs-saggar-dev
|
|
readOnly: true
|
|
- name: get-saggar-dev-tls
|
|
mountPath: /etc/caddy/certs/get-saggar-dev
|
|
readOnly: true
|
|
- name: rhema-rs-tls
|
|
mountPath: /etc/caddy/certs/rhema-rs
|
|
readOnly: true
|
|
- name: www-rhema-rs-tls
|
|
mountPath: /etc/caddy/certs/www-rhema-rs
|
|
readOnly: true
|
|
- name: get-rhema-rs-tls
|
|
mountPath: /etc/caddy/certs/get-rhema-rs
|
|
readOnly: true
|
|
- name: s3-rhema-rs-tls
|
|
mountPath: /etc/caddy/certs/s3-rhema-rs
|
|
readOnly: true
|
|
- name: routes
|
|
mountPath: /etc/caddy/routes
|
|
readOnly: true
|
|
# Caddy configuration
|
|
config:
|
|
debug: false
|
|
# Global options (goes inside the global {} block)
|
|
global: |
|
|
auto_https off
|
|
# The main Caddyfile content - imports routes from external ConfigMap
|
|
# This keeps routes in a separate, easily editable file
|
|
caddyFile: |
|
|
:80 {
|
|
redir https://{host}{uri} permanent
|
|
}
|
|
|
|
import /etc/caddy/routes/Caddyfile
|
|
affinity:
|
|
# Prefer non-failover nodes in normal operation
|
|
nodeAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
preference:
|
|
matchExpressions:
|
|
- key: ENC[AES256_GCM,data:AsOdq9OGQbAGV42W4d22EGVMi5E=,iv:U3sLu8pI7fqOPbvpfpVz21cUfwovKRFi8jY6laTyStY=,tag:EQVSFAzTYw2En2xdGTCF3Q==,type:str]
|
|
operator: NotIn
|
|
values:
|
|
- "true"
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: caddy
|
|
topologyKey: kubernetes.io/hostname
|
|
tolerations:
|
|
# Tolerate the failover taint so caddy CAN schedule on p330 (small-node-1).
|
|
- key: ENC[AES256_GCM,data:s3X0PmRJCCVh,iv:UYZl3EsmdSTdF9NoYsL+zbxLlkfO2GU80Sy3CpSXMBY=,tag:35UtC37ldCItR9fAtSXVVw==,type:str]
|
|
operator: Equal
|
|
value: failover
|
|
effect: NoSchedule
|
|
- key: ENC[AES256_GCM,data:NYCyZsj7wMxKUjaDu+rUOQYxDKvvEwSWuDAxQkSGTczXyApCbw==,iv:3AcvLXryeZ6dfmqanFpGOgEf1nGuEVbvUmZzruxzL98=,tag:Daa9AgXQZkkr7RIzljWOeQ==,type:str]
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
sops:
|
|
lastmodified: "2026-10-16T07:06:11Z"
|
|
mac: ENC[AES256_GCM,data:kMIxep2WVIr8/uAiw12T1JXMbtpyijo1c1MOOUKuok2Z1zSrnFZovgIup3u8/2BhqJ2UUDm5hFJi41Tsq45ba5ELs4PX1whi6EXlHQJxNo7ScfepEi10es/wa+p+3w9V8Yv9cklIWk14zh0UABs8jRzOJXhn5XI3O644CJSULQA=,iv:3ssxqRNRvXbmn0HiQFdwoGVbsnzvtQxfpHPIUpplMK8=,tag:5VRyB/Hh4tZUWp6KCPNSQg==,type:str]
|
|
pgp:
|
|
- created_at: "2026-10-16T07:06:11Z"
|
|
enc: |-
|
|
-----BEGIN PGP MESSAGE-----
|
|
|
|
hQIMA7uy4qQr71wiARAAuN5nBauJiH5bFx80iF2W2XJDwMCFG+SPlqv2ErxVaYkD
|
|
kSt8pA0o4Bzqr6gP6cEgEhzQHAVVvsvTZJTY5lX6KWNRxhz/RXDhxAi9xdBHQ81f
|
|
dDWn7pgD8sv8cODM39yeukhGlHxZuk7FiUJ4fBnouojWUCxf2Ib5m5TEaWwmmv5n
|
|
EBBjjcbGZzyWBzCkLbEY/ML1FIx5j/jyZjpjMp2En1309ljIBckjLk5s9Kntp6oJ
|
|
/TkW/BhU96y8fyGM6u3FV54wORNlCT3P5cDT4rsQd+KgG0DDchAdUSb7hmBEn+iC
|
|
W/eUsp7nhObkZZBjTKYeS502Q+3RUEXoLnVLWougDxMSA1rJNS3nkgzK1cmKs97/
|
|
Ghnb5TUGPmoQMUltQzxInDq1mgeGfuFUffprYprYKGeVC/oQ6uPHE4jVZImlWRjv
|
|
w6YPHv/2XhWMN5vH/ybsrqxcFb5+1z8u8J58GAJ37hDXzkL8ENJUouonM3sywaBc
|
|
VbXHzJwYEuLhRfNpay6ovwPkhU25gV3atBiXloIWc0PivPjOAJqqs0vkMgRiA+3R
|
|
yUagVKdyavVUhqou2LOxSGSv77uFPWZwhqUILtqzTeSE6GHUxVqKQPa91klRRNI7
|
|
YWNtM7ZqSeANK99h5vgphhPZpuKkIzXHSLEXdplxvaRERfWMU3UGCDZOMVcDMlbS
|
|
XgGovkHZ9+NKVgZVpsRyQQutbSJqvHVZJx162gu3UKC1IgnDnhslOGKVWw/oKNb5
|
|
KyPf0CLk9BCAlSngr5D5pw4GJ9eq7RNFOqC32LPwXgNSD1AfLFHYGWh3RZM+81w=
|
|
=eA3w
|
|
-----END PGP MESSAGE-----
|
|
fp: DC6910268E657FF70BA7EC289974494E76938DDC
|
|
encrypted_regex: ^(data|stringData|.*key|.*crt)$
|
|
version: 3.10.2
|