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
265 stars 90 forks source link

Plugin `channelcrd create` commands do not support configurable namespace #180

Closed jonasrmichel closed 12 months ago

jonasrmichel commented 12 months ago

What happened?

The kubectl hlf channelcrd [main, follower] create plugin commands do not support a configurable namespace (e.g., via a --namespace flag).

What did you expect to happen?

A configurable namespace for the created FabricMainChannel / FabricFollowerChannel CRD via a flag.

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

Run either of these commands and observe that the CRD is created in the default namespace, which cannot be changed via the channelcrd command.

kubectl hlf channelcrd main create \
    --channel-name=demo \
    --name=demo \
    --orderer-orgs=OrdererMSP \
    --peer-orgs=Org1MSP \
    --admin-orderer-orgs=OrdererMSP \
    --admin-peer-orgs=Org1MSP \
    --secret-name=wallet \
    --secret-ns=default \
    --consenters=ord-node1.default:7050 \
    --consenter-certificates=./orderer-cert.pem \
    --identities="OrdererMSP;admin-tls-ordservice.yaml" \
    --identities="Org1MSP;peer-org1.yaml"
kubectl hlf channelcrd follower create \
    --channel-name=demo \
    --mspid=Org1MSP \
    --name="demo-org1msp" \
    --orderer-certificates="./orderer-cert.pem" \
    --orderer-urls="grpcs://ord-node1.default:7050" \
    --anchor-peers="org1-peer0:7051" \
    --peers="org1-peer0.default" \
    --secret-name=wallet \
    --secret-ns=default \
    --secret-key="peer-org1.yaml"

Anything else we need to know?

No response

Kubernetes version

No response

dviejokfs commented 12 months ago

@jonasrmichel ChannelMain and ChannelFollower CRDs are not part of any namespace, they are non-namespaced resources, therefore, they don't belong to any namespace.

The decision is on purpose since these are logical components, not physical, therefore it doesn't make any sense to place them in an specific namespace.

jonasrmichel commented 12 months ago

Noted, thank you for the clarification @dviejokfs! 🙏