add pki
This commit is contained in:
26
helm/certificates/ops/templates/certificate-ca-root.yaml
Normal file
26
helm/certificates/ops/templates/certificate-ca-root.yaml
Normal 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
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: ca-root-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
||||
|
||||
10
helm/certificates/ops/templates/cluster-issuer-ca.yaml
Normal file
10
helm/certificates/ops/templates/cluster-issuer-ca.yaml
Normal 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
|
||||
|
||||
16
helm/certificates/ops/templates/configmap-ca-cert.yaml
Normal file
16
helm/certificates/ops/templates/configmap-ca-cert.yaml
Normal 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
|
||||
|
||||
13
helm/certificates/ops/templates/harbor/certificate-dev.yaml
Normal file
13
helm/certificates/ops/templates/harbor/certificate-dev.yaml
Normal 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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user