fabric-samples/test-network-k8s/kube/org2/org2-admin-cli.yaml
Sam Yuan 0a1efc45cd
nit fixs (#519)
1. busybox latest image tag
2. pull images with more images
3. load images to kind cluster at local

Signed-off-by: Sam Yuan <yy19902439@126.com>
2021-11-02 15:43:31 +00:00

65 lines
1.9 KiB
YAML

#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: org2-admin-cli
spec:
replicas: 1
selector:
matchLabels:
app: org2-admin-cli
template:
metadata:
labels:
app: org2-admin-cli
spec:
containers:
- name: main
image: {{LOCAL_CONTAINER_REGISTRY}}/fabric-tools:{{FABRIC_VERSION}}
imagePullPolicy: IfNotPresent
env:
- name: FABRIC_CFG_PATH
value: /var/hyperledger/fabric/config
- name: CORE_PEER_MSPCONFIGPATH
value: /var/hyperledger/fabric/organizations/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
- name: CORE_PEER_TLS_ROOTCERT_FILE
value: /var/hyperledger/fabric/organizations/peerOrganizations/org2.example.com/msp/tlscacerts/org2-tls-ca.pem
args:
- sleep
- "2147483647"
workingDir: /root
volumeMounts:
- name: fabric-volume
mountPath: /var/hyperledger
- name: fabric-config
mountPath: /var/hyperledger/fabric/config
# This init container will unfurl all of the MSP archives listed in the msp-config config map.
initContainers:
- name: msp-unfurl
image: busybox
command:
- sh
- -c
- "for msp in $(ls /msp/msp-*.tgz); do echo $msp && tar zxvf $msp -C /var/hyperledger/fabric; done"
volumeMounts:
- name: msp-config
mountPath: /msp
- name: fabric-volume
mountPath: /var/hyperledger
volumes:
- name: fabric-volume
persistentVolumeClaim:
claimName: fabric-org2
- name: fabric-config
configMap:
name: org2-config
- name: msp-config
configMap:
name: msp-config