Skip to content

Instantly share code, notes, and snippets.

@susimsek
Created November 27, 2021 10:33
Show Gist options
  • Save susimsek/eeff8d7daed645432fd0c91fd25958cf to your computer and use it in GitHub Desktop.
Save susimsek/eeff8d7daed645432fd0c91fd25958cf to your computer and use it in GitHub Desktop.
Kubernetes Artifacts Generating Job
apiVersion: batch/v1
kind: Job
metadata:
name: create-artifacts
spec:
backoffLimit: 1
template:
spec:
containers:
- name: create-artifacts
image: hyperledger/fabric-tools:2.3
workingDir: /
command:
- /bin/bash
- -c
- |
./scripts/createGenesis.sh &&
./scripts/createChannel.sh
volumeMounts:
- name: fabricfiles
mountPath: /organizations
subPath: organizations
- name: fabricfiles
mountPath: /configtx
subPath: configtx
- name: fabricfiles
mountPath: /system-genesis-block
subPath: system-genesis-block
- name: fabricfiles
mountPath: /channel-artifacts
subPath: channel-artifacts
- name: fabricfiles
mountPath: /scripts
subPath: scripts
restartPolicy: Never
volumes:
- name: fabricfiles
persistentVolumeClaim:
claimName: fabricfiles-pvc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment