This commit is contained in:
2026-01-21 22:11:47 +01:00
parent d6fd390618
commit 744da48281
10 changed files with 490 additions and 7 deletions

View File

@@ -1,6 +1,17 @@
# Certificats Let's Encrypt pour le cluster OPS
# Gestion des Certificats TLS pour le cluster OPS
Ce chart gère les certificats Let's Encrypt générés par cert-manager dans le cluster OPS.
Ce chart gère les certificats TLS générés par cert-manager dans le cluster OPS.
## Stratégie de certificats
- **Sites publics** (`.fr`) → **Let's Encrypt** (`letsencrypt-prod`)
- Validation HTTP-01, nécessite accès Internet
- Certificats reconnus par tous les navigateurs
- **Sites internes** (`.local`) → **PKI Interne** (`ca-issuer`)
- Certificats signés par votre CA root interne
- Pas besoin d'accès Internet
- Voir [PKI Interne](../../../../docs/PKI-INTERNE.md) pour plus de détails
## Structure
@@ -28,7 +39,9 @@ metadata:
spec:
secretName: <app>-<env>-tls
issuerRef:
name: letsencrypt-prod # ou letsencrypt-staging pour les tests
name: letsencrypt-prod # Pour sites publics (.fr)
# OU
# name: ca-issuer # Pour sites internes (.local)
kind: ClusterIssuer
dnsNames:
- <domain>

View File

@@ -0,0 +1,26 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: ca-root-certificate
namespace: certificates-ops
spec:
# Ce certificat génère la CA root de votre PKI interne
secretName: ca-root-secret
issuerRef:
name: ca-root-issuer
kind: ClusterIssuer
commonName: "GK Domaine Internal CA Root"
dnsNames:
- "gkdomaine.local"
- "*.gkdomaine.local"
- "*.dev.gkdomaine.local"
- "*.rct.gkdomaine.local"
- "*.prd.gkdomaine.local"
isCA: true
duration: 87600h # 10 ans
usages:
- signing
- key encipherment
- cert sign
- crl sign

View File

@@ -0,0 +1,7 @@
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: ca-root-issuer
spec:
selfSigned: {}

View File

@@ -0,0 +1,10 @@
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: ca-issuer
spec:
ca:
secretName: ca-root-secret
# Le secret ca-root-secret contient la clé privée et le certificat de la CA root
# Il est généré par le Certificate ca-root-certificate ci-dessus

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ca-root-certificate
namespace: certificates-ops
labels:
app: pki-internal
component: ca-root-cert
data:
# Le certificat CA root sera injecté ici par un script ou manuellement
# Ce ConfigMap peut être synchronisé vers les autres clusters pour que les clients
# puissent faire confiance aux certificats signés par cette CA
ca.crt: |
# Le certificat CA sera ajouté ici après la génération
# Pour l'extraire : kubectl get secret ca-root-secret -n certificates-ops -o jsonpath='{.data.tls\.crt}' | base64 -d

View File

@@ -0,0 +1,13 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: harbor-ops-tls
namespace: certificates-ops
spec:
secretName: harbor-ops-tls
issuerRef:
name: ca-issuer # PKI interne pour domaine .local
kind: ClusterIssuer
dnsNames:
- harbor.gkdomaine.local

View File

@@ -6,7 +6,7 @@ metadata:
spec:
secretName: headlamp-dev-tls
issuerRef:
name: letsencrypt-prod
name: ca-issuer
kind: ClusterIssuer
dnsNames:
- headlamp.dev.gkdomaine.fr
- headlamp.dev.gkdomaine.local