raftAtGit / hl-fabric-operator

Kubernetes operator for Hyperledger Fabric
Apache License 2.0
39 stars 6 forks source link

Can I use this operator to maintain a HLF 2.2+ network? #3

Open nkaramolegos opened 2 years ago

nkaramolegos commented 2 years ago

Hello, can I use this operator to deploy and maintain a HLF 2.2+ network? Also, are the users and IDs deployed by the CA of each organization? Is the GW functionality available? I mean how can I deploy an application inside the K8S cluster?

Finally, is there a way to manage the network using REST API?

raftAtGit commented 2 years ago

I dont have experience with HLF 2.2+ networks. But to my knowledge, main difference was the chaincode lifecycle. So possibly (not tested) channel operations will work out of the box and even adding new organizations to existing network. But chaincode operations will not work (unless you use legacy 1.4.x chaincode lifecycle)

Operator does not do anything about users and ID's. Only launches CAs.

No there is no specific REST API but indirectly yes, since Kubernetes operations are performed via Kubernetes REST API behind the scenes.

nkaramolegos commented 2 years ago

Operator does not do anything about users and ID's. Only launches CAs.

And how the deployment of users is taking place?

No there is no specific REST API but indirectly yes, since Kubernetes operations are performed via Kubernetes REST API behind the scenes.

Can you give an example on that?

raftAtGit commented 2 years ago

And how the deployment of users is taking place?

Just interact with CA in regular ways. There are many sources/examples for that.

Can you give an example on that?

kubectl command for example uses REST API

even fabric operator CLI uses REST API indirectly. it doesn't invoke REST API but the library it uses sigs.k8s.io/controller-runtime invokes REST API.

nkaramolegos commented 2 years ago

even fabric operator CLI uses REST API indirectly. it doesn't invoke REST API but the library it uses sigs.k8s.io/controller-runtime invokes REST API.

Can you give a link to the code of the operator to see how the REST API of sigs.k8s.io/controller-runtime is used?

raftAtGit commented 2 years ago

As mentioned sigs.k8s.io/controller-runtime invokes REST API behind the scenes. You cannot see it directly. But here is an example call to delete a FabricNetwork https://github.com/raftAtGit/hl-fabric-operator/blob/master/cli/cmd/delete.go#L44