├── .github └── workflows │ ├── endtoend-tests.yaml │ ├── image-build-pr.yaml │ ├── image-build.yaml │ ├── integration-tests.yaml │ ├── release.yaml │ └── unit-tests.yaml ├── .gitignore ├── Dockerfile ├── LICENSE ├── MAINTAINERS.md ├── Makefile ├── PROJECT ├── README.md ├── api ├── addtoscheme_ibp_v1beta1.go ├── apis.go └── v1beta1 │ ├── common.go │ ├── common_struct.go │ ├── groupversion_info.go │ ├── ibpca.go │ ├── ibpca_types.go │ ├── ibpconsole.go │ ├── ibpconsole_types.go │ ├── ibporderer.go │ ├── ibporderer_types.go │ ├── ibppeer.go │ ├── ibppeer_types.go │ └── zz_generated.deepcopy.go ├── boilerplate ├── boilerplate.go.txt └── boilerplate.sh.txt ├── build ├── entrypoint └── user_setup ├── bundle.Dockerfile ├── bundle ├── manifests │ ├── fabric-opensource-operator.clusterserviceversion.yaml │ ├── ibp.com_ibpcas.yaml │ ├── ibp.com_ibpconsoles.yaml │ ├── ibp.com_ibporderers.yaml │ ├── ibp.com_ibppeers.yaml │ ├── operator-controller-manager-metrics-service_v1_service.yaml │ ├── operator-ibm-hlfsupport_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml │ ├── operator-leader-election-role_rbac.authorization.k8s.io_v1_role.yaml │ ├── operator-leader-election-rolebinding_rbac.authorization.k8s.io_v1_rolebinding.yaml │ ├── operator-manager-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ ├── operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml │ ├── operator-metrics-reader_rbac.authorization.k8s.io_v1beta1_clusterrole.yaml │ ├── operator-operator_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml │ ├── operator-proxy-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ └── operator-proxy-rolebinding_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml └── metadata │ └── annotations.yaml ├── cmd └── crd │ └── main.go ├── config ├── certmanager │ ├── certificate.yaml │ ├── kustomization.yaml │ └── kustomizeconfig.yaml ├── crd │ ├── bases │ │ ├── ibp.com_ibpcas.yaml │ │ ├── ibp.com_ibpconsoles.yaml │ │ ├── ibp.com_ibporderers.yaml │ │ └── ibp.com_ibppeers.yaml │ ├── kustomization.yaml │ ├── kustomizeconfig.yaml │ └── patches │ │ ├── cainjection_in_ibpcas.yaml │ │ ├── cainjection_in_ibpconsoles.yaml │ │ ├── cainjection_in_ibporderers.yaml │ │ ├── cainjection_in_ibppeers.yaml │ │ ├── webhook_in_ibpcas.yaml │ │ ├── webhook_in_ibpconsoles.yaml │ │ ├── webhook_in_ibporderers.yaml │ │ └── webhook_in_ibppeers.yaml ├── default │ ├── kustomization.yaml │ ├── manager_auth_proxy_patch.yaml │ ├── manager_webhook_patch.yaml │ └── webhookcainjection_patch.yaml ├── ingress │ ├── k3s │ │ ├── ingress-nginx-controller.yaml │ │ └── kustomization.yaml │ ├── kind │ │ ├── ingress-nginx-controller.yaml │ │ └── kustomization.yaml │ └── kustomization.yaml ├── manager │ ├── kustomization.yaml │ └── manager.yaml ├── manifests │ ├── bases │ │ └── fabric-opensource-operator.clusterserviceversion.yaml │ └── kustomization.yaml ├── prometheus │ ├── kustomization.yaml │ └── monitor.yaml ├── rbac │ ├── auth_proxy_client_clusterrole.yaml │ ├── auth_proxy_role.yaml │ ├── auth_proxy_role_binding.yaml │ ├── auth_proxy_service.yaml │ ├── ibpca_editor_role.yaml │ ├── ibpca_viewer_role.yaml │ ├── ibpconsole_editor_role.yaml │ ├── ibpconsole_viewer_role.yaml │ ├── ibporderer_editor_role.yaml │ ├── ibporderer_viewer_role.yaml │ ├── ibppeer_editor_role.yaml │ ├── ibppeer_viewer_role.yaml │ ├── kustomization.yaml │ ├── leader_election_role.yaml │ ├── leader_election_role_binding.yaml │ ├── role.yaml │ ├── role_binding.yaml │ └── service_account.yaml ├── samples │ ├── ibp.com_v1beta1_ibpca.yaml │ ├── ibp.com_v1beta1_ibpconsole.yaml │ ├── ibp.com_v1beta1_ibporderer.yaml │ ├── ibp.com_v1beta1_ibppeer.yaml │ └── kustomization.yaml ├── scorecard │ ├── .osdk-scorecard.yaml │ └── kustomization.yaml └── webhook │ ├── kustomization.yaml │ ├── kustomizeconfig.yaml │ └── service.yaml ├── controllers ├── add_ibpca.go ├── add_ibpconsole.go ├── add_ibporderer.go ├── add_ibppeer.go ├── common │ └── common.go ├── controller.go ├── ibpca │ ├── ibpca_controller.go │ ├── ibpca_controller_test.go │ ├── ibpca_suite_test.go │ ├── mocks │ │ └── careconcile.go │ ├── predicate.go │ └── predicate_test.go ├── ibpconsole │ ├── ibpconsole_controller.go │ ├── ibpconsole_controller_test.go │ ├── ibpconsole_suite_test.go │ └── mocks │ │ └── consolereconcile.go ├── ibporderer │ ├── ibporderer_controller.go │ ├── ibporderer_controller_test.go │ ├── ibporderer_suite_test.go │ ├── mocks │ │ └── ordererreconcile.go │ ├── predicate.go │ └── predicate_test.go ├── ibppeer │ ├── ibppeer_controller.go │ ├── ibppeer_controller_test.go │ ├── ibppeer_suite_test.go │ ├── mocks │ │ └── peerreconcile.go │ └── predicate.go ├── mocks │ └── client.go └── suite_test.go ├── defaultconfig ├── ca │ ├── ca.yaml │ └── tlsca.yaml ├── console │ └── console.go ├── orderer │ ├── configtx.yaml │ ├── orderer.yaml │ ├── ouconfig-inter.yaml │ ├── ouconfig.yaml │ ├── v2 │ │ └── orderer.yaml │ ├── v24 │ │ └── orderer.yaml │ └── v25 │ │ └── orderer.yaml └── peer │ ├── core.yaml │ ├── ouconfig-inter.yaml │ ├── ouconfig.yaml │ ├── v2 │ └── core.yaml │ └── v25 │ └── core.yaml ├── definitions ├── ca │ ├── deployment.yaml │ ├── ingress.yaml │ ├── ingressv1beta1.yaml │ ├── pvc.yaml │ ├── role.yaml │ ├── rolebinding.yaml │ ├── route.yaml │ ├── service.yaml │ └── serviceaccount.yaml ├── console │ ├── configmap.yaml │ ├── console-configmap.yaml │ ├── deployer-configmap.yaml │ ├── deployer-service.yaml │ ├── deployment.yaml │ ├── ingress.yaml │ ├── ingressv1beta1.yaml │ ├── networkpolicy-denyall.yaml │ ├── networkpolicy-ingress.yaml │ ├── pvc.yaml │ ├── role.yaml │ ├── rolebinding.yaml │ ├── route.yaml │ ├── service.yaml │ └── serviceaccount.yaml ├── orderer │ ├── configmap.yaml │ ├── deployment.yaml │ ├── ingress.yaml │ ├── ingressv1beta1.yaml │ ├── orderernode.yaml │ ├── pvc.yaml │ ├── role.yaml │ ├── rolebinding.yaml │ ├── route.yaml │ ├── saas-ingress-community.yaml │ ├── saas-ingress.yaml │ ├── saas-ingressv1beta1-community.yaml │ ├── saas-ingressv1beta1.yaml │ ├── service.yaml │ └── serviceaccount.yaml └── peer │ ├── chaincode-launcher.yaml │ ├── couchdb-init.yaml │ ├── couchdb-pvc.yaml │ ├── couchdb.yaml │ ├── deployment.yaml │ ├── ingress.yaml │ ├── ingressv1beta1.yaml │ ├── pvc.yaml │ ├── role.yaml │ ├── rolebinding.yaml │ ├── route.yaml │ ├── saas-ingress-community.yaml │ ├── saas-ingress.yaml │ ├── saas-ingressv1beta1-community.yaml │ ├── saas-ingressv1beta1.yaml │ ├── service.yaml │ └── serviceaccount.yaml ├── docker-entrypoint.sh ├── docs ├── CONTRIBUTING.md ├── DEVELOPING.md ├── images │ ├── fabric-operator-components.png │ ├── fabric-operator-sample-network.png │ └── prometheus.png └── prometheus.md ├── go.mod ├── go.sum ├── integration ├── actions │ ├── ca │ │ ├── ca_suite_test.go │ │ └── ca_test.go │ ├── orderer │ │ ├── orderer_suite_test.go │ │ └── orderer_test.go │ └── peer │ │ ├── peer_suite_test.go │ │ ├── peer_test.go │ │ └── reenroll_test.go ├── autorenew │ ├── autorenew_suite_test.go │ └── autorenew_test.go ├── ca │ ├── ca_suite_test.go │ └── ca_test.go ├── cclauncher │ ├── cclauncher_suite_test.go │ └── cclauncher_test.go ├── console │ ├── console_suite_test.go │ └── console_test.go ├── e2ev2 │ ├── .gitignore │ ├── ca_test.go │ ├── config.yaml │ ├── console_test.go │ ├── e2ev2_suite_test.go │ ├── e2ev2_test.go │ ├── orderer_test.go │ └── peer_test.go ├── helper │ ├── ca.go │ ├── crspecs.go │ ├── job.go │ ├── orderer.go │ ├── peer.go │ └── session.go ├── images.go ├── init │ ├── init_suite_test.go │ ├── init_test.go │ ├── orderer_test.go │ └── peer_test.go ├── integration.go ├── kind-config.yaml ├── migration │ ├── fabric │ │ ├── fabric_suite_test.go │ │ ├── orderer_test.go │ │ └── peer_test.go │ ├── migration_suite_test.go │ └── migration_test.go ├── nativeresourcepoller.go ├── nginx-deployment.yaml ├── operator.go ├── operatorrestart │ ├── operatorrestart_suite_test.go │ └── operatorrestart_test.go ├── orderer │ ├── orderer_suite_test.go │ └── orderer_test.go ├── peer │ ├── peer_suite_test.go │ └── peer_test.go └── restartmgr │ ├── restartmgr_suite_test.go │ └── restartmgr_test.go ├── main.go ├── operatorconfig ├── config.go ├── operator.go └── versions.go ├── pkg ├── action │ ├── action.go │ ├── action_suite_test.go │ ├── action_test.go │ ├── enroll.go │ ├── enroll_test.go │ ├── mocks │ │ ├── deploymentreset.go │ │ ├── enrollinstance.go │ │ ├── reenroller.go │ │ ├── reenrollinstance.go │ │ └── upgradeinstance.go │ ├── upgradedbs.go │ └── upgradedbs_test.go ├── apis │ ├── ca │ │ └── v1 │ │ │ ├── ca.go │ │ │ └── functions.go │ ├── common │ │ └── common.go │ ├── console │ │ └── v1 │ │ │ ├── console.go │ │ │ └── zz_generated.deepcopy.go │ ├── deployer │ │ └── deployer.go │ ├── orderer │ │ ├── v1 │ │ │ └── orderer.go │ │ ├── v2 │ │ │ └── orderer.go │ │ ├── v24 │ │ │ └── orderer.go │ │ └── v25 │ │ │ └── orderer.go │ └── peer │ │ ├── v1 │ │ └── peer.go │ │ ├── v2 │ │ └── peer.go │ │ └── v25 │ │ └── peer.go ├── certificate │ ├── certificate.go │ ├── certificate_suite_test.go │ ├── certificate_test.go │ ├── mocks │ │ └── reenroller.go │ └── reenroller │ │ ├── client.go │ │ ├── client_pkcs11.go │ │ ├── hsmdaemonreenroller.go │ │ ├── hsmreenroller.go │ │ ├── mocks │ │ └── identity.go │ │ ├── reenroller.go │ │ ├── reenroller_suite_test.go │ │ └── reenroller_test.go ├── client │ ├── client.go │ ├── client_suite_test.go │ └── client_test.go ├── command │ ├── command_suite_test.go │ ├── crdinstall.go │ ├── mocks │ │ └── reader.go │ ├── operator.go │ └── operator_test.go ├── controller │ └── mocks │ │ └── client.go ├── crd │ ├── crd_suite_test.go │ ├── manager.go │ ├── manager_test.go │ └── mocks │ │ └── client.go ├── global │ ├── config.go │ ├── config_test.go │ └── global_suite_test.go ├── initializer │ ├── ca │ │ ├── bccsp │ │ │ ├── config.go │ │ │ └── configpkcs11.go │ │ ├── ca.go │ │ ├── ca_suite_test.go │ │ ├── ca_test.go │ │ ├── config │ │ │ ├── ca.go │ │ │ ├── ca_test.go │ │ │ ├── config.go │ │ │ ├── config_suite_test.go │ │ │ ├── config_test.go │ │ │ ├── db.go │ │ │ ├── db_test.go │ │ │ ├── intermediate.go │ │ │ ├── intermediate_test.go │ │ │ ├── operations.go │ │ │ ├── operations_test.go │ │ │ ├── tls.go │ │ │ └── tls_test.go │ │ ├── hsm.go │ │ ├── hsm_test.go │ │ ├── hsmdaemon.go │ │ ├── initializer.go │ │ ├── initializer_test.go │ │ ├── mocks │ │ │ ├── client.go │ │ │ ├── config.go │ │ │ └── ibpca.go │ │ ├── sw.go │ │ └── tls │ │ │ ├── tls.go │ │ │ ├── tls_suite_test.go │ │ │ └── tls_test.go │ ├── common │ │ ├── common.go │ │ ├── common_suite_test.go │ │ ├── common_test.go │ │ ├── config │ │ │ ├── config_suite_test.go │ │ │ ├── config_test.go │ │ │ ├── crypto.go │ │ │ ├── hsmconfig.go │ │ │ ├── hsmconfig_test.go │ │ │ ├── hsmdaemon.go │ │ │ ├── mocks │ │ │ │ └── crypto.go │ │ │ └── nodeou.go │ │ ├── enroller │ │ │ ├── client.go │ │ │ ├── client_pkcs11.go │ │ │ ├── enroller.go │ │ │ ├── enroller_suite_test.go │ │ │ ├── enroller_test.go │ │ │ ├── fabcaclient.go │ │ │ ├── fabcaclient_test.go │ │ │ ├── factory.go │ │ │ ├── factory_test.go │ │ │ ├── hsmdaemonenroller.go │ │ │ ├── hsmdaemonenroller_test.go │ │ │ ├── hsmenroller.go │ │ │ ├── hsmenroller_test.go │ │ │ ├── hsmproxyenroller.go │ │ │ ├── mocks │ │ │ │ ├── caclient.go │ │ │ │ ├── client.go │ │ │ │ ├── cryptoenroller.go │ │ │ │ ├── cryptoinstance.go │ │ │ │ ├── hsmcaclient.go │ │ │ │ └── instance.go │ │ │ ├── swenroller.go │ │ │ └── swenroller_test.go │ │ ├── mocks │ │ │ └── cryptovalidator.go │ │ ├── mspparser │ │ │ ├── mspparser.go │ │ │ ├── mspparser_suite_test.go │ │ │ └── mspparser_test.go │ │ └── secretmanager │ │ │ ├── secretmanager.go │ │ │ ├── secretmanager_suite_test.go │ │ │ └── secretmanager_test.go │ ├── cryptogen │ │ ├── bccsp.go │ │ └── mocks │ │ │ ├── config.go │ │ │ └── instance.go │ ├── orderer │ │ ├── config │ │ │ ├── v1 │ │ │ │ ├── config_suite_test.go │ │ │ │ ├── config_test.go │ │ │ │ ├── io.go │ │ │ │ └── orderer.go │ │ │ ├── v2 │ │ │ │ ├── config_suite_test.go │ │ │ │ ├── config_test.go │ │ │ │ ├── io.go │ │ │ │ └── orderer.go │ │ │ ├── v24 │ │ │ │ ├── config_suite_test.go │ │ │ │ ├── config_test.go │ │ │ │ ├── io.go │ │ │ │ └── orderer.go │ │ │ └── v25 │ │ │ │ ├── config_suite_test.go │ │ │ │ ├── config_test.go │ │ │ │ ├── io.go │ │ │ │ └── orderer.go │ │ ├── configtx │ │ │ ├── config.go │ │ │ ├── configtx.go │ │ │ ├── configtx_suite_test.go │ │ │ ├── configtx_test.go │ │ │ ├── encoder.go │ │ │ ├── profile.go │ │ │ └── profile_test.go │ │ ├── initializer.go │ │ ├── initializer_test.go │ │ ├── mocks │ │ │ └── ibporderer.go │ │ ├── orderer.go │ │ └── orderer_suite_test.go │ ├── peer │ │ ├── config │ │ │ ├── commoncore │ │ │ │ ├── commoncore_suite_test.go │ │ │ │ ├── commoncore_test.go │ │ │ │ ├── core.go │ │ │ │ └── testdata │ │ │ │ │ ├── test_core.yaml │ │ │ │ │ ├── test_core_no_change.yaml │ │ │ │ │ └── test_core_no_peer.yaml │ │ │ ├── v1 │ │ │ │ ├── config.go │ │ │ │ ├── config_suite_test.go │ │ │ │ ├── config_test.go │ │ │ │ ├── deliveryclient.go │ │ │ │ └── io.go │ │ │ ├── v2 │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ └── v2_suite_test.go │ │ │ └── v25 │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ └── v2_suite_test.go │ │ ├── coreconfigmap.go │ │ ├── coreconfigmap_test.go │ │ ├── initializer.go │ │ ├── initializer_test.go │ │ ├── mocks │ │ │ ├── client.go │ │ │ └── ibppeer.go │ │ ├── peer.go │ │ ├── peer_suite_test.go │ │ └── peer_test.go │ └── validator │ │ ├── validator.go │ │ ├── validator_suite_test.go │ │ └── validator_test.go ├── k8s │ ├── clientset │ │ └── client.go │ └── controllerclient │ │ ├── client.go │ │ └── client_structs.go ├── manager │ └── resources │ │ ├── configmap │ │ ├── configmap_suite_test.go │ │ ├── manager.go │ │ └── manager_test.go │ │ ├── container │ │ ├── container.go │ │ ├── container_suite_test.go │ │ └── container_test.go │ │ ├── deployment │ │ ├── deployment.go │ │ ├── deployment_suite_test.go │ │ ├── manager.go │ │ └── manager_test.go │ │ ├── ingress │ │ ├── ingress_suite_test.go │ │ ├── manager.go │ │ └── manager_test.go │ │ ├── ingressv1beta1 │ │ ├── ingress_suite_test.go │ │ ├── manager.go │ │ └── manager_test.go │ │ ├── job │ │ ├── job.go │ │ ├── job_suite_test.go │ │ ├── job_test.go │ │ └── mocks │ │ │ └── client.go │ │ ├── manager │ │ └── manager.go │ │ ├── mocks │ │ └── resource_manager.go │ │ ├── orderernode │ │ ├── manager.go │ │ ├── manager_test.go │ │ └── orderernode_suite_test.go │ │ ├── pv │ │ ├── manager.go │ │ ├── manager_test.go │ │ └── pvc_suite_test.go │ │ ├── pvc │ │ ├── manager.go │ │ ├── manager_test.go │ │ └── pvc_suite_test.go │ │ ├── resources.go │ │ ├── role │ │ ├── manager.go │ │ ├── manager_test.go │ │ └── role_suite_test.go │ │ ├── rolebinding │ │ ├── manager.go │ │ ├── manager_test.go │ │ └── rolebinding_suite_test.go │ │ ├── route │ │ ├── manager.go │ │ ├── manager_test.go │ │ └── route_suite_test.go │ │ ├── service │ │ ├── manager.go │ │ ├── manager_test.go │ │ └── service_suite_test.go │ │ └── serviceaccount │ │ ├── manager.go │ │ ├── manager_test.go │ │ └── serviceaccount_suite_test.go ├── migrator │ ├── initsecret │ │ └── migrator.go │ ├── migrator.go │ └── peer │ │ ├── fabric │ │ ├── fabric_suite_test.go │ │ ├── migrator.go │ │ ├── migrator_test.go │ │ ├── mocks │ │ │ └── migrator.go │ │ ├── v2 │ │ │ ├── mocks │ │ │ │ ├── configmapmanager.go │ │ │ │ └── deploymentmanager.go │ │ │ ├── peer.go │ │ │ ├── peer_test.go │ │ │ └── v2_suite_test.go │ │ └── v25 │ │ │ ├── mocks │ │ │ ├── configmapmanager.go │ │ │ └── deploymentmanager.go │ │ │ ├── peer.go │ │ │ ├── peer_test.go │ │ │ └── v25_suite_test.go │ │ └── peer_suite_test.go ├── offering │ ├── base │ │ ├── ca │ │ │ ├── ca.go │ │ │ ├── ca_suite_test.go │ │ │ ├── ca_test.go │ │ │ ├── initialize.go │ │ │ ├── initialize_test.go │ │ │ ├── mocks │ │ │ │ ├── certificate_manager.go │ │ │ │ ├── initialize.go │ │ │ │ ├── initializer.go │ │ │ │ ├── restart_manager.go │ │ │ │ └── update.go │ │ │ └── override │ │ │ │ ├── deployment.go │ │ │ │ ├── deployment_test.go │ │ │ │ ├── override.go │ │ │ │ ├── override_suite_test.go │ │ │ │ ├── override_test.go │ │ │ │ ├── overridecm.go │ │ │ │ ├── pvc.go │ │ │ │ ├── pvc_test.go │ │ │ │ ├── role.go │ │ │ │ ├── rolebinding.go │ │ │ │ ├── service.go │ │ │ │ ├── service_test.go │ │ │ │ ├── serviceaccount.go │ │ │ │ └── serviceaccount_test.go │ │ ├── console │ │ │ ├── console.go │ │ │ ├── console_suite_test.go │ │ │ ├── console_test.go │ │ │ ├── mocks │ │ │ │ ├── restart_manager.go │ │ │ │ └── update.go │ │ │ └── override │ │ │ │ ├── consolecm.go │ │ │ │ ├── consolecm_test.go │ │ │ │ ├── deployercm.go │ │ │ │ ├── deployercm_test.go │ │ │ │ ├── deployerservice.go │ │ │ │ ├── deployerservice_test.go │ │ │ │ ├── deployment.go │ │ │ │ ├── deployment_test.go │ │ │ │ ├── envcm.go │ │ │ │ ├── envcm_test.go │ │ │ │ ├── override.go │ │ │ │ ├── override_suite_test.go │ │ │ │ ├── pvc.go │ │ │ │ ├── pvc_test.go │ │ │ │ ├── service.go │ │ │ │ ├── service_test.go │ │ │ │ ├── serviceaccount.go │ │ │ │ └── serviceaccount_test.go │ │ ├── orderer │ │ │ ├── mocks │ │ │ │ ├── certificate_manager.go │ │ │ │ ├── deployment_manager.go │ │ │ │ ├── initializeibporderer.go │ │ │ │ ├── node_manager.go │ │ │ │ ├── restart_manager.go │ │ │ │ └── update.go │ │ │ ├── node.go │ │ │ ├── node_test.go │ │ │ ├── orderer.go │ │ │ ├── orderer_suite_test.go │ │ │ ├── orderer_test.go │ │ │ └── override │ │ │ │ ├── deployment.go │ │ │ │ ├── deployment_test.go │ │ │ │ ├── envcm.go │ │ │ │ ├── orderernode.go │ │ │ │ ├── override.go │ │ │ │ ├── override_suite_test.go │ │ │ │ ├── override_test.go │ │ │ │ ├── pvc.go │ │ │ │ ├── pvc_test.go │ │ │ │ ├── service.go │ │ │ │ ├── service_test.go │ │ │ │ ├── serviceaccount.go │ │ │ │ └── serviceaccount_test.go │ │ └── peer │ │ │ ├── mocks │ │ │ ├── certificate_manager.go │ │ │ ├── deployment_manager.go │ │ │ ├── initializer.go │ │ │ ├── restart_manager.go │ │ │ └── update.go │ │ │ ├── override │ │ │ ├── deployment.go │ │ │ ├── deployment_test.go │ │ │ ├── override.go │ │ │ ├── override_suite_test.go │ │ │ ├── override_test.go │ │ │ ├── pvc.go │ │ │ ├── pvc_test.go │ │ │ ├── service.go │ │ │ ├── service_test.go │ │ │ ├── serviceaccount.go │ │ │ ├── serviceaccount_test.go │ │ │ └── statedbpvc.go │ │ │ ├── peer.go │ │ │ ├── peer_suite_test.go │ │ │ └── peer_test.go │ ├── common │ │ ├── backupcrypto.go │ │ ├── common_suite_test.go │ │ ├── common_test.go │ │ ├── override.go │ │ ├── reconcilechecks │ │ │ ├── fabricversion.go │ │ │ ├── fabricversion_test.go │ │ │ ├── images │ │ │ │ ├── fabricversion.go │ │ │ │ ├── fabricversion_test.go │ │ │ │ ├── images.go │ │ │ │ ├── images_suite_test.go │ │ │ │ ├── images_test.go │ │ │ │ └── mocks │ │ │ │ │ ├── fabricversion.go │ │ │ │ │ ├── instance.go │ │ │ │ │ └── update.go │ │ │ ├── mocks │ │ │ │ ├── image.go │ │ │ │ ├── instance.go │ │ │ │ ├── update.go │ │ │ │ └── version.go │ │ │ └── reconcilechecks_suite_test.go │ │ ├── result.go │ │ └── secret.go │ ├── k8s │ │ ├── ca │ │ │ ├── ca.go │ │ │ ├── ca_suite_test.go │ │ │ ├── ca_test.go │ │ │ └── override │ │ │ │ ├── ingress.go │ │ │ │ ├── ingress_test.go │ │ │ │ ├── ingressv1beta1.go │ │ │ │ ├── ingressv1beta1_test.go │ │ │ │ ├── override.go │ │ │ │ ├── override_suite_test.go │ │ │ │ └── override_test.go │ │ ├── console │ │ │ ├── console.go │ │ │ ├── console_suite_test.go │ │ │ ├── console_test.go │ │ │ └── override │ │ │ │ ├── consolecm.go │ │ │ │ ├── consolecm_test.go │ │ │ │ ├── deployercm.go │ │ │ │ ├── deployercm_test.go │ │ │ │ ├── envcm.go │ │ │ │ ├── envcm_test.go │ │ │ │ ├── ingress.go │ │ │ │ ├── ingress_test.go │ │ │ │ ├── ingressv1beta1.go │ │ │ │ ├── ingressv1beta1_test.go │ │ │ │ ├── override.go │ │ │ │ ├── override_suite_test.go │ │ │ │ └── override_test.go │ │ ├── orderer │ │ │ ├── node.go │ │ │ ├── orderer.go │ │ │ ├── orderer_suite_test.go │ │ │ ├── orderer_test.go │ │ │ └── override │ │ │ │ ├── ingress.go │ │ │ │ ├── ingress_test.go │ │ │ │ ├── ingressv1beta1.go │ │ │ │ ├── ingressv1beta1_test.go │ │ │ │ ├── override.go │ │ │ │ ├── override_suite_test.go │ │ │ │ └── override_test.go │ │ └── peer │ │ │ ├── override │ │ │ ├── ingress.go │ │ │ ├── ingress_test.go │ │ │ ├── ingressv1beta1.go │ │ │ ├── ingressv1beta1_test.go │ │ │ ├── override.go │ │ │ └── override_suite_test.go │ │ │ ├── peer.go │ │ │ ├── peer_suite_test.go │ │ │ └── peer_test.go │ ├── offering.go │ ├── offering_suite_test.go │ ├── offering_test.go │ └── openshift │ │ ├── ca │ │ ├── ca.go │ │ ├── ca_suite_test.go │ │ ├── ca_test.go │ │ └── override │ │ │ ├── caroute.go │ │ │ ├── operationroute.go │ │ │ ├── override.go │ │ │ ├── override_suite_test.go │ │ │ └── override_test.go │ │ ├── console │ │ ├── console.go │ │ ├── console_suite_test.go │ │ ├── console_test.go │ │ └── override │ │ │ ├── consolecm.go │ │ │ ├── consolecm_test.go │ │ │ ├── consoleroute.go │ │ │ ├── consoleroute_test.go │ │ │ ├── deployercm.go │ │ │ ├── deployercm_test.go │ │ │ ├── envcm.go │ │ │ ├── envcm_test.go │ │ │ ├── override.go │ │ │ ├── override_suite_test.go │ │ │ ├── proxyroute.go │ │ │ └── proxyroute_test.go │ │ ├── orderer │ │ ├── node.go │ │ ├── orderer.go │ │ ├── orderer_suite_test.go │ │ ├── orderer_test.go │ │ └── override │ │ │ ├── adminroute.go │ │ │ ├── grpcroute.go │ │ │ ├── operationroute.go │ │ │ ├── ordererroute.go │ │ │ ├── override.go │ │ │ ├── override_suite_test.go │ │ │ └── override_test.go │ │ └── peer │ │ ├── override │ │ ├── grpcroute.go │ │ ├── operationroute.go │ │ ├── override.go │ │ ├── override_suite_test.go │ │ ├── override_test.go │ │ └── peerroute.go │ │ ├── peer.go │ │ ├── peer_suite_test.go │ │ └── peer_test.go ├── operatorerrors │ ├── errors.go │ ├── errors_test.go │ └── operatorerrors_suite_test.go ├── restart │ ├── configmap │ │ ├── configmap_suite_test.go │ │ ├── configmap_test.go │ │ └── manager.go │ ├── restart.go │ ├── restart_structs.go │ ├── restart_suite_test.go │ ├── restart_test.go │ └── staggerrestarts │ │ ├── staggerrestarts.go │ │ ├── staggerrestarts_structs.go │ │ ├── staggerrestarts_suite_test.go │ │ └── staggerrestarts_test.go └── util │ ├── image │ └── image.go │ ├── merge │ ├── merge.go │ ├── merge_suite_test.go │ └── merge_test.go │ ├── pointer │ └── pointer.go │ ├── testdata │ └── invalid_kind.yaml │ ├── util.go │ ├── util_suite_test.go │ └── util_test.go ├── release_notes ├── v1.0.0.md ├── v1.0.4-2.md └── v1.0.4.md ├── sample-network-multi-org ├── LICENSE ├── README.md ├── channel-config │ ├── .gitignore │ ├── README.md │ ├── config │ │ ├── configtx.yaml │ │ └── core.yaml │ └── create_genesis_block.sh ├── cloud-config.yaml ├── config │ ├── configtx.yaml │ ├── core.yaml │ └── orderer.yaml ├── justfile ├── kind │ ├── cert-manager │ │ ├── .gitignore │ │ ├── ca-issuer-secret.yaml │ │ ├── ca-issuer.yaml │ │ ├── kustomization.yaml │ │ └── root-tls-issuer.yaml │ ├── nginx │ │ ├── ingress-nginx-controller.yaml │ │ └── kustomization.yaml │ └── operator │ │ ├── kustomization.yaml │ │ ├── operator-clusterrole.yaml │ │ ├── operator-clusterrolebinding.yaml │ │ ├── operator-manager.yaml │ │ ├── operator-psp.yaml │ │ └── operator-serviceaccount.yaml ├── organizations │ ├── .gitignore │ ├── org0 │ │ ├── enroll.sh │ │ ├── export_msp.sh │ │ ├── join_channel.sh │ │ ├── org0-ca.yaml │ │ ├── org0-orderer.yaml │ │ └── start.sh │ ├── org1 │ │ ├── enroll.sh │ │ ├── export_msp.sh │ │ ├── install_chaincode.sh │ │ ├── join_channel.sh │ │ ├── org1-ca.yaml │ │ ├── org1-peer-gateway.yaml │ │ ├── org1-peer1.yaml │ │ ├── org1-peer2.yaml │ │ └── start.sh │ └── org2 │ │ ├── enroll.sh │ │ ├── export_msp.sh │ │ ├── install_chaincode.sh │ │ ├── join_channel.sh │ │ ├── org2-ca.yaml │ │ ├── org2-peer-gateway.yaml │ │ ├── org2-peer1.yaml │ │ ├── org2-peer2.yaml │ │ └── start.sh └── scripts │ ├── check-kube.sh │ ├── check-network.sh │ ├── check.sh │ ├── kind_with_nginx.sh │ ├── start_operator.sh │ ├── test-e2e.sh │ └── utils.sh ├── sample-network ├── .gitignore ├── README.md ├── config │ ├── cas │ │ ├── kustomization.yaml │ │ ├── org0-ca.yaml │ │ ├── org1-ca.yaml │ │ └── org2-ca.yaml │ ├── configtx-template.yaml │ ├── console │ │ ├── hlf-operations-console.yaml │ │ └── kustomization.yaml │ ├── core.yaml │ ├── manager │ │ ├── hlf-operator-manager.yaml │ │ └── kustomization.yaml │ ├── orderers │ │ ├── kustomization.yaml │ │ └── org0-orderers.yaml │ ├── peers │ │ ├── kustomization.yaml │ │ ├── org1-peer1.yaml │ │ ├── org1-peer2.yaml │ │ ├── org2-peer1.yaml │ │ └── org2-peer2.yaml │ └── rbac │ │ ├── hlf-operator-clusterrole.yaml │ │ ├── hlf-operator-clusterrolebinding.yaml │ │ ├── hlf-operator-rolebinding.yaml │ │ ├── hlf-operator-serviceaccount.yaml │ │ └── kustomization.yaml ├── network └── scripts │ ├── chaincode.sh │ ├── channel.sh │ ├── cluster.sh │ ├── console.sh │ ├── kind.sh │ ├── prereqs.sh │ ├── run-e2e-test.sh │ ├── test_network.sh │ └── utils.sh ├── scripts ├── check-license.sh ├── checks.sh ├── download_binaries.sh ├── go-sec.sh ├── install-tools.sh └── run-unit-tests.sh ├── testdata ├── deploy │ ├── ca │ │ ├── adminsecret.yaml │ │ └── tlssecret.yaml │ ├── console │ │ ├── secret.yaml │ │ ├── tlssecret.yaml │ │ └── ui-password-secret.yaml │ ├── operator.yaml │ ├── operatorhsm.yaml │ ├── orderer │ │ └── secret.yaml │ ├── peer │ │ └── secret.yaml │ ├── role.yaml │ ├── role_binding.yaml │ ├── role_ocp.yaml │ └── service_account.yaml ├── deployercm │ └── deployer-configmap.yaml ├── init │ ├── ca │ │ ├── cert.pem │ │ ├── key.pem │ │ └── override.yaml │ ├── orderer │ │ ├── configtx.yaml │ │ ├── msp │ │ │ └── cacerts │ │ │ │ └── cert.pem │ │ └── orderer.yaml │ └── peer │ │ ├── core.yaml │ │ ├── core_bootstrap_test.yaml │ │ ├── core_invalid.yaml │ │ ├── tls-cert.pem │ │ └── tls-key.pem ├── migration │ └── secret.json ├── msp │ └── keystore │ │ └── key.pem ├── operatorconfig.yaml ├── secret.yaml └── tls │ ├── tls.crt │ └── tls.key ├── tools └── tools.go └── version ├── fabricversion.go ├── version.go ├── version_suite_test.go └── version_test.go /.github/workflows/image-build-pr.yaml: -------------------------------------------------------------------------------- 1 | name: Build Operator image 2 | 3 | on: 4 | pull_request: 5 | branches: [main] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | image: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | 14 | - name: Build 15 | run: | 16 | scripts/install-tools.sh 17 | make image 18 | -------------------------------------------------------------------------------- /.github/workflows/image-build.yaml: -------------------------------------------------------------------------------- 1 | name: Build and Push Operator image 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | image: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | 14 | - name: Build 15 | run: | 16 | scripts/install-tools.sh 17 | make image 18 | - name: Push 19 | run: | 20 | echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin 21 | make image-push image-push-latest 22 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | ## Maintainers 2 | 3 | ### Active Maintainers 4 | 5 | | Name | Github | Discord | 6 | |-------------------|-----------|----------------| 7 | | Dave Enyeart | [@denyeart](https://github.com/denyeart) | denyeart#0989 | 8 | | Ratnakar Asara | [@asararatnakar](https://github.com/asararatnakar) | ratnakar#3494 | 9 | | Shoaeb Jindani | [@shoaebjindani](https://github.com/shoaebjindani) | shoaebmjindani#9890 | 10 | -------------------------------------------------------------------------------- /PROJECT: -------------------------------------------------------------------------------- 1 | domain: ibp.com 2 | layout: go.kubebuilder.io/v3 3 | repo: github.com/IBM-Blockchain/fabric-operator 4 | projectName: fabric-opensource-operator 5 | resources: 6 | - controller: true 7 | domain: ibp.com 8 | group: ibp 9 | kind: IBPCA 10 | path: github.com/IBM-Blockchain/fabric-operator/api/v1beta1 11 | version: v1beta1 12 | - controller: true 13 | domain: ibp.com 14 | group: ibp 15 | kind: IBPPeer 16 | path: github.com/IBM-Blockchain/fabric-operator/api/v1beta1 17 | version: v1beta1 18 | - controller: true 19 | domain: ibp.com 20 | group: ibp 21 | kind: IBPOrderer 22 | path: github.com/IBM-Blockchain/fabric-operator/api/v1beta1 23 | version: v1beta1 24 | - controller: true 25 | domain: ibp.com 26 | group: ibp 27 | kind: IBPConsole 28 | path: github.com/IBM-Blockchain/fabric-operator/api/v1beta1 29 | version: v1beta1 30 | version: "3" 31 | plugins: 32 | manifests.sdk.operatorframework.io/v2: {} 33 | scorecard.sdk.operatorframework.io/v2: {} 34 | -------------------------------------------------------------------------------- /api/addtoscheme_ibp_v1beta1.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package apis 20 | 21 | import ( 22 | "github.com/IBM-Blockchain/fabric-operator/api/v1beta1" 23 | ) 24 | 25 | func init() { 26 | // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back 27 | AddToSchemes = append(AddToSchemes, v1beta1.SchemeBuilder.AddToScheme) 28 | } 29 | -------------------------------------------------------------------------------- /api/apis.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package apis 20 | 21 | import ( 22 | "k8s.io/apimachinery/pkg/runtime" 23 | ) 24 | 25 | // AddToSchemes may be used to add all resources defined in the project to a Scheme 26 | var AddToSchemes runtime.SchemeBuilder 27 | 28 | // AddToScheme adds all Resources to the Scheme 29 | func AddToScheme(s *runtime.Scheme) error { 30 | return AddToSchemes.AddToScheme(s) 31 | } 32 | -------------------------------------------------------------------------------- /boilerplate/boilerplate.go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | -------------------------------------------------------------------------------- /boilerplate/boilerplate.sh.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # -------------------------------------------------------------------------------- /build/entrypoint: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # 4 | # Copyright contributors to the Hyperledger Fabric Operator project 5 | # 6 | # SPDX-License-Identifier: Apache-2.0 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at: 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | # 20 | 21 | # This is documented here: 22 | # https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines 23 | 24 | # TODO 25 | if ! whoami &>/dev/null; then 26 | if [ -w /etc/passwd ]; then 27 | echo "${USER_NAME:-ibp-operator}:x:$(id -u):$(id -g):${USER_NAME:-ibp-operator} user:${HOME}:/sbin/nologin" >> /etc/passwd 28 | fi 29 | fi 30 | 31 | exec ${OPERATOR} $@ -------------------------------------------------------------------------------- /bundle.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | 3 | # Core bundle labels. 4 | LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 5 | LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ 6 | LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ 7 | LABEL operators.operatorframework.io.bundle.package.v1=fabric-opensource-operator 8 | LABEL operators.operatorframework.io.bundle.channels.v1=alpha 9 | LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.31.0 10 | LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 11 | LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 12 | 13 | # Copy files to locations specified by labels. 14 | COPY bundle/manifests /manifests/ 15 | COPY bundle/metadata /metadata/ 16 | -------------------------------------------------------------------------------- /bundle/manifests/operator-controller-manager-metrics-service_v1_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | control-plane: controller-manager 7 | name: operator-controller-manager-metrics-service 8 | spec: 9 | ports: 10 | - name: https 11 | port: 8443 12 | targetPort: https 13 | selector: 14 | control-plane: controller-manager 15 | status: 16 | loadBalancer: {} 17 | -------------------------------------------------------------------------------- /bundle/manifests/operator-ibm-hlfsupport_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | creationTimestamp: null 5 | name: operator 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: operator 10 | subjects: 11 | - kind: ServiceAccount 12 | name: operator 13 | namespace: placeholder 14 | -------------------------------------------------------------------------------- /bundle/manifests/operator-leader-election-role_rbac.authorization.k8s.io_v1_role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: Role 3 | metadata: 4 | creationTimestamp: null 5 | name: operator-leader-election-role 6 | rules: 7 | - apiGroups: 8 | - "" 9 | resources: 10 | - configmaps 11 | verbs: 12 | - get 13 | - list 14 | - watch 15 | - create 16 | - update 17 | - patch 18 | - delete 19 | - apiGroups: 20 | - "" 21 | resources: 22 | - configmaps/status 23 | verbs: 24 | - get 25 | - update 26 | - patch 27 | - apiGroups: 28 | - "" 29 | resources: 30 | - events 31 | verbs: 32 | - create 33 | - patch 34 | - apiGroups: 35 | - coordination.k8s.io 36 | resources: 37 | - leases 38 | verbs: 39 | - get 40 | -------------------------------------------------------------------------------- /bundle/manifests/operator-leader-election-rolebinding_rbac.authorization.k8s.io_v1_rolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | creationTimestamp: null 5 | name: operator-leader-election-rolebinding 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: Role 9 | name: operator-leader-election-role 10 | subjects: 11 | - kind: ServiceAccount 12 | name: controller-manager 13 | namespace: system 14 | -------------------------------------------------------------------------------- /bundle/manifests/operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | name: operator-metrics-reader 6 | rules: 7 | - nonResourceURLs: 8 | - /metrics 9 | verbs: 10 | - get 11 | -------------------------------------------------------------------------------- /bundle/manifests/operator-metrics-reader_rbac.authorization.k8s.io_v1beta1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | name: operator-metrics-reader 6 | rules: 7 | - nonResourceURLs: 8 | - /metrics 9 | verbs: 10 | - get 11 | -------------------------------------------------------------------------------- /bundle/manifests/operator-operator_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | creationTimestamp: null 5 | name: operator-operator 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: operator 10 | subjects: 11 | - kind: ServiceAccount 12 | name: operator 13 | namespace: placeholder 14 | -------------------------------------------------------------------------------- /bundle/manifests/operator-proxy-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | name: operator-proxy-role 6 | rules: 7 | - apiGroups: 8 | - authentication.k8s.io 9 | resources: 10 | - tokenreviews 11 | verbs: 12 | - create 13 | - apiGroups: 14 | - authorization.k8s.io 15 | resources: 16 | - subjectaccessreviews 17 | verbs: 18 | - create 19 | -------------------------------------------------------------------------------- /bundle/manifests/operator-proxy-rolebinding_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | creationTimestamp: null 5 | name: operator-proxy-rolebinding 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: operator-proxy-role 10 | subjects: 11 | - kind: ServiceAccount 12 | name: controller-manager 13 | namespace: system 14 | -------------------------------------------------------------------------------- /bundle/metadata/annotations.yaml: -------------------------------------------------------------------------------- 1 | annotations: 2 | # Core bundle annotations. 3 | operators.operatorframework.io.bundle.mediatype.v1: registry+v1 4 | operators.operatorframework.io.bundle.manifests.v1: manifests/ 5 | operators.operatorframework.io.bundle.metadata.v1: metadata/ 6 | operators.operatorframework.io.bundle.package.v1: fabric-opensource-operator 7 | operators.operatorframework.io.bundle.channels.v1: alpha 8 | operators.operatorframework.io.metrics.builder: operator-sdk-v1.31.0 9 | operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 10 | operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 11 | -------------------------------------------------------------------------------- /cmd/crd/main.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package main 20 | 21 | import ( 22 | "fmt" 23 | "os" 24 | "time" 25 | 26 | "github.com/IBM-Blockchain/fabric-operator/pkg/command" 27 | _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" 28 | ) 29 | 30 | func main() { 31 | crdsPath := "../../config/crd/bases" 32 | err := command.CRDInstall(crdsPath) 33 | if err != nil { 34 | fmt.Printf("failed to create crds: %s\n", err) 35 | time.Sleep(15 * time.Second) 36 | os.Exit(1) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /config/certmanager/certificate.yaml: -------------------------------------------------------------------------------- 1 | # The following manifests contain a self-signed issuer CR and a certificate CR. 2 | # More document can be found at https://docs.cert-manager.io 3 | # WARNING: Targets CertManager 0.11 check https://docs.cert-manager.io/en/latest/tasks/upgrading/index.html for 4 | # breaking changes 5 | apiVersion: cert-manager.io/v1alpha2 6 | kind: Issuer 7 | metadata: 8 | name: selfsigned-issuer 9 | namespace: system 10 | spec: 11 | selfSigned: {} 12 | --- 13 | apiVersion: cert-manager.io/v1alpha2 14 | kind: Certificate 15 | metadata: 16 | name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml 17 | namespace: system 18 | spec: 19 | # $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize 20 | dnsNames: 21 | - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc 22 | - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local 23 | issuerRef: 24 | kind: Issuer 25 | name: selfsigned-issuer 26 | secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize 27 | -------------------------------------------------------------------------------- /config/certmanager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - certificate.yaml 3 | 4 | configurations: 5 | - kustomizeconfig.yaml 6 | -------------------------------------------------------------------------------- /config/certmanager/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # This configuration is for teaching kustomize how to update name ref and var substitution 2 | nameReference: 3 | - kind: Issuer 4 | group: cert-manager.io 5 | fieldSpecs: 6 | - kind: Certificate 7 | group: cert-manager.io 8 | path: spec/issuerRef/name 9 | 10 | varReference: 11 | - kind: Certificate 12 | group: cert-manager.io 13 | path: spec/commonName 14 | - kind: Certificate 15 | group: cert-manager.io 16 | path: spec/dnsNames 17 | -------------------------------------------------------------------------------- /config/crd/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # This file is for teaching kustomize how to substitute name and namespace reference in CRD 2 | nameReference: 3 | - kind: Service 4 | version: v1 5 | fieldSpecs: 6 | - kind: CustomResourceDefinition 7 | group: apiextensions.k8s.io 8 | path: spec/conversion/webhookClientConfig/service/name 9 | 10 | namespace: 11 | - kind: CustomResourceDefinition 12 | group: apiextensions.k8s.io 13 | path: spec/conversion/webhookClientConfig/service/namespace 14 | create: false 15 | 16 | varReference: 17 | - path: metadata/annotations 18 | -------------------------------------------------------------------------------- /config/crd/patches/cainjection_in_ibpcas.yaml: -------------------------------------------------------------------------------- 1 | # The following patch adds a directive for certmanager to inject CA into the CRD 2 | # CRD conversion requires k8s 1.13 or later. 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | annotations: 7 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 8 | name: ibpcas.ibp.com 9 | -------------------------------------------------------------------------------- /config/crd/patches/cainjection_in_ibpconsoles.yaml: -------------------------------------------------------------------------------- 1 | # The following patch adds a directive for certmanager to inject CA into the CRD 2 | # CRD conversion requires k8s 1.13 or later. 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | annotations: 7 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 8 | name: ibpconsoles.ibp.com 9 | -------------------------------------------------------------------------------- /config/crd/patches/cainjection_in_ibporderers.yaml: -------------------------------------------------------------------------------- 1 | # The following patch adds a directive for certmanager to inject CA into the CRD 2 | # CRD conversion requires k8s 1.13 or later. 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | annotations: 7 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 8 | name: ibporderers.ibp.com 9 | -------------------------------------------------------------------------------- /config/crd/patches/cainjection_in_ibppeers.yaml: -------------------------------------------------------------------------------- 1 | # The following patch adds a directive for certmanager to inject CA into the CRD 2 | # CRD conversion requires k8s 1.13 or later. 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | annotations: 7 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 8 | name: ibppeers.ibp.com 9 | -------------------------------------------------------------------------------- /config/crd/patches/webhook_in_ibpcas.yaml: -------------------------------------------------------------------------------- 1 | # The following patch enables conversion webhook for CRD 2 | # CRD conversion requires k8s 1.13 or later. 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | name: ibpcas.ibp.com 7 | spec: 8 | conversion: 9 | strategy: Webhook 10 | webhookClientConfig: 11 | # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, 12 | # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) 13 | caBundle: Cg== 14 | service: 15 | namespace: system 16 | name: webhook-service 17 | path: /convert 18 | -------------------------------------------------------------------------------- /config/crd/patches/webhook_in_ibpconsoles.yaml: -------------------------------------------------------------------------------- 1 | # The following patch enables conversion webhook for CRD 2 | # CRD conversion requires k8s 1.13 or later. 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | name: ibpconsoles.ibp.com 7 | spec: 8 | conversion: 9 | strategy: Webhook 10 | webhookClientConfig: 11 | # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, 12 | # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) 13 | caBundle: Cg== 14 | service: 15 | namespace: system 16 | name: webhook-service 17 | path: /convert 18 | -------------------------------------------------------------------------------- /config/crd/patches/webhook_in_ibporderers.yaml: -------------------------------------------------------------------------------- 1 | # The following patch enables conversion webhook for CRD 2 | # CRD conversion requires k8s 1.13 or later. 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | name: ibporderers.ibp.com 7 | spec: 8 | conversion: 9 | strategy: Webhook 10 | webhookClientConfig: 11 | # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, 12 | # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) 13 | caBundle: Cg== 14 | service: 15 | namespace: system 16 | name: webhook-service 17 | path: /convert 18 | -------------------------------------------------------------------------------- /config/crd/patches/webhook_in_ibppeers.yaml: -------------------------------------------------------------------------------- 1 | # The following patch enables conversion webhook for CRD 2 | # CRD conversion requires k8s 1.13 or later. 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | name: ibppeers.ibp.com 7 | spec: 8 | conversion: 9 | strategy: Webhook 10 | webhookClientConfig: 11 | # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, 12 | # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) 13 | caBundle: Cg== 14 | service: 15 | namespace: system 16 | name: webhook-service 17 | path: /convert 18 | -------------------------------------------------------------------------------- /config/default/manager_auth_proxy_patch.yaml: -------------------------------------------------------------------------------- 1 | # This patch inject a sidecar container which is a HTTP proxy for the 2 | # controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. 3 | apiVersion: apps/v1 4 | kind: Deployment 5 | metadata: 6 | name: controller-manager 7 | namespace: system 8 | spec: 9 | template: 10 | spec: 11 | containers: 12 | - name: kube-rbac-proxy 13 | image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 14 | args: 15 | - "--secure-listen-address=0.0.0.0:8443" 16 | - "--upstream=http://127.0.0.1:8080/" 17 | - "--logtostderr=true" 18 | - "--v=10" 19 | ports: 20 | - containerPort: 8443 21 | name: https 22 | - name: manager 23 | args: 24 | - "--metrics-addr=127.0.0.1:8080" 25 | - "--enable-leader-election" 26 | -------------------------------------------------------------------------------- /config/default/manager_webhook_patch.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: controller-manager 5 | namespace: system 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: manager 11 | ports: 12 | - containerPort: 9443 13 | name: webhook-server 14 | protocol: TCP 15 | volumeMounts: 16 | - mountPath: /tmp/k8s-webhook-server/serving-certs 17 | name: cert 18 | readOnly: true 19 | volumes: 20 | - name: cert 21 | secret: 22 | defaultMode: 420 23 | secretName: webhook-server-cert 24 | -------------------------------------------------------------------------------- /config/default/webhookcainjection_patch.yaml: -------------------------------------------------------------------------------- 1 | # This patch add annotation to admission webhook config and 2 | # the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize. 3 | apiVersion: admissionregistration.k8s.io/v1beta1 4 | kind: MutatingWebhookConfiguration 5 | metadata: 6 | name: mutating-webhook-configuration 7 | annotations: 8 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 9 | --- 10 | apiVersion: admissionregistration.k8s.io/v1beta1 11 | kind: ValidatingWebhookConfiguration 12 | metadata: 13 | name: validating-webhook-configuration 14 | annotations: 15 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 16 | -------------------------------------------------------------------------------- /config/ingress/kind/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | apiVersion: kustomize.config.k8s.io/v1beta1 19 | kind: Kustomization 20 | 21 | resources: 22 | - https://github.com/kubernetes/ingress-nginx.git/deploy/static/provider/kind?ref=controller-v1.1.2 23 | 24 | patchesStrategicMerge: 25 | - ingress-nginx-controller.yaml 26 | -------------------------------------------------------------------------------- /config/ingress/kustomization.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-operator/f13d8042e17913f4028439cde8bd1e7d03ee60d4/config/ingress/kustomization.yaml -------------------------------------------------------------------------------- /config/manager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manager.yaml 3 | apiVersion: kustomize.config.k8s.io/v1beta1 4 | kind: Kustomization 5 | images: 6 | - name: controller 7 | newName: controller 8 | newTag: latest 9 | -------------------------------------------------------------------------------- /config/prometheus/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - monitor.yaml 3 | -------------------------------------------------------------------------------- /config/prometheus/monitor.yaml: -------------------------------------------------------------------------------- 1 | 2 | # Prometheus Monitor Service (Metrics) 3 | apiVersion: monitoring.coreos.com/v1 4 | kind: ServiceMonitor 5 | metadata: 6 | labels: 7 | control-plane: controller-manager 8 | name: controller-manager-metrics-monitor 9 | namespace: system 10 | spec: 11 | endpoints: 12 | - path: /metrics 13 | port: https 14 | scheme: https 15 | bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token 16 | tlsConfig: 17 | insecureSkipVerify: true 18 | selector: 19 | matchLabels: 20 | control-plane: controller-manager 21 | -------------------------------------------------------------------------------- /config/rbac/auth_proxy_client_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: metrics-reader 5 | rules: 6 | - nonResourceURLs: ["/metrics"] 7 | verbs: ["get"] 8 | -------------------------------------------------------------------------------- /config/rbac/auth_proxy_role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: proxy-role 5 | rules: 6 | - apiGroups: ["authentication.k8s.io"] 7 | resources: 8 | - tokenreviews 9 | verbs: ["create"] 10 | - apiGroups: ["authorization.k8s.io"] 11 | resources: 12 | - subjectaccessreviews 13 | verbs: ["create"] 14 | -------------------------------------------------------------------------------- /config/rbac/auth_proxy_role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | name: proxy-rolebinding 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: ClusterRole 8 | name: proxy-role 9 | subjects: 10 | - kind: ServiceAccount 11 | name: controller-manager 12 | namespace: system 13 | -------------------------------------------------------------------------------- /config/rbac/auth_proxy_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | control-plane: controller-manager 6 | name: controller-manager-metrics-service 7 | namespace: system 8 | spec: 9 | ports: 10 | - name: https 11 | port: 8443 12 | targetPort: https 13 | selector: 14 | control-plane: controller-manager 15 | -------------------------------------------------------------------------------- /config/rbac/ibpca_editor_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to edit ibpcas. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: ibpca-editor-role 6 | rules: 7 | - apiGroups: 8 | - ibp.com 9 | resources: 10 | - ibpcas 11 | verbs: 12 | - create 13 | - delete 14 | - get 15 | - list 16 | - patch 17 | - update 18 | - watch 19 | - apiGroups: 20 | - ibp.com 21 | resources: 22 | - ibpcas/status 23 | verbs: 24 | - get 25 | -------------------------------------------------------------------------------- /config/rbac/ibpca_viewer_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to view ibpcas. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: ibpca-viewer-role 6 | rules: 7 | - apiGroups: 8 | - ibp.com 9 | resources: 10 | - ibpcas 11 | verbs: 12 | - get 13 | - list 14 | - watch 15 | - apiGroups: 16 | - ibp.com 17 | resources: 18 | - ibpcas/status 19 | verbs: 20 | - get 21 | -------------------------------------------------------------------------------- /config/rbac/ibpconsole_editor_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to edit ibpconsoles. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: ibpconsole-editor-role 6 | rules: 7 | - apiGroups: 8 | - ibp.com 9 | resources: 10 | - ibpconsoles 11 | verbs: 12 | - create 13 | - delete 14 | - get 15 | - list 16 | - patch 17 | - update 18 | - watch 19 | - apiGroups: 20 | - ibp.com 21 | resources: 22 | - ibpconsoles/status 23 | verbs: 24 | - get 25 | -------------------------------------------------------------------------------- /config/rbac/ibpconsole_viewer_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to view ibpconsoles. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: ibpconsole-viewer-role 6 | rules: 7 | - apiGroups: 8 | - ibp.com 9 | resources: 10 | - ibpconsoles 11 | verbs: 12 | - get 13 | - list 14 | - watch 15 | - apiGroups: 16 | - ibp.com 17 | resources: 18 | - ibpconsoles/status 19 | verbs: 20 | - get 21 | -------------------------------------------------------------------------------- /config/rbac/ibporderer_editor_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to edit ibporderers. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: ibporderer-editor-role 6 | rules: 7 | - apiGroups: 8 | - ibp.com 9 | resources: 10 | - ibporderers 11 | verbs: 12 | - create 13 | - delete 14 | - get 15 | - list 16 | - patch 17 | - update 18 | - watch 19 | - apiGroups: 20 | - ibp.com 21 | resources: 22 | - ibporderers/status 23 | verbs: 24 | - get 25 | -------------------------------------------------------------------------------- /config/rbac/ibporderer_viewer_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to view ibporderers. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: ibporderer-viewer-role 6 | rules: 7 | - apiGroups: 8 | - ibp.com 9 | resources: 10 | - ibporderers 11 | verbs: 12 | - get 13 | - list 14 | - watch 15 | - apiGroups: 16 | - ibp.com 17 | resources: 18 | - ibporderers/status 19 | verbs: 20 | - get 21 | -------------------------------------------------------------------------------- /config/rbac/ibppeer_editor_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to edit ibppeers. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: ibppeer-editor-role 6 | rules: 7 | - apiGroups: 8 | - ibp.com 9 | resources: 10 | - ibppeers 11 | verbs: 12 | - create 13 | - delete 14 | - get 15 | - list 16 | - patch 17 | - update 18 | - watch 19 | - apiGroups: 20 | - ibp.com 21 | resources: 22 | - ibppeers/status 23 | verbs: 24 | - get 25 | -------------------------------------------------------------------------------- /config/rbac/ibppeer_viewer_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to view ibppeers. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: ibppeer-viewer-role 6 | rules: 7 | - apiGroups: 8 | - ibp.com 9 | resources: 10 | - ibppeers 11 | verbs: 12 | - get 13 | - list 14 | - watch 15 | - apiGroups: 16 | - ibp.com 17 | resources: 18 | - ibppeers/status 19 | verbs: 20 | - get 21 | -------------------------------------------------------------------------------- /config/rbac/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - role.yaml 3 | - role_binding.yaml 4 | - leader_election_role.yaml 5 | - leader_election_role_binding.yaml 6 | # Comment the following 4 lines if you want to disable 7 | # the auth proxy (https://github.com/brancz/kube-rbac-proxy) 8 | # which protects your /metrics endpoint. 9 | - auth_proxy_service.yaml 10 | - auth_proxy_role.yaml 11 | - auth_proxy_role_binding.yaml 12 | - auth_proxy_client_clusterrole.yaml 13 | - service_account.yaml 14 | -------------------------------------------------------------------------------- /config/rbac/leader_election_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions to do leader election. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | name: leader-election-role 6 | rules: 7 | - apiGroups: 8 | - "" 9 | resources: 10 | - configmaps 11 | verbs: 12 | - get 13 | - list 14 | - watch 15 | - create 16 | - update 17 | - patch 18 | - delete 19 | - apiGroups: 20 | - "" 21 | resources: 22 | - configmaps/status 23 | verbs: 24 | - get 25 | - update 26 | - patch 27 | - apiGroups: 28 | - "" 29 | resources: 30 | - events 31 | verbs: 32 | - create 33 | - patch 34 | - apiGroups: 35 | - "coordination.k8s.io" 36 | resources: 37 | - leases 38 | verbs: 39 | - get -------------------------------------------------------------------------------- /config/rbac/leader_election_role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: leader-election-rolebinding 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: Role 8 | name: leader-election-role 9 | subjects: 10 | - kind: ServiceAccount 11 | name: controller-manager 12 | namespace: system 13 | -------------------------------------------------------------------------------- /config/rbac/role_binding.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: ClusterRoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: operator 23 | subjects: 24 | - kind: ServiceAccount 25 | name: operator 26 | namespace: placeholder 27 | roleRef: 28 | kind: ClusterRole 29 | name: operator 30 | apiGroup: rbac.authorization.k8s.io 31 | -------------------------------------------------------------------------------- /config/rbac/service_account.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: controller-manager 23 | imagePullSecrets: 24 | - name: regcred 25 | -------------------------------------------------------------------------------- /config/samples/ibp.com_v1beta1_ibpca.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: ibp.com/v1beta1 20 | kind: IBPCA 21 | metadata: 22 | name: org1ca 23 | namespace: example 24 | spec: 25 | domain: "" 26 | imagePullSecrets: 27 | - regcred 28 | license: 29 | accept: false 30 | replicas: 1 31 | storage: 32 | ca: 33 | class: "" 34 | size: 100M 35 | version: 1.4.9 36 | -------------------------------------------------------------------------------- /config/samples/kustomization.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-operator/f13d8042e17913f4028439cde8bd1e7d03ee60d4/config/samples/kustomization.yaml -------------------------------------------------------------------------------- /config/scorecard/.osdk-scorecard.yaml: -------------------------------------------------------------------------------- 1 | scorecard: 2 | output: json 3 | bundle: bundle/manifests 4 | plugins: 5 | - basic: 6 | cr-manifest: 7 | - "config/samples/ibp.com_v1beta1_ibpca.yaml" 8 | - "config/samples/ibp.com_v1beta1_ibpconsole.yaml" 9 | - "config/samples/ibp.com_v1beta1_ibppeer.yaml" 10 | - "config/samples/ibp.com_v1beta1_ibporderer.yaml" 11 | - olm: 12 | cr-manifest: 13 | - "config/samples/ibp.com_v1beta1_ibpca.yaml" 14 | - "config/samples/ibp.com_v1beta1_ibpconsole.yaml" 15 | - "config/samples/ibp.com_v1beta1_ibppeer.yaml" 16 | - "config/samples/ibp.com_v1beta1_ibporderer.yaml" 17 | csv-path: "config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml" 18 | -------------------------------------------------------------------------------- /config/scorecard/kustomization.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-operator/f13d8042e17913f4028439cde8bd1e7d03ee60d4/config/scorecard/kustomization.yaml -------------------------------------------------------------------------------- /config/webhook/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manifests.yaml 3 | - service.yaml 4 | 5 | configurations: 6 | - kustomizeconfig.yaml 7 | -------------------------------------------------------------------------------- /config/webhook/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # the following config is for teaching kustomize where to look at when substituting vars. 2 | # It requires kustomize v2.1.0 or newer to work properly. 3 | nameReference: 4 | - kind: Service 5 | version: v1 6 | fieldSpecs: 7 | - kind: MutatingWebhookConfiguration 8 | group: admissionregistration.k8s.io 9 | path: webhooks/clientConfig/service/name 10 | - kind: ValidatingWebhookConfiguration 11 | group: admissionregistration.k8s.io 12 | path: webhooks/clientConfig/service/name 13 | 14 | namespace: 15 | - kind: MutatingWebhookConfiguration 16 | group: admissionregistration.k8s.io 17 | path: webhooks/clientConfig/service/namespace 18 | create: true 19 | - kind: ValidatingWebhookConfiguration 20 | group: admissionregistration.k8s.io 21 | path: webhooks/clientConfig/service/namespace 22 | create: true 23 | 24 | varReference: 25 | - path: metadata/annotations 26 | -------------------------------------------------------------------------------- /config/webhook/service.yaml: -------------------------------------------------------------------------------- 1 | 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: webhook-service 6 | namespace: system 7 | spec: 8 | ports: 9 | - port: 443 10 | targetPort: 9443 11 | selector: 12 | control-plane: controller-manager 13 | -------------------------------------------------------------------------------- /controllers/add_ibpca.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package controllers 20 | 21 | import ( 22 | "github.com/IBM-Blockchain/fabric-operator/controllers/ibpca" 23 | ) 24 | 25 | func init() { 26 | // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. 27 | AddToManagerFuncs = append(AddToManagerFuncs, ibpca.Add) 28 | } 29 | -------------------------------------------------------------------------------- /controllers/add_ibpconsole.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package controllers 20 | 21 | import ( 22 | ibpconsole "github.com/IBM-Blockchain/fabric-operator/controllers/ibpconsole" 23 | ) 24 | 25 | func init() { 26 | // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. 27 | AddToManagerFuncs = append(AddToManagerFuncs, ibpconsole.Add) 28 | } 29 | -------------------------------------------------------------------------------- /controllers/add_ibporderer.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package controllers 20 | 21 | import ( 22 | "github.com/IBM-Blockchain/fabric-operator/controllers/ibporderer" 23 | ) 24 | 25 | func init() { 26 | // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. 27 | AddToManagerFuncs = append(AddToManagerFuncs, ibporderer.Add) 28 | } 29 | -------------------------------------------------------------------------------- /controllers/add_ibppeer.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package controllers 20 | 21 | import ( 22 | "github.com/IBM-Blockchain/fabric-operator/controllers/ibppeer" 23 | ) 24 | 25 | func init() { 26 | // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. 27 | AddToManagerFuncs = append(AddToManagerFuncs, ibppeer.Add) 28 | } 29 | -------------------------------------------------------------------------------- /controllers/ibpca/ibpca_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package ibpca_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestIbpca(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Ibpca Suite") 31 | } 32 | -------------------------------------------------------------------------------- /controllers/ibpconsole/ibpconsole_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package ibpconsole_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestIbpconsole(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Ibpconsole Suite") 31 | } 32 | -------------------------------------------------------------------------------- /controllers/ibporderer/ibporderer_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package ibporderer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestIbporderer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Ibporderer Suite") 31 | } 32 | -------------------------------------------------------------------------------- /controllers/ibppeer/ibppeer_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package ibppeer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestIbppeer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Ibppeer Suite") 31 | } 32 | -------------------------------------------------------------------------------- /definitions/ca/ingress.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: networking.k8s.io/v1 20 | kind: Ingress 21 | metadata: 22 | name: ingress-ibpca 23 | annotations: 24 | nginx.ingress.kubernetes.io/ssl-passthrough: "true" 25 | kubernetes.io/ingress.class: "nginx" 26 | nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s 27 | -------------------------------------------------------------------------------- /definitions/ca/ingressv1beta1.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: networking.k8s.io/v1beta1 20 | kind: Ingress 21 | metadata: 22 | name: ingress-ibpca 23 | annotations: 24 | nginx.ingress.kubernetes.io/ssl-passthrough: "true" 25 | kubernetes.io/ingress.class: "nginx" 26 | nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s -------------------------------------------------------------------------------- /definitions/ca/pvc.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: PersistentVolumeClaim 21 | metadata: 22 | name: "ibpca-pvc" 23 | spec: 24 | accessModes: 25 | - ReadWriteOnce 26 | resources: 27 | requests: 28 | storage: "100Mi" 29 | -------------------------------------------------------------------------------- /definitions/ca/role.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: Role 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: "ca-role" 23 | rules: 24 | - apiGroups: 25 | - "" 26 | resources: 27 | - configmaps 28 | - secrets 29 | verbs: 30 | - get 31 | - list 32 | - create 33 | - update 34 | - patch 35 | - watch 36 | - delete 37 | - deletecollection 38 | -------------------------------------------------------------------------------- /definitions/ca/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: RoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: "ca-rb" 23 | subjects: 24 | - kind: ServiceAccount 25 | name: sample 26 | roleRef: 27 | kind: Role 28 | name: sample 29 | apiGroup: rbac.authorization.k8s.io 30 | -------------------------------------------------------------------------------- /definitions/ca/route.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: route.openshift.io/v1 20 | kind: Route 21 | metadata: 22 | name: ibpca-route 23 | spec: 24 | host: ibpca.ipaddress.nip.io 25 | port: 26 | targetPort: http 27 | tls: 28 | termination: passthrough 29 | to: 30 | kind: Service 31 | name: ibpca-service 32 | weight: 100 33 | wildcardPolicy: None 34 | -------------------------------------------------------------------------------- /definitions/ca/service.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: Service 21 | metadata: 22 | name: ibpca-service 23 | spec: 24 | type: ClusterIP 25 | selector: 26 | release: "ibp-ca" 27 | ports: 28 | - port: 7054 29 | targetPort: 7054 30 | protocol: TCP 31 | name: http 32 | - port: 9443 33 | targetPort: 9443 34 | protocol: TCP 35 | name: operations 36 | -------------------------------------------------------------------------------- /definitions/ca/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: "ca-sa" 23 | automountServiceAccountToken: true 24 | imagePullSecrets: 25 | - name: ibm-entitlement-key 26 | -------------------------------------------------------------------------------- /definitions/console/configmap.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: ConfigMap 21 | metadata: 22 | name: ibpconsole-configmap 23 | data: 24 | REGION: prod 25 | DB_CONNECTION_STRING: "http://localhost:5984" 26 | APP_PORT: "3000" 27 | CONFIGTXLATOR_URL_ORIGINAL: "http://localhost:8083" 28 | DB_SYSTEM: athena-system 29 | CONFIGURE_FILE: "/template/settings.yaml" 30 | -------------------------------------------------------------------------------- /definitions/console/deployer-service.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: Service 21 | metadata: 22 | name: "ibpconsole-deployer-service" 23 | spec: 24 | type: ClusterIP 25 | ports: 26 | - name: deployer 27 | port: 8080 28 | targetPort: 8080 29 | protocol: TCP 30 | selector: 31 | deployment: "console" 32 | -------------------------------------------------------------------------------- /definitions/console/ingress.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: networking.k8s.io/v1 20 | kind: Ingress 21 | metadata: 22 | name: ingress-peer 23 | annotations: 24 | nginx.ingress.kubernetes.io/ssl-passthrough: "true" 25 | kubernetes.io/ingress.class: "nginx" 26 | nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s 27 | -------------------------------------------------------------------------------- /definitions/console/ingressv1beta1.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: networking.k8s.io/v1beta1 20 | kind: Ingress 21 | metadata: 22 | name: ingress-peer 23 | annotations: 24 | nginx.ingress.kubernetes.io/ssl-passthrough: "true" 25 | kubernetes.io/ingress.class: "nginx" 26 | nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s -------------------------------------------------------------------------------- /definitions/console/networkpolicy-denyall.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: NetworkPolicy 20 | apiVersion: networking.k8s.io/v1 21 | metadata: 22 | name: networkpolicy-denyall 23 | spec: 24 | podSelector: {} 25 | ingress: [] 26 | -------------------------------------------------------------------------------- /definitions/console/pvc.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: PersistentVolumeClaim 20 | apiVersion: v1 21 | metadata: 22 | name: ibpconsole-pvc 23 | spec: 24 | accessModes: 25 | - ReadWriteOnce 26 | resources: 27 | requests: 28 | storage: "10Gi" 29 | -------------------------------------------------------------------------------- /definitions/console/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: RoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: "console-rb" 23 | subjects: 24 | - kind: ServiceAccount 25 | name: sample 26 | roleRef: 27 | kind: Role 28 | name: sample 29 | apiGroup: rbac.authorization.k8s.io 30 | -------------------------------------------------------------------------------- /definitions/console/route.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: route.openshift.io/v1 20 | kind: Route 21 | metadata: 22 | name: ibpconsole-route 23 | spec: 24 | host: ibpconsole.ipaddress.nip.io 25 | port: 26 | targetPort: optools 27 | tls: 28 | termination: passthrough 29 | to: 30 | kind: Service 31 | name: ibpconsole-service 32 | weight: 100 33 | wildcardPolicy: None 34 | -------------------------------------------------------------------------------- /definitions/console/service.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: Service 21 | metadata: 22 | name: "ibpconsole-service" 23 | spec: 24 | type: ClusterIP 25 | ports: 26 | - name: optools 27 | port: 3000 28 | targetPort: 3000 29 | protocol: TCP 30 | selector: 31 | deployment: "console" 32 | -------------------------------------------------------------------------------- /definitions/console/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: "console-sa" 23 | automountServiceAccountToken: true 24 | imagePullSecrets: 25 | - name: ibm-entitlement-key 26 | -------------------------------------------------------------------------------- /definitions/orderer/ingress.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | apiVersion: networking.k8s.io/v1 19 | kind: Ingress 20 | metadata: 21 | name: ingress-orderer 22 | annotations: 23 | nginx.ingress.kubernetes.io/ssl-passthrough: "true" 24 | kubernetes.io/ingress.class: "nginx" 25 | nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s 26 | -------------------------------------------------------------------------------- /definitions/orderer/ingressv1beta1.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | apiVersion: networking.k8s.io/v1beta1 19 | kind: Ingress 20 | metadata: 21 | name: ingress-orderer 22 | annotations: 23 | nginx.ingress.kubernetes.io/ssl-passthrough: "true" 24 | kubernetes.io/ingress.class: "nginx" 25 | nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s 26 | -------------------------------------------------------------------------------- /definitions/orderer/pvc.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: PersistentVolumeClaim 21 | metadata: 22 | name: "orderer-pvc" 23 | spec: 24 | accessModes: 25 | - ReadWriteOnce 26 | resources: 27 | requests: 28 | storage: "100Mi" 29 | -------------------------------------------------------------------------------- /definitions/orderer/role.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: Role 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: "orderer-role" 23 | rules: 24 | - apiGroups: 25 | - "" 26 | resources: 27 | - secrets 28 | verbs: 29 | - get 30 | - list 31 | - create 32 | - update 33 | - patch 34 | - watch 35 | - delete 36 | - deletecollection 37 | -------------------------------------------------------------------------------- /definitions/orderer/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | kind: RoleBinding 19 | apiVersion: rbac.authorization.k8s.io/v1 20 | metadata: 21 | name: "orderer-rb" 22 | subjects: 23 | - kind: ServiceAccount 24 | name: sample 25 | roleRef: 26 | kind: Role 27 | name: sample 28 | apiGroup: rbac.authorization.k8s.io 29 | -------------------------------------------------------------------------------- /definitions/orderer/route.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: route.openshift.io/v1 20 | kind: Route 21 | metadata: 22 | name: ibporderer-route 23 | spec: 24 | host: ibporderer.ipaddress.nip.io 25 | port: 26 | targetPort: http 27 | tls: 28 | termination: passthrough 29 | to: 30 | kind: Service 31 | name: ibporderer-service 32 | weight: 100 33 | wildcardPolicy: None 34 | -------------------------------------------------------------------------------- /definitions/orderer/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: "orderer-sa" 23 | automountServiceAccountToken: true 24 | imagePullSecrets: 25 | - name: ibm-entitlement-key 26 | -------------------------------------------------------------------------------- /definitions/peer/couchdb-pvc.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: PersistentVolumeClaim 21 | metadata: 22 | name: "couchdb-pvc" 23 | spec: 24 | accessModes: 25 | - ReadWriteOnce 26 | resources: 27 | requests: 28 | storage: "100Gi" 29 | -------------------------------------------------------------------------------- /definitions/peer/ingress.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | apiVersion: networking.k8s.io/v1 19 | kind: Ingress 20 | metadata: 21 | name: ingress-peer 22 | annotations: 23 | nginx.ingress.kubernetes.io/ssl-passthrough: "true" 24 | kubernetes.io/ingress.class: "nginx" 25 | nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s 26 | -------------------------------------------------------------------------------- /definitions/peer/ingressv1beta1.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | apiVersion: networking.k8s.io/v1beta1 19 | kind: Ingress 20 | metadata: 21 | name: ingress-peer 22 | annotations: 23 | nginx.ingress.kubernetes.io/ssl-passthrough: "true" 24 | kubernetes.io/ingress.class: "nginx" 25 | nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s -------------------------------------------------------------------------------- /definitions/peer/pvc.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: PersistentVolumeClaim 21 | metadata: 22 | name: "peer-pvc" 23 | spec: 24 | accessModes: 25 | - ReadWriteOnce 26 | resources: 27 | requests: 28 | storage: "100Gi" 29 | -------------------------------------------------------------------------------- /definitions/peer/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: RoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: "peer-role" 23 | subjects: 24 | - kind: ServiceAccount 25 | name: sample 26 | roleRef: 27 | kind: Role 28 | name: sample 29 | apiGroup: rbac.authorization.k8s.io 30 | -------------------------------------------------------------------------------- /definitions/peer/route.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: route.openshift.io/v1 20 | kind: Route 21 | metadata: 22 | name: ibppeer-route 23 | spec: 24 | host: ibppeer.ipaddress.nip.io 25 | port: 26 | targetPort: http 27 | tls: 28 | termination: passthrough 29 | to: 30 | kind: Service 31 | name: ibppeer-service 32 | weight: 100 33 | wildcardPolicy: None 34 | -------------------------------------------------------------------------------- /definitions/peer/service.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: Service 21 | metadata: 22 | name: "peer-service" 23 | spec: 24 | selector: 25 | release: "operator" 26 | type: ClusterIP 27 | ports: 28 | - name: "peer-api" 29 | port: 7051 30 | targetPort: 7051 31 | - name: "operations" 32 | port: 9443 33 | targetPort: 9443 34 | - name: "grpcweb" 35 | port: 7443 36 | targetPort: 7443 37 | -------------------------------------------------------------------------------- /definitions/peer/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: "peer-sa" 23 | automountServiceAccountToken: true 24 | imagePullSecrets: 25 | - name: ibm-entitlement-key 26 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to this repository 2 | 3 | ## Tips: 4 | After changed module define at `/api/v1beta1/*.go` run the following command 5 | ``` 6 | make generate 7 | make manifests 8 | ``` 9 | to make `crd` files up to date. 10 | 11 | ## Guide for operator Development 12 | https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/ 13 | 14 | ## Fabric env 15 | for any fabric configuration as core.yaml for peer and orderer.yaml for orderer, please considering check existing structure defined in configoverride. 16 | 17 | ## TODO 18 | -------------------------------------------------------------------------------- /docs/images/fabric-operator-components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-operator/f13d8042e17913f4028439cde8bd1e7d03ee60d4/docs/images/fabric-operator-components.png -------------------------------------------------------------------------------- /docs/images/fabric-operator-sample-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-operator/f13d8042e17913f4028439cde8bd1e7d03ee60d4/docs/images/fabric-operator-sample-network.png -------------------------------------------------------------------------------- /docs/images/prometheus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-operator/f13d8042e17913f4028439cde8bd1e7d03ee60d4/docs/images/prometheus.png -------------------------------------------------------------------------------- /integration/e2ev2/.gitignore: -------------------------------------------------------------------------------- 1 | org1ca/ 2 | org1peer/ 3 | -------------------------------------------------------------------------------- /integration/init/init_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package init_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestInit(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Init Suite") 31 | } 32 | -------------------------------------------------------------------------------- /integration/kind-config.yaml: -------------------------------------------------------------------------------- 1 | kind: Cluster 2 | apiVersion: kind.x-k8s.io/v1alpha4 3 | nodes: 4 | - role: control-plane 5 | kubeadmConfigPatches: 6 | - | 7 | kind: InitConfiguration 8 | nodeRegistration: 9 | kubeletExtraArgs: 10 | node-labels: "ingress-ready=true" 11 | extraPortMappings: 12 | - containerPort: 80 13 | hostPort: 80 14 | protocol: TCP 15 | listenAddress: 127.0.0.1 16 | - containerPort: 443 17 | hostPort: 443 18 | protocol: TCP 19 | listenAddress: 127.0.0.1 20 | containerdConfigPatches: 21 | - |- 22 | [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:${reg_port}"] 23 | endpoint = ["http://${reg_name}:${reg_port}"] 24 | -------------------------------------------------------------------------------- /pkg/action/action_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package action_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestAction(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Action Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/apis/ca/v1/functions.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v1 20 | 21 | func (c *ClientTLSConfig) IsEnabled() bool { 22 | if c.Enabled != nil { 23 | return *c.Enabled 24 | } 25 | return false 26 | } 27 | 28 | func (s *ServerTLSConfig) IsEnabled() bool { 29 | if s.Enabled != nil { 30 | return *s.Enabled 31 | } 32 | return false 33 | } 34 | 35 | func (t *TLS) IsEnabled() bool { 36 | if t.Enabled != nil { 37 | return *t.Enabled 38 | } 39 | return false 40 | } 41 | -------------------------------------------------------------------------------- /pkg/certificate/certificate_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package certificate_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCertificate(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Certificate Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/certificate/reenroller/client.go: -------------------------------------------------------------------------------- 1 | //go:build !pkcs11 2 | // +build !pkcs11 3 | 4 | /* 5 | * Copyright contributors to the Hyperledger Fabric Operator project 6 | * 7 | * SPDX-License-Identifier: Apache-2.0 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at: 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package reenroller 23 | 24 | import ( 25 | commonapi "github.com/IBM-Blockchain/fabric-operator/pkg/apis/common" 26 | "github.com/hyperledger/fabric-ca/lib" 27 | ) 28 | 29 | func GetClient(client *lib.Client, bccsp *commonapi.BCCSP) *lib.Client { 30 | return client 31 | } 32 | -------------------------------------------------------------------------------- /pkg/client/client_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package client_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestClient(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Client Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/client/client_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package client 20 | 21 | import ( 22 | . "github.com/onsi/ginkgo/v2" 23 | . "github.com/onsi/gomega" 24 | "k8s.io/client-go/rest" 25 | ) 26 | 27 | var _ = Describe("Client", func() { 28 | It("creates a client", func() { 29 | restConfig := &rest.Config{} 30 | client, err := New(restConfig) 31 | Expect(err).NotTo(HaveOccurred()) 32 | Expect(client).NotTo(BeNil()) 33 | }) 34 | }) 35 | -------------------------------------------------------------------------------- /pkg/command/command_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package command_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCommand(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Command Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/crd/crd_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package crd_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCrd(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Crd Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/global/global_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package global_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestGlobal(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Global Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/ca/ca_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package initializer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCa(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Ca Suite") 31 | } 32 | 33 | //go:generate counterfeiter -o mocks/client.go -fake-name Client ../../k8s/controllerclient Client 34 | -------------------------------------------------------------------------------- /pkg/initializer/ca/config/config_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package config_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConfig(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Config Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/ca/tls/tls_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package tls_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestTls(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Tls Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/common/common_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package common_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCommon(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Common Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/common/config/config_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package config_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConfig(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Config Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/common/enroller/client.go: -------------------------------------------------------------------------------- 1 | //go:build !pkcs11 2 | // +build !pkcs11 3 | 4 | /* 5 | * Copyright contributors to the Hyperledger Fabric Operator project 6 | * 7 | * SPDX-License-Identifier: Apache-2.0 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at: 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package enroller 23 | 24 | import ( 25 | commonapi "github.com/IBM-Blockchain/fabric-operator/pkg/apis/common" 26 | "github.com/hyperledger/fabric-ca/lib" 27 | ) 28 | 29 | func GetClient(client *lib.Client, bccsp *commonapi.BCCSP) *lib.Client { 30 | return client 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/common/mspparser/mspparser_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package mspparser_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestMspparser(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Mspparser Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/common/secretmanager/secretmanager_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package secretmanager_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestSecretmanager(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Secretmanager Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/orderer/config/v1/config_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v1_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConfig(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Config Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/orderer/config/v2/config_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v2_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestV2(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "V2 Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/orderer/config/v24/config_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v24_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestV24(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "V2 Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/orderer/config/v25/config_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v25_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestV25(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "V2 Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/orderer/configtx/configtx_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package configtx_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConfigtx(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Configtx Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/orderer/orderer_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package initializer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOrderer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Orderer Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/peer/config/commoncore/commoncore_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package commoncore_test 19 | 20 | import ( 21 | "testing" 22 | 23 | . "github.com/onsi/ginkgo/v2" 24 | . "github.com/onsi/gomega" 25 | ) 26 | 27 | func TestCommoncore(t *testing.T) { 28 | RegisterFailHandler(Fail) 29 | RunSpecs(t, "Commoncore Suite") 30 | } 31 | -------------------------------------------------------------------------------- /pkg/initializer/peer/config/commoncore/testdata/test_core_no_change.yaml: -------------------------------------------------------------------------------- 1 | 2 | peer: 3 | gossip: 4 | bootstrap: 5 | - "1.2.3.4" 6 | -------------------------------------------------------------------------------- /pkg/initializer/peer/config/v1/config_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v1_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConfig(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Config Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/peer/config/v2/v2_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v2_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestV2(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "V2 Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/peer/config/v25/v2_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v25_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestV25(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "V25 Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/initializer/validator/validator_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package validator_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestValidator(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Validator Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/configmap/configmap_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package configmap_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConfigmap(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Configmap Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/container/container_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package container_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestContainer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Container Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/deployment/deployment_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package deployment_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestDeployment(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Deployment Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/ingress/ingress_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package ingress_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestDeployment(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Deployment Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/ingressv1beta1/ingress_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package ingressv1beta1_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestDeployment(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Deployment Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/job/job_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package job_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestJob(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Job Suite") 31 | } 32 | 33 | //go:generate counterfeiter -o mocks/client.go -fake-name Client ../../../k8s/controllerclient Client 34 | -------------------------------------------------------------------------------- /pkg/manager/resources/orderernode/orderernode_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package orderernode_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestDeployment(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Deployment Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/pv/pvc_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package pv_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestPvc(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Pvc Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/pvc/pvc_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package pvc_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestPvc(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Pvc Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/role/role_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package role_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestRole(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Role Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/rolebinding/rolebinding_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package rolebinding_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestRolebinding(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Rolebinding Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/route/route_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package route_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConfigmap(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Configmap Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/service/service_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package service_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestService(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Service Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/manager/resources/serviceaccount/serviceaccount_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package serviceaccount_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestServiceaccount(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Serviceaccount Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/migrator/peer/fabric/fabric_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package fabric_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestFabric(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Fabric Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/migrator/peer/fabric/v2/v2_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v2_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestV2(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "V2 Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/migrator/peer/fabric/v25/v25_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package v25_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestV2(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "V2 Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/migrator/peer/peer_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package peer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestPeer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Peer Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/base/ca/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCa(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Ca Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/base/console/console_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package baseconsole_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConsole(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Console Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/base/console/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | const ( 22 | K8S string = "kubernetes" 23 | OPENSHIFT string = "openshift" 24 | ) 25 | 26 | type Override struct{} 27 | -------------------------------------------------------------------------------- /pkg/offering/base/console/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/base/orderer/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | config "github.com/IBM-Blockchain/fabric-operator/operatorconfig" 23 | "github.com/IBM-Blockchain/fabric-operator/pkg/k8s/controllerclient" 24 | ) 25 | 26 | type Override struct { 27 | Name string 28 | Client controllerclient.Client 29 | Config *config.Config 30 | } 31 | -------------------------------------------------------------------------------- /pkg/offering/base/orderer/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/base/peer/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | "github.com/IBM-Blockchain/fabric-operator/pkg/k8s/controllerclient" 23 | ) 24 | 25 | type Override struct { 26 | Client controllerclient.Client 27 | 28 | DefaultCouchContainerFile string 29 | DefaultCouchInitContainerFile string 30 | CouchdbUser string 31 | CouchdbPassword string 32 | DefaultCCLauncherFile string 33 | } 34 | -------------------------------------------------------------------------------- /pkg/offering/base/peer/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/common/common_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package common_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCommon(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Common Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/common/reconcilechecks/images/images_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package images_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestImages(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Images Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/common/reconcilechecks/reconcilechecks_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package reconcilechecks_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestReconcilechecks(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Reconcilechecks Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/common/result.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package common 20 | 21 | import ( 22 | current "github.com/IBM-Blockchain/fabric-operator/api/v1beta1" 23 | "sigs.k8s.io/controller-runtime/pkg/reconcile" 24 | ) 25 | 26 | type Result struct { 27 | reconcile.Result 28 | Status *current.CRStatus 29 | OverrideUpdateStatus bool 30 | } 31 | -------------------------------------------------------------------------------- /pkg/offering/k8s/ca/ca_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package k8sca_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCa(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Ca Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/k8s/ca/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | baseca "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/ca/override" 23 | ) 24 | 25 | type Override struct { 26 | baseca.Override 27 | } 28 | -------------------------------------------------------------------------------- /pkg/offering/k8s/ca/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/k8s/console/console_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package k8sconsole_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConsole(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Console Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/k8s/console/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | baseconsole "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/console/override" 23 | ) 24 | 25 | type Override struct { 26 | baseconsole.Override 27 | } 28 | -------------------------------------------------------------------------------- /pkg/offering/k8s/console/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/k8s/orderer/orderer_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package k8sorderer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOrderer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Orderer Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/k8s/orderer/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | baseorderer "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/orderer/override" 23 | ) 24 | 25 | type Override struct { 26 | baseorderer.Override 27 | } 28 | -------------------------------------------------------------------------------- /pkg/offering/k8s/orderer/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/k8s/peer/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | "github.com/IBM-Blockchain/fabric-operator/pkg/k8s/controllerclient" 23 | basepeer "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/peer/override" 24 | ) 25 | 26 | type Override struct { 27 | basepeer.Override 28 | Client controllerclient.Client 29 | } 30 | -------------------------------------------------------------------------------- /pkg/offering/k8s/peer/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/k8s/peer/peer_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package k8speer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestPeer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Peer Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/offering_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package offering_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOffering(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Offering Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/openshift/ca/ca_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package openshiftca_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestCa(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Ca Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/openshift/ca/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | baseca "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/ca/override" 23 | ) 24 | 25 | type Override struct { 26 | baseca.Override 27 | } 28 | -------------------------------------------------------------------------------- /pkg/offering/openshift/ca/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/openshift/console/console_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package openshiftconsole_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConsole(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Console Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/openshift/console/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | baseconsole "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/console/override" 23 | ) 24 | 25 | type Override struct { 26 | baseconsole.Override 27 | } 28 | -------------------------------------------------------------------------------- /pkg/offering/openshift/console/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/openshift/orderer/orderer_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package openshiftorderer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOrderer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Orderer Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/openshift/orderer/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | baseorderer "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/orderer/override" 23 | ) 24 | 25 | type Override struct { 26 | baseorderer.Override 27 | } 28 | -------------------------------------------------------------------------------- /pkg/offering/openshift/orderer/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/openshift/peer/override/override.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override 20 | 21 | import ( 22 | basepeer "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/peer/override" 23 | ) 24 | 25 | type Override struct { 26 | basepeer.Override 27 | } 28 | -------------------------------------------------------------------------------- /pkg/offering/openshift/peer/override/override_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package override_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOverride(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Override Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/offering/openshift/peer/peer_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package openshiftpeer_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestPeer(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Peer Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/operatorerrors/operatorerrors_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package operatorerrors_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestOperatorerrors(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Operatorerrors Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/restart/configmap/configmap_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package configmap_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestConfigmap(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Configmap Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/restart/restart_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package restart_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestRestart(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Restart Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/restart/staggerrestarts/staggerrestarts_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package staggerrestarts_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestStaggerrestarts(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Staggerrestarts Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/util/merge/merge_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package merge_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestMerge(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Merge Suite") 31 | } 32 | -------------------------------------------------------------------------------- /pkg/util/pointer/pointer.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package pointer 19 | 20 | func True() *bool { 21 | trueVal := true 22 | return &trueVal 23 | } 24 | 25 | func False() *bool { 26 | falseVal := false 27 | return &falseVal 28 | } 29 | -------------------------------------------------------------------------------- /pkg/util/testdata/invalid_kind.yaml: -------------------------------------------------------------------------------- 1 | kind: 2 2 | -------------------------------------------------------------------------------- /release_notes/v1.0.0.md: -------------------------------------------------------------------------------- 1 | v1.0.0-beta 2 | ------------------------ 3 | 4 | Release Notes 5 | ------------- 6 | 7 | Known Vulnerabilities 8 | --------------------- 9 | none 10 | 11 | Resolved Vulnerabilities 12 | ------------------------ 13 | none 14 | 15 | Known Issues & Workarounds 16 | -------------------------- 17 | none 18 | 19 | Change Log 20 | ---------- 21 | none 22 | -------------------------------------------------------------------------------- /release_notes/v1.0.4-2.md: -------------------------------------------------------------------------------- 1 | v1.0.4-2 Release notes - Jan 5, 2023 2 | ------------------------ 3 | 4 | Release Notes 5 | ------------- 6 | 7 | v1.0.4-2 is a patch release, providing updates for the following issues in the operator: 8 | 9 | - Adds support for [Idemix config](https://github.com/hyperledger/fabric-ca/blob/main/lib/server/idemix/config.go#L29) overrides in CA CRD spec.configoverride 10 | 11 | Known Vulnerabilities 12 | --------------------- 13 | none 14 | 15 | Resolved Vulnerabilities 16 | ------------------------ 17 | none 18 | 19 | Known Issues & Workarounds 20 | -------------------------- 21 | none 22 | 23 | Change Log 24 | ---------- 25 | none 26 | -------------------------------------------------------------------------------- /release_notes/v1.0.4.md: -------------------------------------------------------------------------------- 1 | v1.0.4 2 | ------------------------ 3 | 4 | Release Notes 5 | ------------- 6 | 7 | Known Vulnerabilities 8 | --------------------- 9 | none 10 | 11 | Resolved Vulnerabilities 12 | ------------------------ 13 | none 14 | 15 | Known Issues & Workarounds 16 | -------------------------- 17 | none 18 | 19 | Change Log 20 | ---------- 21 | none 22 | -------------------------------------------------------------------------------- /sample-network-multi-org/channel-config/.gitignore: -------------------------------------------------------------------------------- 1 | organizations/ 2 | mychannel_genesis_block.pb 3 | mychannel_genesis_block.json -------------------------------------------------------------------------------- /sample-network-multi-org/channel-config/README.md: -------------------------------------------------------------------------------- 1 | # Channel Configuration 2 | 3 | TODO : this guide / notes. 4 | 5 | 6 | Notes : 7 | 8 | - [ ] describe how `organizations/` folder is populated by the export_msp.sh scripts 9 | - [ ] configtx uses the internal k8s `$service.svc.cluster.local` DNS domain to communicate between nodes. 10 | - [ ] describe configtx.yaml assumes / enforces working dir is FABRIC_CFG_PATH 11 | 12 | TODOs: 13 | 14 | - [ ] Deploy org nodes across multiple namespaces. Use kube DNS to resolve in the channel config. `$service.$namespace.svc.cluster.local` 15 | - [ ] Deploy org nodes across multiple k8s clusters. Use INGRESS URLs to resolve services. `$ingress-hostname.$org.localho.st:443` 16 | - -------------------------------------------------------------------------------- /sample-network-multi-org/kind/cert-manager/.gitignore: -------------------------------------------------------------------------------- 1 | ca-issuer-secret.yaml 2 | -------------------------------------------------------------------------------- /sample-network-multi-org/kind/cert-manager/ca-issuer.yaml: -------------------------------------------------------------------------------- 1 | # see https://cert-manager.io/docs/configuration/selfsigned/#bootstrapping-ca-issuers 2 | 3 | --- 4 | apiVersion: cert-manager.io/v1 5 | kind: Certificate 6 | metadata: 7 | name: ca-issuer 8 | spec: 9 | isCA: true 10 | privateKey: 11 | algorithm: RSA 12 | encoding: PKCS1 13 | size: 2048 14 | commonName: "*.localho.st Kube / KIND TLS Issuer" 15 | subject: 16 | organizations: 17 | - "International Business Machines Incorporated" 18 | secretName: ca-issuer-secret 19 | issuerRef: 20 | name: root-tls-cert-issuer 21 | kind: ClusterIssuer 22 | group: cert-manager.io 23 | 24 | --- 25 | apiVersion: cert-manager.io/v1 26 | kind: ClusterIssuer 27 | metadata: 28 | name: ca-issuer 29 | spec: 30 | ca: 31 | secretName: ca-issuer-secret 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /sample-network-multi-org/kind/cert-manager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | resources: 5 | - root-tls-issuer.yaml 6 | - ca-issuer.yaml 7 | 8 | # The CA issuer secret / cert is created by the KIND setup script, rather than 9 | # in the kustomization. This allows for a certificate created by a previously 10 | # configured KIND cluster to be re-used as the root CA. 11 | # - ca-issuer-secret.yaml 12 | -------------------------------------------------------------------------------- /sample-network-multi-org/kind/cert-manager/root-tls-issuer.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: cert-manager.io/v1 3 | kind: ClusterIssuer 4 | metadata: 5 | name: root-tls-cert-issuer 6 | spec: 7 | selfSigned: {} 8 | -------------------------------------------------------------------------------- /sample-network-multi-org/kind/nginx/kustomization.yaml: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Copyright contributors to the Hyperledger Fabric Operator project 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at: 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | apiVersion: kustomize.config.k8s.io/v1beta1 20 | kind: Kustomization 21 | 22 | resources: 23 | - https://github.com/kubernetes/ingress-nginx.git/deploy/static/provider/kind?ref=controller-v1.1.2 24 | 25 | patchesStrategicMerge: 26 | - ingress-nginx-controller.yaml -------------------------------------------------------------------------------- /sample-network-multi-org/kind/operator/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | apiVersion: kustomize.config.k8s.io/v1beta1 19 | kind: Kustomization 20 | 21 | resources: 22 | - https://github.com/hyperledger-labs/fabric-operator.git/config/crd 23 | - operator-clusterrole.yaml 24 | - operator-clusterrolebinding.yaml 25 | - operator-serviceaccount.yaml 26 | - operator-psp.yaml 27 | - operator-manager.yaml 28 | -------------------------------------------------------------------------------- /sample-network-multi-org/kind/operator/operator-serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | --- 19 | apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: fabric-operator 23 | -------------------------------------------------------------------------------- /sample-network-multi-org/organizations/.gitignore: -------------------------------------------------------------------------------- 1 | enrollments/ 2 | chaincode/ 3 | 4 | -------------------------------------------------------------------------------- /sample-network-multi-org/scripts/start_operator.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | . scripts/utils.sh 4 | 5 | 6 | # Create the namespace, ignoring an error if it previously was created. 7 | cat << EOF | kubectl apply -f - 8 | apiVersion: v1 9 | kind: Namespace 10 | metadata: 11 | name: ${NAMESPACE} 12 | EOF 13 | 14 | print "Launching ${NAMESPACE} fabric-operator" 15 | 16 | # Substitute just/env variables into the kustomization before applying to k8s 17 | kubectl kustomize kind/operator | envsubst | kubectl -n ${NAMESPACE} apply -f - 18 | 19 | kubectl -n ${NAMESPACE} rollout status deploy fabric-operator -------------------------------------------------------------------------------- /sample-network/.gitignore: -------------------------------------------------------------------------------- 1 | network-debug.log 2 | network.log 3 | temp/ 4 | config/configtx.yaml -------------------------------------------------------------------------------- /sample-network/config/cas/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | --- 19 | apiVersion: kustomize.config.k8s.io/v1beta1 20 | kind: Kustomization 21 | 22 | resources: 23 | - org0-ca.yaml 24 | - org1-ca.yaml 25 | - org2-ca.yaml 26 | -------------------------------------------------------------------------------- /sample-network/config/console/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - hlf-operations-console.yaml 6 | -------------------------------------------------------------------------------- /sample-network/config/manager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | apiVersion: kustomize.config.k8s.io/v1beta1 19 | kind: Kustomization 20 | 21 | resources: 22 | - hlf-operator-manager.yaml 23 | -------------------------------------------------------------------------------- /sample-network/config/orderers/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | --- 19 | apiVersion: kustomize.config.k8s.io/v1beta1 20 | kind: Kustomization 21 | 22 | resources: 23 | - org0-orderers.yaml 24 | 25 | -------------------------------------------------------------------------------- /sample-network/config/peers/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | --- 19 | apiVersion: kustomize.config.k8s.io/v1beta1 20 | kind: Kustomization 21 | 22 | resources: 23 | - org1-peer1.yaml 24 | - org1-peer2.yaml 25 | - org2-peer1.yaml 26 | - org2-peer2.yaml 27 | 28 | -------------------------------------------------------------------------------- /sample-network/config/rbac/hlf-operator-rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | --- 19 | kubectl -n $NS create rolebinding hlf-operator-rolebinding --clusterrole=hlf-operator-role --group=system:serviceaccounts:test-network -- 20 | -------------------------------------------------------------------------------- /sample-network/config/rbac/hlf-operator-serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | --- 19 | apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: hlf-operator 23 | -------------------------------------------------------------------------------- /sample-network/config/rbac/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | apiVersion: kustomize.config.k8s.io/v1beta1 19 | kind: Kustomization 20 | 21 | resources: 22 | - hlf-operator-serviceaccount.yaml 23 | - hlf-operator-clusterrole.yaml 24 | - hlf-operator-clusterrolebinding.yaml 25 | # - hlf-operator-rolebinding.yaml 26 | -------------------------------------------------------------------------------- /scripts/download_binaries.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | #!/bin/bash -e 20 | if [ ! -f ${PWD}/bin/fabric-ca-client ] || [ ! -f ${PWD}/bin/peer ] ; then 21 | echo -e "\n\n======= Downloading Fabric & Fabric-CA Binaries =========\n" 22 | curl -sSL http://bit.ly/2ysbOFE | bash -s ${FABRIC_VERSION} ${FABRIC_CA_VERSION} -d -s 23 | else 24 | echo -e "\n\n======= Fabric Binaries already exists, Skipping download =========\n" 25 | fi 26 | -------------------------------------------------------------------------------- /scripts/go-sec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Copyright contributors to the Hyperledger Fabric Operator project 5 | # 6 | # SPDX-License-Identifier: Apache-2.0 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at: 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | # 20 | 21 | curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin $RELEASE 22 | 23 | gosec ./... 24 | -------------------------------------------------------------------------------- /scripts/run-unit-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright contributors to the Hyperledger Fabric Operator project 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at: 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | echo "Running unit tests..." 21 | 22 | export PATH=$PATH:$GOPATH/bin 23 | 24 | # List of packages to not run test for 25 | EXCLUDED_PKGS=( 26 | "/mocks" 27 | "/manager$" 28 | "/manager/resources$" 29 | "/apis" 30 | "/controller$" 31 | "/controllers$" 32 | "ibp-operator/config$" 33 | "/integration" 34 | ) 35 | 36 | PKGS=`go list ./... | grep -v -f <(printf '%s\n' "${EXCLUDED_PKGS[@]}")` 37 | 38 | go test $PKGS -cover 39 | exit $? 40 | -------------------------------------------------------------------------------- /testdata/deploy/ca/adminsecret.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: Secret 21 | metadata: 22 | name: "ca1-admin-secret" 23 | type: Opaque 24 | data: 25 | ca-admin-name: YWRtaW4= 26 | ca-admin-password: MWYyZDFlMmU2N2Rm 27 | -------------------------------------------------------------------------------- /testdata/deploy/console/ui-password-secret.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | data: 21 | password: cGFzc3dvcmQ= 22 | kind: Secret 23 | metadata: 24 | name: ui-password-secret 25 | type: generic -------------------------------------------------------------------------------- /testdata/deploy/role_binding.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | kind: ClusterRoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: operator-<<>> 23 | subjects: 24 | - kind: ServiceAccount 25 | name: operator 26 | namespace: <<>> 27 | roleRef: 28 | kind: ClusterRole 29 | name: operator 30 | apiGroup: rbac.authorization.k8s.io 31 | -------------------------------------------------------------------------------- /testdata/deploy/service_account.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright contributors to the Hyperledger Fabric Operator project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at: 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: operator 23 | -------------------------------------------------------------------------------- /testdata/init/peer/tls-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICbzCCAhagAwIBAgIUPMLMFwrc0eEvfXVWqD7JBVskuT8wCgYIKoZIzj0EAwIw 3 | aDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQK 4 | EwtIeXBlcmxlZGdlcjEPMA0GA1UECxMGRmFicmljMRkwFwYDVQQDExBmYWJyaWMt 5 | Y2Etc2VydmVyMB4XDTIwMTAwODE3MzQwMFoXDTI1MTAwNzE3MzQwMFowbzELMAkG 6 | A1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQKEwtIeXBl 7 | cmxlZGdlcjEPMA0GA1UECxMGRmFicmljMSAwHgYDVQQDExdTYWFkcy1NYWNCb29r 8 | LVByby5sb2NhbDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABKpwW13lchAmpnVU 9 | mfWR/SatyoxRbJY/Vmd47FVmTTQzP6ozas9kw7YdU8puuSBRZUysjZKog6ZIhP1i 10 | prktViGjgZYwgZMwDgYDVR0PAQH/BAQDAgOoMB0GA1UdJQQWMBQGCCsGAQUFBwMB 11 | BggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQARVNUQSGBTBonhSkx 12 | H3U+umbX9jAfBgNVHSMEGDAWgBRZGUFKO6Oj/cWcooPUq3ZunPTyjjAUBgNVHREE 13 | DTALgglsb2NhbGhvc3QwCgYIKoZIzj0EAwIDRwAwRAIga1fONwubqaeUiO4gaV6H 14 | WuAoSCXZScS5cdXJ5YBDGgcCIF5COASszFIlBAI2uVymhuaZyrTRHTFGS2y8pO1g 15 | HnU6 16 | -----END CERTIFICATE----- 17 | -------------------------------------------------------------------------------- /testdata/init/peer/tls-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg+nv3DrdFu5NegcRO 3 | BB3LlTBGyPdYsP5yR7W4rVWpSP6hRANCAASqcFtd5XIQJqZ1VJn1kf0mrcqMUWyW 4 | P1ZneOxVZk00Mz+qM2rPZMO2HVPKbrkgUWVMrI2SqIOmSIT9Yqa5LVYh 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /testdata/operatorconfig.yaml: -------------------------------------------------------------------------------- 1 | peer: 2 | timeouts: 3 | dbMigration: 4 | jobStart: 30s 5 | jobCompletion: 45s 6 | -------------------------------------------------------------------------------- /testdata/secret.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | -------------------------------------------------------------------------------- /tools/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | /* 5 | * Copyright contributors to the Hyperledger Fabric Operator project 6 | * 7 | * SPDX-License-Identifier: Apache-2.0 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at: 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package tools 23 | 24 | import ( 25 | _ "github.com/maxbrunsfeld/counterfeiter/v6" 26 | _ "k8s.io/code-generator" 27 | ) 28 | 29 | // This file imports packages that are used when running go generate, or used 30 | // during the development process but not otherwise depended on by built code. 31 | -------------------------------------------------------------------------------- /version/version_suite_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright contributors to the Hyperledger Fabric Operator project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at: 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package version_test 20 | 21 | import ( 22 | "testing" 23 | 24 | . "github.com/onsi/ginkgo/v2" 25 | . "github.com/onsi/gomega" 26 | ) 27 | 28 | func TestVersion(t *testing.T) { 29 | RegisterFailHandler(Fail) 30 | RunSpecs(t, "Version Suite") 31 | } 32 | --------------------------------------------------------------------------------