FSAT: Update ansible playbooks for compatibility with K8s v1.25.x

The originally used image of Hyperledger Fabric Ansible Collection was
not compatible with K8s v1.25.x. This patch replaces the image with
the latest hyperledger-labs/fabric-ansible-collection.

Additionally, deprecated notations in the latest Kustomize,
patchesJson and patchesStrategicMerge, have been replaced with the
recommended syntax to prevent ansible task execution failures.

Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
This commit is contained in:
Tatsuya Sato 2023-09-28 13:11:58 +00:00 committed by Dave Enyeart
parent f4f3201c0e
commit 23dc50c9ae
4 changed files with 23 additions and 24 deletions

View file

@ -19,19 +19,18 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/kubernetes/ingress-nginx.git/deploy/static/provider/cloud?ref=controller-v1.1.2
- https://github.com/kubernetes/ingress-nginx.git/deploy/static/provider/cloud?ref=controller-v1.1.2
patchesStrategicMerge:
- ingress-nginx-controller.yaml
# Remove the port `appProtocol` attribute as this is not accepted by all cloud providers
patchesJson6902:
- target:
kind: Service
name: ingress-nginx-controller
version: v1
patch: |-
- op: remove
path: "/spec/ports/0/appProtocol"
- op: remove
path: "/spec/ports/1/appProtocol"
patches:
- patch: |-
- op: remove
path: "/spec/ports/0/appProtocol"
- op: remove
path: "/spec/ports/1/appProtocol"
target:
kind: Service
name: ingress-nginx-controller
version: v1
- path: ingress-nginx-controller.yaml

View file

@ -10,4 +10,4 @@
state: present
wait_timeout: 3600
roles:
- ibm.blockchain_platform.fabric_operator_crds
- hyperledger.fabric_ansible_collection.fabric_operator_crds

View file

@ -10,4 +10,4 @@
state: present
wait_timeout: 3600
roles:
- ibm.blockchain_platform.fabric_console
- hyperledger.fabric_ansible_collection.fabric_console

View file

@ -284,7 +284,7 @@ cloud-frontend:
# ANSIBLE PLAYBOOK TARGETS #
###############################################################################
ansible_image := env_var_or_default("ANSIBLE_IMAGE", "ghcr.io/ibm-blockchain/ofs-ansibe:sha-ac6fd82")
ansible_image := env_var_or_default("ANSIBLE_IMAGE", "ghcr.io/hyperledger-labs/fabric-ansible:latest")
namespace := env_var_or_default("WORKSHOP_NAMESPACE", "fabricinfra")
# just set up everything with Ansible
@ -339,7 +339,7 @@ ansible-ingress:
docker run \
--rm \
-v ${HOME}/.kube/:/home/ibp-user/.kube/ \
-v ${HOME}/.kube/:/home/hlf-user/.kube/ \
-v ${CWDIR}/_cfg:/_cfg \
-v $(pwd)/infrastructure/kind_console_ingress:/playbooks \
--network=host ${EXTRAS} \
@ -361,7 +361,7 @@ ansible-operator:
docker run \
--rm \
-v ${HOME}/.kube/:/home/ibp-user/.kube/ \
-v ${HOME}/.kube/:/home/hlf-user/.kube/ \
-v ${CWDIR}/_cfg:/_cfg \
-v $(pwd)/infrastructure/operator_console_playbooks:/playbooks ${EXTRAS} \
--network=host \
@ -380,7 +380,7 @@ ansible-console:
docker run \
--rm \
-v ${HOME}/.kube/:/home/ibp-user/.kube/ \
-v ${HOME}/.kube/:/home/hlf-user/.kube/ \
-v $(pwd)/infrastructure/operator_console_playbooks:/playbooks ${EXTRAS} \
-v ${CWDIR}/_cfg:/_cfg \
--network=host \
@ -418,7 +418,7 @@ ansible-network: ansible-auth
docker run \
--rm \
-u $(id -u) \
-v ${HOME}/.kube/:/home/ibp-user/.kube/ \
-v ${HOME}/.kube/:/home/hlf-user/.kube/ \
-v ${CWDIR}/infrastructure/fabric_network_playbooks:/playbooks ${EXTRAS} \
-v ${CWDIR}/_cfg:/_cfg \
--network=host \
@ -469,7 +469,7 @@ ansible-deploy-chaincode:
docker run \
--rm \
-u $(id -u) \
-v ${HOME}/.kube/:/home/ibp-user/.kube/ \
-v ${HOME}/.kube/:/home/hlf-user/.kube/ \
-v ${CWDIR}/infrastructure/production_chaincode_playbooks:/playbooks ${EXTRAS} \
-v ${CWDIR}/_cfg:/_cfg \
--network=host \
@ -479,7 +479,7 @@ ansible-deploy-chaincode:
docker run \
--rm \
-u $(id -u) \
-v ${HOME}/.kube/:/home/ibp-user/.kube/ \
-v ${HOME}/.kube/:/home/hlf-user/.kube/ \
-v ${CWDIR}/infrastructure/production_chaincode_playbooks:/playbooks ${EXTRAS} \
-v ${CWDIR}/_cfg:/_cfg \
--network=host \
@ -489,7 +489,7 @@ ansible-deploy-chaincode:
docker run \
--rm \
-u $(id -u) \
-v ${HOME}/.kube/:/home/ibp-user/.kube/ \
-v ${HOME}/.kube/:/home/hlf-user/.kube/ \
-v ${CWDIR}/infrastructure/production_chaincode_playbooks:/playbooks ${EXTRAS} \
-v ${CWDIR}/_cfg:/_cfg \
--network=host \
@ -509,7 +509,7 @@ ansible-ready-application:
docker run \
--rm \
-u $(id -u) \
-v ${HOME}/.kube/:/home/ibp-user/.kube/ \
-v ${HOME}/.kube/:/home/hlf-user/.kube/ \
-v ${CWDIR}/infrastructure/production_chaincode_playbooks:/playbooks ${EXTRAS} \
-v ${CWDIR}/_cfg:/_cfg \
--network=host \