Skip to content

Commit

Permalink
Rename FABRIC_CHAINCODE_NAMESPACE variable
Browse files Browse the repository at this point in the history
Follow the convention of the CCaaS builder which uses a `CHAINCODE_AS_A_SERVICE_BUILDER_` prefix to make it more obvious what the environment variable relates to

Signed-off-by: James Taylor <[email protected]>
  • Loading branch information
jt-nti committed May 19, 2022
1 parent 1493d4d commit 7085e38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Status: it _should_ just about work now but there are a few issues to iron out (

The k8s builder can be run in cluster using the `KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT` environment variables, or it can connect using a `KUBECONFIG_PATH` environment variable.

An optional `FABRIC_CHAINCODE_NAMESPACE` can be used to specify the namespace to deploy chaincode to.
An optional `FABRIC_K8S_BUILDER_NAMESPACE` can be used to specify the namespace to deploy chaincode to.

A `CORE_PEER_ID` environment variable is also currently required.

Expand All @@ -28,7 +28,7 @@ External builders are configured in the `core.yaml` file, for example:
path: /opt/hyperledger/k8s_builder
propagateEnvironment:
- CORE_PEER_ID
- FABRIC_CHAINCODE_NAMESPACE
- FABRIC_K8S_BUILDER_NAMESPACE
- KUBERNETES_SERVICE_HOST
- KUBERNETES_SERVICE_PORT
```
Expand Down
3 changes: 2 additions & 1 deletion internal/util/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
)

const (
ChaincodeNamespaceVariable = "FABRIC_CHAINCODE_NAMESPACE"
builderVariablePrefix = "FABRIC_K8S_BUILDER_"
ChaincodeNamespaceVariable = builderVariablePrefix + "NAMESPACE"
KubeconfigPathVariable = "KUBECONFIG_PATH"
PeerIdVariable = "CORE_PEER_ID"
)
Expand Down

0 comments on commit 7085e38

Please sign in to comment.