hyperledger / bevel-operator-fabric

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

Cannot set custom value for CA istio-ingressgateway #148

Open tbondarchuk opened 1 year ago

tbondarchuk commented 1 year ago

What happened?

  1. deployed Istio using helm chart (btw, istio operator is discouraged to use now)
  2. gateway selector is different for chart:

    If you installed Istio using Helm following the standard documentation, this would be "istio=ingress"

  3. added --istio-ingressgateway=istio to kubectl hlf ca create command but created Gateway still has ingressgateway selector
  4. after some digging found out that CA crd does not pass ingressgateway name to created resources like orderer: https://github.com/hyperledger/bevel-operator-fabric/blob/1a0a0242ac0a4b3aec9cd2d417cff10deda42723/controllers/ordnode/types.go#L136 https://github.com/hyperledger/bevel-operator-fabric/blob/1a0a0242ac0a4b3aec9cd2d417cff10deda42723/controllers/peer/peer_controller.go#L1039 https://github.com/hyperledger/bevel-operator-fabric/blob/1a0a0242ac0a4b3aec9cd2d417cff10deda42723/controllers/ca/types.go#L40 https://github.com/hyperledger/bevel-operator-fabric/blob/1a0a0242ac0a4b3aec9cd2d417cff10deda42723/controllers/ca/ca_controller.go#L534

What did you expect to happen?

controller to create istio Gateway with selector set to value provided in --istio-ingressgateway cli arg.

How can we reproduce it (as minimally and precisely as possible)?


kubectl hlf ca create  --image=$CA_IMAGE --version=$CA_VERSION --storage-class=standard --capacity=1Gi --name=org1-ca \
    --enroll-id=enroll --enroll-pw=enrollpw --hosts=org1-ca.localho.st --istio-port=443 --istio-ingressgateway=istio

kubectl get -oyaml gateway org1-ca-gateway | grep -2 selector

Anything else we need to know?

No response

Kubernetes version

unrelated

tbondarchuk commented 1 year ago

temp workaround is to use old label with new gateway chart values.yaml:

labels:
  istio: ingressgateway