From 19daff84b15d342c339862e55594a70e5dae7d4e Mon Sep 17 00:00:00 2001 From: Matthew B White Date: Wed, 4 May 2022 09:37:56 +0100 Subject: [PATCH] Update to support installing IBP v2.5.3 This brings in the very latest Hyperleder Fabric release, 2.4. This lets you use the gateway functionality. Makes application connectivity much simpler Signed-off-by: Matthew B White --- galaxy.yml | 2 +- plugins/module_utils/dict_utils.py | 6 +++--- roles/console/defaults/main.yml | 4 ++-- roles/console/templates/k8s/console.yml.j2 | 3 +++ roles/console/templates/openshift/console.yml.j2 | 3 +++ roles/crds/defaults/main.yml | 4 ++-- roles/crds/templates/k8s/deployment.yml.j2 | 2 +- roles/crds/templates/openshift/deployment.yml.j2 | 2 +- roles/hlfsupport_console/templates/k8s/operator.yml.j2 | 4 ++-- .../hlfsupport_console/templates/openshift/operator.yml.j2 | 4 ++-- 10 files changed, 20 insertions(+), 14 deletions(-) diff --git a/galaxy.yml b/galaxy.yml index 76c31cf3..78fdaaea 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -4,7 +4,7 @@ --- namespace: ibm name: blockchain_platform -version: 1.1.7 +version: 1.2.0 readme: README.md authors: - Simon Stone/Matthew White diff --git a/plugins/module_utils/dict_utils.py b/plugins/module_utils/dict_utils.py index 0ee10f30..b0eb1598 100644 --- a/plugins/module_utils/dict_utils.py +++ b/plugins/module_utils/dict_utils.py @@ -6,7 +6,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -import collections +from collections.abc import Mapping import json @@ -16,7 +16,7 @@ def copy_dict(source): def merge_dicts(target, source): for key, value in source.items(): - if key in target and isinstance(target[key], dict) and isinstance(source[key], collections.Mapping): + if key in target and isinstance(target[key], dict) and isinstance(source[key], Mapping): merge_dicts(target[key], source[key]) else: target[key] = source[key] @@ -25,7 +25,7 @@ def merge_dicts(target, source): def diff_dicts(target, source): result = dict() for key, value in source.items(): - if key in target and isinstance(target[key], dict) and isinstance(source[key], collections.Mapping): + if key in target and isinstance(target[key], dict) and isinstance(source[key], Mapping): sub_result = diff_dicts(target[key], source[key]) if bool(sub_result): result[key] = sub_result diff --git a/roles/console/defaults/main.yml b/roles/console/defaults/main.yml index 4dcbed28..5fbddda9 100644 --- a/roles/console/defaults/main.yml +++ b/roles/console/defaults/main.yml @@ -33,8 +33,8 @@ console_storage_size: 10Gi wait_timeout: 60 -product_version: "2.5.2" -operator_version: "20220308" +product_version: "2.5.3" +operator_version: "20220503" operator_image: "{{ image_registry_url }}/ibp-operator" operator_tag: "{{ product_version }}-{{ operator_version }}-{{ arch }}" # console_tls_secret: ibp-tls-secret diff --git a/roles/console/templates/k8s/console.yml.j2 b/roles/console/templates/k8s/console.yml.j2 index 6c2b475b..60f9e452 100644 --- a/roles/console/templates/k8s/console.yml.j2 +++ b/roles/console/templates/k8s/console.yml.j2 @@ -25,6 +25,9 @@ spec: email: "{{ console_email }}" password: "{{ console_default_password }}" registryURL: "{{ image_registry_url }}" +{%+ if product_version is version('2.5.3', '>=') %} + usetags: true +{%+ endif %} {%+ if product_version is version('2.5.0', '>=') %} imagePullSecrets: - "{{ image_pull_secret }}" diff --git a/roles/console/templates/openshift/console.yml.j2 b/roles/console/templates/openshift/console.yml.j2 index 6c2b475b..60f9e452 100644 --- a/roles/console/templates/openshift/console.yml.j2 +++ b/roles/console/templates/openshift/console.yml.j2 @@ -25,6 +25,9 @@ spec: email: "{{ console_email }}" password: "{{ console_default_password }}" registryURL: "{{ image_registry_url }}" +{%+ if product_version is version('2.5.3', '>=') %} + usetags: true +{%+ endif %} {%+ if product_version is version('2.5.0', '>=') %} imagePullSecrets: - "{{ image_pull_secret }}" diff --git a/roles/crds/defaults/main.yml b/roles/crds/defaults/main.yml index bb1ebc0a..28221cf9 100644 --- a/roles/crds/defaults/main.yml +++ b/roles/crds/defaults/main.yml @@ -23,7 +23,7 @@ service_account: default webhook: ibp-webhook wait_timeout: 60 -product_version: "2.5.2" -webhook_version: "20220308" +product_version: "2.5.3" +webhook_version: "20220503" webhook_image: "{{ image_registry_url }}/ibp-crdwebhook" webhook_tag: "{{ product_version }}-{{ webhook_version }}-{{ arch }}" diff --git a/roles/crds/templates/k8s/deployment.yml.j2 b/roles/crds/templates/k8s/deployment.yml.j2 index 2580a55b..26d8e4cf 100644 --- a/roles/crds/templates/k8s/deployment.yml.j2 +++ b/roles/crds/templates/k8s/deployment.yml.j2 @@ -29,7 +29,7 @@ spec: annotations: productName: "IBM Blockchain Platform" productID: "54283fa24f1a4e8589964e6e92626ec4" - productVersion: "2.5.0" + productVersion: "2.5.3" spec: serviceAccountName: "{{ service_account }}" imagePullSecrets: diff --git a/roles/crds/templates/openshift/deployment.yml.j2 b/roles/crds/templates/openshift/deployment.yml.j2 index 2580a55b..26d8e4cf 100644 --- a/roles/crds/templates/openshift/deployment.yml.j2 +++ b/roles/crds/templates/openshift/deployment.yml.j2 @@ -29,7 +29,7 @@ spec: annotations: productName: "IBM Blockchain Platform" productID: "54283fa24f1a4e8589964e6e92626ec4" - productVersion: "2.5.0" + productVersion: "2.5.3" spec: serviceAccountName: "{{ service_account }}" imagePullSecrets: diff --git a/roles/hlfsupport_console/templates/k8s/operator.yml.j2 b/roles/hlfsupport_console/templates/k8s/operator.yml.j2 index 57df10d6..9fc27b99 100644 --- a/roles/hlfsupport_console/templates/k8s/operator.yml.j2 +++ b/roles/hlfsupport_console/templates/k8s/operator.yml.j2 @@ -60,8 +60,8 @@ spec: privileged: false allowPrivilegeEscalation: false readOnlyRootFilesystem: false - runAsNonRoot: false - runAsUser: 1001 + runAsNonRoot: true + runAsUser: 7051 capabilities: drop: - ALL diff --git a/roles/hlfsupport_console/templates/openshift/operator.yml.j2 b/roles/hlfsupport_console/templates/openshift/operator.yml.j2 index 7deeeffb..227b8d00 100644 --- a/roles/hlfsupport_console/templates/openshift/operator.yml.j2 +++ b/roles/hlfsupport_console/templates/openshift/operator.yml.j2 @@ -60,8 +60,8 @@ spec: privileged: false allowPrivilegeEscalation: false readOnlyRootFilesystem: false - runAsNonRoot: false - runAsUser: 1001 + runAsNonRoot: true + runAsUser: 7051 capabilities: drop: - ALL