mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
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>
65 lines
1.9 KiB
YAML
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
|