Skip to content

Commit

Permalink
Extend console role so you can specify zones (resolves #249) (#267)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
  • Loading branch information
Simon Stone authored Jun 2, 2020
1 parent bd157b7 commit acefa96
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
9 changes: 8 additions & 1 deletion docs/source/roles/console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Parameters

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
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.
Expand All @@ -154,6 +154,13 @@ Parameters

The image tag used for the IBM Blockchain Platform operator is *product_version*-*operator_version*-*arch*, for example ``2.1.3-20200416-amd64``.

zones (optional, list, None)
The list of Kubernetes zones that this console can deploy components into.

If you do not specify a list of Kubernetes zones, and multiple Kubernetes zones are available, then a random Kubernetes zone will be selected for you when you attempt to create any components.

See the Kubernetes documentation for more information: https://kubernetes.io/docs/setup/best-practices/multiple-zones/

wait_timeout (optional, str, 60)
The timeout, in seconds, to wait until the console is available.

Expand Down
2 changes: 2 additions & 0 deletions roles/console/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ wait_timeout: 60

product_version: "2.1.3"
operator_version: "20200520"
# console_tls_secret: ibp-tls-secret
# zones: []
11 changes: 10 additions & 1 deletion roles/console/templates/k8s/console.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ spec:
console:
class: "{{ console_storage_class }}"
size: "{{ console_storage_size }}"
tlsSecretName: "{{ console_tls_secret | default('') }}"
{%+ if console_tls_secret is defined %}
tlsSecretName: "{{ console_tls_secret }}"
{% endif %}
{%+ if zones is defined %}
clusterdata:
zones:
{%+ for zone in zones %}
- "{{ zone }}"
{% endfor %}
{% endif %}
11 changes: 10 additions & 1 deletion roles/console/templates/openshift/console.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ spec:
console:
class: "{{ console_storage_class }}"
size: "{{ console_storage_size }}"
tlsSecretName: "{{ console_tls_secret | default('') }}"
{%+ if console_tls_secret is defined %}
tlsSecretName: "{{ console_tls_secret }}"
{% endif %}
{%+ if zones is defined %}
clusterdata:
zones:
{%+ for zone in zones %}
- "{{ zone }}"
{% endfor %}
{% endif %}

0 comments on commit acefa96

Please sign in to comment.