# cert-manager-webhook-ovh Ce chart déploie le webhook OVH pour cert-manager, permettant l'utilisation du challenge DNS-01 avec OVH pour obtenir des certificats wildcard Let's Encrypt. ## Configuration des credentials OVH Les credentials OVH peuvent être gérés de deux façons : ### Option 1 : Secret Kubernetes classique (par défaut) Créez manuellement le Secret `cert-manager-webhook-ovh` dans les deux namespaces : ```bash # Dans cert-manager-webhook-ovh-ops kubectl create secret generic cert-manager-webhook-ovh \ --from-literal=application-key="VOTRE_APPLICATION_KEY" \ --from-literal=application-secret="VOTRE_APPLICATION_SECRET" \ --from-literal=consumer-key="VOTRE_CONSUMER_KEY" \ -n cert-manager-webhook-ovh-ops \ --context=cluster-ops # Dans cert-manager-ops kubectl create secret generic cert-manager-webhook-ovh \ --from-literal=application-key="VOTRE_APPLICATION_KEY" \ --from-literal=application-secret="VOTRE_APPLICATION_SECRET" \ --from-literal=consumer-key="VOTRE_CONSUMER_KEY" \ -n cert-manager-ops \ --context=cluster-ops ``` ### Option 2 : External Secrets Operator - Stratégie Multi-Namespace (recommandé) Utilisez External Secrets Operator pour synchroniser automatiquement les credentials depuis HashiCorp Vault dans **plusieurs namespaces** en utilisant un **ClusterSecretStore** partagé. #### Avantages de la stratégie Multi-Namespace - ✅ **Un seul ClusterSecretStore** : Configuration centralisée pour tous les namespaces - ✅ **Synchronisation automatique** : Les secrets sont créés automatiquement dans chaque namespace - ✅ **Rotation automatique** : Les secrets sont rafraîchis automatiquement selon `refreshInterval` - ✅ **Sécurité** : Les credentials ne sont jamais stockés en clair dans Git - ✅ **Partage facile** : Le même secret est disponible dans `cert-manager-ops` et `cert-manager-webhook-ovh-ops` #### Prérequis 1. **External Secrets Operator installé** dans le cluster 2. **HashiCorp Vault configuré** avec un rôle Kubernetes auth 3. **ServiceAccount configuré** : Le ServiceAccount `cert-manager-webhook-ovh-sa` doit être autorisé dans Vault pour les namespaces `cert-manager-ops` et `cert-manager-webhook-ovh-ops` #### Configuration dans Vault Créez un rôle Vault pour l'authentification Kubernetes : ```bash # Configuration du rôle Vault vault write auth/kubernetes/role/cert-manager-webhook-ovh-role \ bound_service_account_names=cert-manager-webhook-ovh-sa \ bound_service_account_namespaces=cert-manager-webhook-ovh-ops,cert-manager-ops \ policies=cert-manager-webhook-ovh-policy \ ttl=1h # IMPORTANT : Ne configurez PAS bound_service_account_namespace_selector # Utilisez bound_service_account_namespaces avec une liste de namespaces ``` Créez une policy Vault pour accéder aux secrets OVH : ```bash vault policy write cert-manager-webhook-ovh-policy - <