fabric-samples/test-network-k8s/kube/org1/org1-cc-template.yaml
Matthew B White e07a9ff86b
Adding examples of CCAAS and support into the test-network-k8s (#527)
* Changes to the test-network k8s deployment to use the
built-in as-a-service chaincode builder from the Peer Container

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>

* Remove the ccaas init container from org2 peer; tweak docs on ccaas config

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

Co-authored-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
2021-12-17 14:09:03 +00:00

45 lines
No EOL
987 B
YAML

#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: org1{{PEER_NAME}}-cc-{{CHAINCODE_NAME}}
spec:
replicas: 1
selector:
matchLabels:
app: org1{{PEER_NAME}}-cc-{{CHAINCODE_NAME}}
template:
metadata:
labels:
app: org1{{PEER_NAME}}-cc-{{CHAINCODE_NAME}}
spec:
containers:
- name: main
image: {{CHAINCODE_IMAGE}}
env:
- name: CHAINCODE_SERVER_ADDRESS
value: 0.0.0.0:9999
# todo: load with an envFrom and a dynamic config map with the ID.
- name: CHAINCODE_ID
value: {{CHAINCODE_ID}}
ports:
- containerPort: 9999
---
apiVersion: v1
kind: Service
metadata:
name: org1{{PEER_NAME}}-cc-{{CHAINCODE_NAME}}
spec:
ports:
- name: chaincode
port: 9999
protocol: TCP
selector:
app: org1{{PEER_NAME}}-cc-{{CHAINCODE_NAME}}