From cfd0a223ed9ef45401b32b459a0195283b32c13c Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Wed, 10 Oct 2018 16:16:48 +0200 Subject: [PATCH] [stable/wordpress] Simplify ingress configuration for cert-manager (#8335) * [stable/wordpress] Simplify ingress configuration when for cert-manager Signed-off-by: juan131 * Apply changes on 'values-production.yaml' too Signed-off-by: juan131 --- stable/wordpress/Chart.yaml | 2 +- stable/wordpress/README.md | 1 + stable/wordpress/templates/ingress.yaml | 3 +++ stable/wordpress/values-production.yaml | 10 +++++----- stable/wordpress/values.yaml | 10 +++++----- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/stable/wordpress/Chart.yaml b/stable/wordpress/Chart.yaml index 561ee3a340..a8c0531fc0 100644 --- a/stable/wordpress/Chart.yaml +++ b/stable/wordpress/Chart.yaml @@ -1,5 +1,5 @@ name: wordpress -version: 3.0.4 +version: 3.1.0 appVersion: 4.9.8 description: Web publishing platform for building blogs and websites. icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png diff --git a/stable/wordpress/README.md b/stable/wordpress/README.md index b8b6c76117..c7f1a24e6d 100644 --- a/stable/wordpress/README.md +++ b/stable/wordpress/README.md @@ -88,6 +88,7 @@ The following table lists the configurable parameters of the WordPress chart and | `ingress.hosts[0].name` | Hostname to your WordPress installation | `wordpress.local` | | `ingress.hosts[0].path` | Path within the url structure | `/` | | `ingress.hosts[0].tls` | Utilize TLS backend in ingress | `false` | +| `ingress.hosts[0].certManager` | Add annotations for cert-manager | `false` | | `ingress.hosts[0].tlsSecret` | TLS Secret (certificates) | `wordpress.local-tls-secret` | | `ingress.hosts[0].annotations` | Annotations for this host's ingress record | `[]` | | `ingress.secrets[0].name` | TLS Secret Name | `nil` | diff --git a/stable/wordpress/templates/ingress.yaml b/stable/wordpress/templates/ingress.yaml index 7870146ffa..627f2e5a13 100644 --- a/stable/wordpress/templates/ingress.yaml +++ b/stable/wordpress/templates/ingress.yaml @@ -13,6 +13,9 @@ metadata: {{- if .tls }} ingress.kubernetes.io/secure-backends: "true" {{- end }} + {{- if .certManager }} + kubernetes.io/tls-acme: "true" + {{- end }} {{- range $key, $value := .annotations }} {{ $key }}: {{ $value | quote }} {{- end }} diff --git a/stable/wordpress/values-production.yaml b/stable/wordpress/values-production.yaml index 1c210bc55f..8d6f31afe6 100644 --- a/stable/wordpress/values-production.yaml +++ b/stable/wordpress/values-production.yaml @@ -178,20 +178,20 @@ ingress: ## A side effect of this will be that the backend wordpress service will be connected at port 443 tls: true + ## Set this to true in order to add the corresponding annontations for cert-manager + certManager: false + ## If TLS is set to true, you must declare what secret will store the key/certificate for TLS tlsSecret: wordpress.local-tls ## Ingress annotations done as key:value pairs - ## If you're using kube-lego, you will want to add: - ## kubernetes.io/tls-acme: true - ## ## For a full list of possible ingress annotations, please see ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md ## ## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set + ## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set annotations: # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: true secrets: ## If you're providing your own certificates, please use this to add the certificates as secrets @@ -199,7 +199,7 @@ ingress: ## -----BEGIN RSA PRIVATE KEY----- ## ## name should line up with a tlsSecret set further up - ## If you're using kube-lego, this is unneeded, as it will create the secret for you if it is not set + ## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set ## ## It is also possible to create and manage the certificates outside of this helm chart ## Please see README.md for more information diff --git a/stable/wordpress/values.yaml b/stable/wordpress/values.yaml index 3326248cee..8b260de228 100644 --- a/stable/wordpress/values.yaml +++ b/stable/wordpress/values.yaml @@ -181,20 +181,20 @@ ingress: ## A side effect of this will be that the backend wordpress service will be connected at port 443 tls: false + ## Set this to true in order to add the corresponding annontations for cert-manager + certManager: false + ## If TLS is set to true, you must declare what secret will store the key/certificate for TLS tlsSecret: wordpress.local-tls ## Ingress annotations done as key:value pairs - ## If you're using kube-lego, you will want to add: - ## kubernetes.io/tls-acme: true - ## ## For a full list of possible ingress annotations, please see ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md ## ## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set + ## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set annotations: # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: true secrets: ## If you're providing your own certificates, please use this to add the certificates as secrets @@ -202,7 +202,7 @@ ingress: ## -----BEGIN RSA PRIVATE KEY----- ## ## name should line up with a tlsSecret set further up - ## If you're using kube-lego, this is unneeded, as it will create the secret for you if it is not set + ## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set ## ## It is also possible to create and manage the certificates outside of this helm chart ## Please see README.md for more information