From 2fef1b87907ce1a1129d48d8108537a2000351bb Mon Sep 17 00:00:00 2001 From: m-g-k Date: Wed, 20 May 2020 13:42:21 +0000 Subject: [PATCH] Allow console role to use existing TLS secret (#243) * Allow the console role to accept and use an existing TLS secret Signed-off-by: m-g-k * Fix console.rst Signed-off-by: m-g-k Co-authored-by: Simon Stone --- docs/source/roles/console.rst | 7 +++++++ roles/console/templates/k8s/console.yml.j2 | 1 + roles/console/templates/openshift/console.yml.j2 | 1 + 3 files changed, 9 insertions(+) diff --git a/docs/source/roles/console.rst b/docs/source/roles/console.rst index d62faf7c..a5639b20 100644 --- a/docs/source/roles/console.rst +++ b/docs/source/roles/console.rst @@ -139,6 +139,13 @@ Parameters console_storage_size (optional, str, 10Gi) The storage size to use for the console. + console_tls_secret (optional, str, None) + The TLS secret name to use for the console. + + If specified this secret must already exist in the specified Kubernetes namespace or Red Hat OpenShift project and must contain the TLS certificate and private key that the console will use. + + If not specified the console will generate it's own self-signed certificates + product_version (optional, str, 2.1.3) The version of IBM Blockchain Platform to use. diff --git a/roles/console/templates/k8s/console.yml.j2 b/roles/console/templates/k8s/console.yml.j2 index 7f71cd61..5586cac5 100644 --- a/roles/console/templates/k8s/console.yml.j2 +++ b/roles/console/templates/k8s/console.yml.j2 @@ -21,3 +21,4 @@ spec: console: class: "{{ console_storage_class }}" size: "{{ console_storage_size }}" + tlsSecretName: "{{ console_tls_secret | default('') }}" diff --git a/roles/console/templates/openshift/console.yml.j2 b/roles/console/templates/openshift/console.yml.j2 index 7f71cd61..5586cac5 100644 --- a/roles/console/templates/openshift/console.yml.j2 +++ b/roles/console/templates/openshift/console.yml.j2 @@ -21,3 +21,4 @@ spec: console: class: "{{ console_storage_class }}" size: "{{ console_storage_size }}" + tlsSecretName: "{{ console_tls_secret | default('') }}"