Skip to content

Commit 7e75844

Browse files
committed
[WIP] Add chaincode job topic to doc
Signed-off-by: James Taylor <[email protected]>
1 parent 32e03ab commit 7e75844

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

docs/concepts/chaincode-job.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Chaincode job
2+
3+
The k8s builder runs chaincode images using a long running Kubernetes job.
4+
5+
6+
## Labels
7+
8+
Kubernetes objects created by the k8s builder have the following labels.
9+
10+
| Key | Description |
11+
| -------------------------------- | ------------------------------------------------------------------------------------------ |
12+
| app.kubernetes.io/name[^1] | The name of the application: `hyperledger-fabric` |
13+
| app.kubernetes.io/component[^1] | The application component: `chaincode` |
14+
| app.kubernetes.io/created-by[^1] | The tool that created the object: `fabric-builder-k8s` |
15+
| app.kubernetes.io/managed-by[^1] | The tool used to manage the application: `fabric-builder-k8s` |
16+
| fabric-builder-k8s-cclabel | The chaincode label, e.g. `assetcc` |
17+
| fabric-builder-k8s-cchash | Base32 encoded chaincode hash, e.g. `N6MMJOZJIFDXCMJO3XI2QE7O6WB56IJBYI24I6LXSLYUDJDNJNCQ` |
18+
19+
[^1]:
20+
Kubernetes defines [recommended labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/) to describe applications and instances of applications.
21+
22+
## Annotations
23+
24+
Kubernetes objects created by the k8s builder have the following annotations.
25+
26+
| Key | Description |
27+
| -------------------------------- | --------------------------------------------------------------------------------------------------- |
28+
| fabric-builder-k8s-ccid | The full chaincode ID, e.g. `mycc:a7ca45a7cc85f1d89c905b775920361ed089a364e12a9b6d55ba75c965ddd6a9` |
29+
| fabric-builder-k8s-mspid | The membership service provider ID, e.g. `DigiBank` |
30+
| fabric-builder-k8s-peeraddress | The peer address, e.g. `peer0.digibank.example.com` |
31+
| fabric-builder-k8s-peerid | The peer ID, e.g. `peer0` |
32+
33+

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ nav:
101101
- Chaincode builder: concepts/chaincode-builder.md
102102
- Chaincode image: concepts/chaincode-image.md
103103
- Chaincode package: concepts/chaincode-package.md
104+
- Chaincode job: concepts/chaincode-job.md
104105
- Configuring:
105106
- Configuration overview: configuring/overview.md
106107
- Kubernetes permissions: configuring/kubernetes-permissions.md

0 commit comments

Comments
 (0)