github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/helm/burrow/templates/contracts.yaml (about)

     1  {{- if .Values.contracts.enabled }}
     2  {{- $refDir := printf "/ref" }}
     3  apiVersion: batch/v1
     4  kind: Job
     5  metadata:
     6    name: {{ template "burrow.fullname" $ }}-contracts
     7    namespace: {{ $.Release.Namespace | quote }}
     8    labels:
     9      app: {{ template "burrow.name" $ }}
    10      chart: {{ template "burrow.chart" $ }}
    11      heritage: {{ $.Release.Service }}
    12      release: {{ $.Release.Name }}
    13    annotations:
    14      "helm.sh/hook": "post-install"
    15      "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
    16  spec:
    17    template:
    18      spec:
    19        containers:
    20        - name: contracts-deploy
    21          image: {{ include "contracts.image" . | quote }}
    22          imagePullPolicy: {{ $.Values.contracts.image.pullPolicy }}
    23          volumeMounts:
    24          - mountPath: {{ $refDir }}
    25            name: ref-dir
    26          env:
    27          - name: CHAIN_URL_GRPC
    28            value: {{ template "burrow.fullname" $ }}-grpc:{{ .Values.config.RPC.GRPC.ListenPort }}
    29  {{- include "settings" . | indent 8 }}
    30          command: ["/bin/sh", "-c", "{{ .Values.contracts.command }}"]
    31        restartPolicy: Never
    32        volumes:
    33        - name: ref-dir
    34          projected:
    35            sources:
    36              - configMap:
    37                  name: {{ template "burrow.fullname" $ }}-config
    38              - configMap:
    39                  name: {{ template "burrow.fullname" $ }}-genesis
    40    backoffLimit: 0
    41  {{- end }}