mirror of
https://github.com/helm/charts.git
synced 2026-08-23 14:27:18 +00:00
optional burrow contract deploy post-install (#12675)
Signed-off-by: Gregory Hill <greg.hill@monax.io>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
db112362bb
commit
45a12109ed
@@ -1,6 +1,6 @@
|
||||
name: burrow
|
||||
version: 1.0.6
|
||||
appVersion: 0.24.3
|
||||
version: 1.1.0
|
||||
appVersion: 0.24.6
|
||||
description: Burrow is a permissionable smart contract machine
|
||||
home: https://github.com/hyperledger/burrow
|
||||
icon: https://raw.githubusercontent.com/hyperledger/burrow/develop/docs/assets/images/burrow.png
|
||||
|
||||
@@ -52,12 +52,16 @@ The following table lists the configurable parameters of the Burrow chart and it
|
||||
| Parameter | Description | Default |
|
||||
| --------- | ----------- | ------- |
|
||||
| `image.repository` | image repository | `"hyperledger/burrow"` |
|
||||
| `image.tag` | image tag | `"0.24.3"` |
|
||||
| `image.tag` | image tag | `"0.24.6"` |
|
||||
| `image.pullPolicy` | image pull policy | `"IfNotPresent"` |
|
||||
| `chain.nodes` | number of nodes for the blockchain network | `1` |
|
||||
| `chain.logLevel` | log level for the nodes (`debug`, `info`, `warn`) | `"info"` |
|
||||
| `chain.extraSeeds` | network seeds to dial in addition to the cluster booted by the chart; each entry in the array should be in the form `ip:port` (note: because P2P connects over tcp, the port is absolutely required) | `[]` |
|
||||
| `chain.testing` | toggle pre-generated keys & genesis for ci testing | `false` |
|
||||
| `contracts.enabled` | toggle post-install contract deployment | `false` |
|
||||
| `contracts.image` | contract deployer image | `""` |
|
||||
| `contracts.tag` | contract deployer tag | `""` |
|
||||
| `contracts.deploy` | command to run in post-install hook | `""` |
|
||||
| `validatorAddresses` | list of validators to deploy | `[]` |
|
||||
| `env` | environment variables to configure burrow | `{}` |
|
||||
| `extraArgs` | extra arguments to give to the build in `burrow start` command | `{}` |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- define "settings" -}}
|
||||
{{- range $.Values.environment.secrets }}
|
||||
- name: {{ .name }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .location }}
|
||||
key: {{ .key }}
|
||||
{{- end }}
|
||||
{{- range $key, $val := $.Values.environment.inline }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,53 @@
|
||||
{{- if .Values.contracts.enabled }}
|
||||
{{- $refDir := printf "/ref" }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "burrow.fullname" $ }}-contracts
|
||||
namespace: {{ $.Release.Namespace | quote }}
|
||||
labels:
|
||||
app: {{ template "burrow.name" $ }}
|
||||
chart: {{ template "burrow.chart" $ }}
|
||||
heritage: {{ $.Release.Service }}
|
||||
release: {{ $.Release.Name }}
|
||||
annotations:
|
||||
"helm.sh/hook": "post-install"
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
# we always want burrow & solc installed
|
||||
initContainers:
|
||||
- name: burrow
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ['sh', '-c', 'cp /usr/local/bin/* /tmp']
|
||||
volumeMounts:
|
||||
- name: bin
|
||||
mountPath: /tmp
|
||||
containers:
|
||||
- name: contracts-deploy
|
||||
image: "{{ .Values.contracts.image }}:{{ $.Values.contracts.tag }}"
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: bin
|
||||
mountPath: /usr/local/bin/
|
||||
- mountPath: {{ $refDir }}
|
||||
name: ref-dir
|
||||
env:
|
||||
- name: CHAIN_URL_GRPC
|
||||
value: {{ template "burrow.fullname" $ }}-grpc:{{ .Values.rpcGRPC.service.port }}
|
||||
{{- include "settings" . | indent 8 }}
|
||||
command: ["/bin/sh", "-c", "{{ .Values.contracts.deploy }}"]
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- name: bin
|
||||
emptyDir: {}
|
||||
- name: ref-dir
|
||||
projected:
|
||||
sources:
|
||||
- configMap:
|
||||
name: {{ template "burrow.fullname" $ }}-config
|
||||
- configMap:
|
||||
name: {{ template "burrow.fullname" $ }}-genesis
|
||||
backoffLimit: 0
|
||||
{{- end }}
|
||||
@@ -85,10 +85,7 @@ spec:
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- range $key, $value := $.Values.env }}
|
||||
- name: "{{ $key }}"
|
||||
value: "{{ $value }}"
|
||||
{{- end }}
|
||||
{{- include "settings" $ | indent 10 }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ $refDir }}
|
||||
name: ref-dir
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
image:
|
||||
repository: hyperledger/burrow
|
||||
tag: 0.24.3
|
||||
tag: 0.24.6
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
chain:
|
||||
@@ -23,8 +23,17 @@ validatorAddresses:
|
||||
Address: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
NodeAddress: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
|
||||
env: {}
|
||||
contracts:
|
||||
# wait required to ensure chain readiness
|
||||
enabled: false
|
||||
image: ""
|
||||
tag: ""
|
||||
deploy: ""
|
||||
|
||||
extraArgs: {}
|
||||
environment:
|
||||
inline: {}
|
||||
secrets: []
|
||||
|
||||
organization: "user"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user