[hlf-ord] Update Owners + bug fixes and best-practices (#7243)

* Add OWNERS file

Signed-off-by: Alejandro Vicente Grabovetsky <sasha@aid.technology>

* Add Hyperledger Fabric logo

Signed-off-by: Alejandro Vicente Grabovetsky <sasha@aid.technology>

* Add hlfToolsVersion to values.yaml

Signed-off-by: Alejandro Vicente Grabovetsky <sasha@aid.technology>

* Update persistence according to Helm best practices

Signed-off-by: Alejandro Vicente Grabovetsky <sasha@aid.technology>

* Bump version up

Signed-off-by: Alejandro Vicente Grabovetsky <sasha@aid.technology>

* Don't require the adminCert secret for starting chart, but don't run orderer until relevant cert exists

Signed-off-by: Alejandro Vicente Grabovetsky <sasha@aid.technology>

* Don't require the Genesis secret for starting chart, but don't run orderer until relevant genesis file exists

Signed-off-by: Alejandro Vicente Grabovetsky <sasha@aid.technology>
This commit is contained in:
Sasha (Alejandro Vicente Grabovetsky)
2018-09-07 09:03:19 -07:00
committed by k8s-ci-robot
parent 9965c3ff79
commit 4403625101
8 changed files with 42 additions and 9 deletions
+3
View File
@@ -19,3 +19,6 @@
.project
.idea/
*.tmproj
# OWNERS file for Helm repository
OWNERS
+2 -3
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: Hyperledger Fabric Orderer chart (these charts are created by AID:Tech and are currently not directly associated with the Hyperledger project)
name: hlf-ord
version: 1.0.8
version: 1.0.10
appVersion: 1.1.0
keywords:
- blockchain
@@ -15,5 +15,4 @@ maintainers:
email: sasha@aid.technology
- name: nicolapaoli
email: nicola@aid.technology
## Icon not included while sorting out trademark question with Hyperledger project
# icon: https://www.hyperledger.org/wp-content/uploads/2018/04/fabric-logo.png
icon: https://www.hyperledger.org/wp-content/uploads/2018/04/fabric-logo.png
+6
View File
@@ -0,0 +1,6 @@
approvers:
- alexvicegrab
- nicolapaoli
reviewers:
- alexvicegrab
- nicolapaoli
+1
View File
@@ -97,6 +97,7 @@ The following table lists the configurable parameters of the Hyperledger Fabric
| `caAddress` | Address of CA to register/enroll with | `hlf-ca.local` |
| `caUsername` | Username for registering/enrolling with CA | `ord1` |
| `caPassword` | Password for registering/enrolling with CA | Random 24 alphanumeric characters |
| `ord.hlfToolsVersion` | Version of Hyperledger Fabric tools used | `1.1.0` |
| `ord.type` | Type of Orderer (`solo` or `kafka`) | `solo` |
| `ord.mspID` | ID of MSP the Orderer belongs to | `OrdererMSP` |
| `secrets.genesis` | Secret containing Genesis Block for orderer | `hlf--genesis` |
+1 -1
View File
@@ -6,7 +6,7 @@ metadata:
{{ include "labels.standard" . | indent 4 }}
data:
## Environmental variable defining which version of tools to obtain (for fabric-ca-client)
HLF_TOOLS_BUILD: linux-amd64-1.1.0
HLF_TOOLS_BUILD: linux-amd64-{{ .Values.ord.hlfToolsVersion }}
## Location where fabric-ca-client configuration is saved
FABRIC_CA_CLIENT_HOME: /var/hyperledger/fabric-ca-client
## Orderer defaults
+13
View File
@@ -42,6 +42,19 @@ spec:
- sh
- -c
- |
while [ ! -d /hl_config/admin/admincerts ] || [ -z "$(ls -A /hl_config/admin/admincerts)" ];
do
echo "\033[0;31m /hl_config/admin/admincerts must contain Ord admin certificates files \033[0m"
sleep 60
done
while [ ! -d /hl_config/genesis ] || [ -z "$(ls -A /hl_config/genesis)" ];
do
echo "\033[0;31m /hl_config/genesis must contain Genesis transaction \033[0m"
sleep 60
done
# Download Fabric CA-client if it does not exist
if [ ! -f /bin/fabric-ca-client ]
then
+5 -1
View File
@@ -16,6 +16,10 @@ spec:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClass }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}
+11 -4
View File
@@ -15,7 +15,12 @@ service:
persistence:
enabled: true
annotations: {}
## If unset or "", use "default" storage class.
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: ""
accessMode: ReadWriteOnce
size: 1Gi
@@ -32,18 +37,20 @@ caUsername: ord1
# caPassword:
ord:
# Tools version
hlfToolsVersion: 1.1.0
## Type of Orderer, `solo` or `kafka`
type: solo
## MSP ID of the Orderer
mspID: OrdererMSP
secrets:
secrets: {}
## This should contain "genesis" block derived from a configtx.yaml
## configtxgen -profile OrdererGenesis -outputBlock genesis.block
genesis: hlf--genesis
# genesis: hlf--genesis
## This should contain the Certificate of the Orderer Organisation admin
## This is necessary to successfully run the orderer
adminCert: hlf--ord-admincert
# adminCert: hlf--ord-admincert
resources: {}
## We usually recommend not to specify default resources and to leave this as a conscious