Skip to content

Commit

Permalink
Update test-network-k8s
Browse files Browse the repository at this point in the history
Add required permissions for upcoming k8s builder release

Also adds ttl to install jobs and configures the k8s builder prefix

Signed-off-by: James Taylor <jamest@uk.ibm.com>
  • Loading branch information
jt-nti committed May 24, 2024
1 parent d3e2a90 commit a08eacb
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions test-network-k8s/config/org1/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ chaincode:
path: /var/hyperledger/fabric/external_builders/k8s_builder
propagateEnvironment:
- CORE_PEER_ID
- FABRIC_K8S_BUILDER_OBJECT_NAME_PREFIX
- KUBERNETES_SERVICE_HOST
- KUBERNETES_SERVICE_PORT

Expand Down
1 change: 1 addition & 0 deletions test-network-k8s/config/org2/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ chaincode:
path: /var/hyperledger/fabric/external_builders/k8s_builder
propagateEnvironment:
- CORE_PEER_ID
- FABRIC_K8S_BUILDER_OBJECT_NAME_PREFIX
- KUBERNETES_SERVICE_HOST
- KUBERNETES_SERVICE_PORT

Expand Down
3 changes: 2 additions & 1 deletion test-network-k8s/kube/fabric-builder-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ rules:
- apiGroups:
- ""
- apps
- batch
resources:
- pods
- deployments
- jobs
- configmaps
- secrets
verbs:
Expand Down
1 change: 1 addition & 0 deletions test-network-k8s/kube/org1/org1-install-k8s-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ kind: Job
metadata:
name: org1-install-k8s-builder
spec:
ttlSecondsAfterFinished: 600
backoffLimit: 0
completions: 1
template:
Expand Down
1 change: 1 addition & 0 deletions test-network-k8s/kube/org1/org1-peer1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ data:
CORE_PEER_FILESYSTEMPATH: /var/hyperledger/fabric/data/org1-peer1.org1.example.com
CORE_LEDGER_SNAPSHOTS_ROOTDIR: /var/hyperledger/fabric/data/org1-peer1.org1.example.com/snapshots
CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG: "{\"peername\":\"org1peer1\"}"
FABRIC_K8S_BUILDER_OBJECT_NAME_PREFIX: org1-peer1-cc
CORE_LEDGER_STATE_STATEDATABASE: CouchDB
CORE_LEDGER_STATE_COUCHDBCONFIG_MAXRETRIESONSTARTUP: "20"
CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS: localhost:5984
Expand Down
1 change: 1 addition & 0 deletions test-network-k8s/kube/org1/org1-peer2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ data:
CORE_PEER_FILESYSTEMPATH: /var/hyperledger/fabric/data/org1-peer2.org1.example.com
CORE_LEDGER_SNAPSHOTS_ROOTDIR: /var/hyperledger/fabric/data/org1-peer2.org1.example.com/snapshots
CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG: "{\"peername\":\"org1peer2\"}"
FABRIC_K8S_BUILDER_OBJECT_NAME_PREFIX: org1-peer2-cc
CORE_LEDGER_STATE_STATEDATABASE: CouchDB
CORE_LEDGER_STATE_COUCHDBCONFIG_MAXRETRIESONSTARTUP: "20"
CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS: localhost:5984
Expand Down
1 change: 1 addition & 0 deletions test-network-k8s/kube/org2/org2-install-k8s-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ kind: Job
metadata:
name: org2-install-k8s-builder
spec:
ttlSecondsAfterFinished: 600
backoffLimit: 0
completions: 1
template:
Expand Down
1 change: 1 addition & 0 deletions test-network-k8s/kube/org2/org2-peer1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ data:
CORE_PEER_FILESYSTEMPATH: /var/hyperledger/fabric/data/org2-peer1.org2.example.com
CORE_LEDGER_SNAPSHOTS_ROOTDIR: /var/hyperledger/fabric/data/org2-peer1.org2.example.com/snapshots
CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG: "{\"peername\":\"org2peer1\"}"
FABRIC_K8S_BUILDER_OBJECT_NAME_PREFIX: org2-peer1-cc
CORE_LEDGER_STATE_STATEDATABASE: CouchDB
CORE_LEDGER_STATE_COUCHDBCONFIG_MAXRETRIESONSTARTUP: "20"
CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS: localhost:5984
Expand Down
1 change: 1 addition & 0 deletions test-network-k8s/kube/org2/org2-peer2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ data:
CORE_PEER_FILESYSTEMPATH: /var/hyperledger/fabric/data/org2-peer2.org2.example.com
CORE_LEDGER_SNAPSHOTS_ROOTDIR: /var/hyperledger/fabric/data/org2-peer2.org2.example.com/snapshots
CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG: "{\"peername\":\"org2peer2\"}"
FABRIC_K8S_BUILDER_OBJECT_NAME_PREFIX: org2-peer2-cc
CORE_LEDGER_STATE_STATEDATABASE: CouchDB
CORE_LEDGER_STATE_COUCHDBCONFIG_MAXRETRIESONSTARTUP: "20"
CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS: localhost:5984
Expand Down

0 comments on commit a08eacb

Please sign in to comment.