From 7c38f9355a89c65d6ef300cccf3e4b3aef00e7a3 Mon Sep 17 00:00:00 2001 From: Melvin GABALI Date: Thu, 22 Jan 2026 21:28:15 +0100 Subject: [PATCH] update secret --- helm/cert-manager-webhook-ovh/ops/README.md | 18 +++++++++ .../ops/templates/secret-ovh-credentials.yaml | 37 +++++++++++++++++++ helm/cert-manager-webhook-ovh/ops/values.yaml | 7 ++++ 3 files changed, 62 insertions(+) create mode 100644 helm/cert-manager-webhook-ovh/ops/templates/secret-ovh-credentials.yaml diff --git a/helm/cert-manager-webhook-ovh/ops/README.md b/helm/cert-manager-webhook-ovh/ops/README.md index 6d72e29..4a04a88 100644 --- a/helm/cert-manager-webhook-ovh/ops/README.md +++ b/helm/cert-manager-webhook-ovh/ops/README.md @@ -8,6 +8,24 @@ Les credentials OVH peuvent être gérés de deux façons : ### Option 1 : Secret Kubernetes classique (par défaut) +**Méthode A : Via values.yaml (recommandé si vous n'utilisez pas External Secrets)** + +Configurez les credentials dans `values.yaml` : + +```yaml +externalSecret: + enabled: false # External Secrets désactivé + +ovhCredentials: + applicationKey: "VOTRE_APPLICATION_KEY" + applicationSecret: "VOTRE_APPLICATION_SECRET" + consumerKey: "VOTRE_CONSUMER_KEY" +``` + +Le chart créera automatiquement le secret `cert-manager-webhook-ovh` dans les deux namespaces (`cert-manager-webhook-ovh-ops` et `cert-manager-ops`). + +**Méthode B : Création manuelle via kubectl** + Créez manuellement le Secret `cert-manager-webhook-ovh` dans les deux namespaces : ```bash diff --git a/helm/cert-manager-webhook-ovh/ops/templates/secret-ovh-credentials.yaml b/helm/cert-manager-webhook-ovh/ops/templates/secret-ovh-credentials.yaml new file mode 100644 index 0000000..7c6ad30 --- /dev/null +++ b/helm/cert-manager-webhook-ovh/ops/templates/secret-ovh-credentials.yaml @@ -0,0 +1,37 @@ +{{- if not .Values.externalSecret.enabled }} +{{- if .Values.ovhCredentials.applicationKey }} +--- +# Secret OVH credentials pour cert-manager-webhook-ovh-ops +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.externalSecret.secretName | default "cert-manager-webhook-ovh" }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: cert-manager-webhook-ovh + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +type: Opaque +stringData: + application-key: {{ .Values.ovhCredentials.applicationKey }} + application-secret: {{ .Values.ovhCredentials.applicationSecret }} + consumer-key: {{ .Values.ovhCredentials.consumerKey }} +--- +# Secret OVH credentials pour cert-manager-ops (partage du même secret) +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.externalSecret.secretName | default "cert-manager-webhook-ovh" }} + namespace: {{ .Values.certManager.namespace }} + labels: + app.kubernetes.io/name: cert-manager-webhook-ovh + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +type: Opaque +stringData: + application-key: {{ .Values.ovhCredentials.applicationKey }} + application-secret: {{ .Values.ovhCredentials.applicationSecret }} + consumer-key: {{ .Values.ovhCredentials.consumerKey }} +{{- end }} +{{- end }} + diff --git a/helm/cert-manager-webhook-ovh/ops/values.yaml b/helm/cert-manager-webhook-ovh/ops/values.yaml index a8e9738..e5a6196 100644 --- a/helm/cert-manager-webhook-ovh/ops/values.yaml +++ b/helm/cert-manager-webhook-ovh/ops/values.yaml @@ -85,6 +85,13 @@ cert-manager-webhook-ovh: # Note : Vérifiez si votre chart supporte les selectors via values, # sinon il faudra peut-être patcher le template. +# Configuration des credentials OVH (si External Secrets n'est pas utilisé) +# Ces valeurs sont utilisées uniquement si externalSecret.enabled = false +ovhCredentials: + applicationKey: "" # Application Key OVH (laisser vide si vous utilisez External Secrets) + applicationSecret: "" # Application Secret OVH (laisser vide si vous utilisez External Secrets) + consumerKey: "" # Consumer Key OVH (laisser vide si vous utilisez External Secrets) + # Configuration External Secrets Operator - Stratégie Multi-Namespace # Cette configuration permet de partager les secrets OVH entre cert-manager-ops et cert-manager-webhook-ovh-ops # en utilisant un ClusterSecretStore et des ExternalSecrets dans chaque namespace