hyperledger / bevel-operator-fabric

Hyperledger Fabric Kubernetes operator - Hyperledger Fabric operator for Kubernetes (v2.3, v2.4 and v2.5, soon 3.0)
https://hyperledger.github.io/bevel-operator-fabric/
Apache License 2.0
271 stars 91 forks source link

Best way to make the CCP available to a web-server container #119

Open nclsclsn opened 2 years ago

nclsclsn commented 2 years ago

Hello,

Thanks for the operator, it's an amazing tool to deploy Hyperledger Fabric on Kubernetes!

We have created a web server to relay client requests to the network and want to make it a k8s deployment with a few replicas to handle the load. The container is stateless but it needs to have access to up-to-date CCP. What's the best way to get this information? I could use the operator from my host to dump the CCP then mount it to the deployment but I'm afraid this information could become inaccurate as Kubernetes reallocate pods in the cluster.

Any views? Thanks!

adityajoshi12 commented 2 years ago

You can mount the CCP as configmap to your application, also pod reallocation should have not impact on the application if you are using istio with FQDN

dviejokfs commented 1 year ago

@nclsclsn Get a network config and then create a secret on Kubernetes; then you can mount it as @adityajoshi12 says to the pod.

Having an up-to-date configuration would be as easy as re-executing the script to fetch the most up-to-date network config, update the secret and restart the pod.