Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- name: lint chart
run: ct lint --charts deploy/charts/firefly

- name: test chart templating
run: helm template deploy/charts/firefly

- name: setup kind
uses: engineerd/setup-kind@v0.5.0
with:
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/firefly/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: firefly
description: A Helm chart for deploying FireFly and FireFly HTTPS Dataexchange onto Kubernetes.
type: application
appVersion: "0.11.4"
version: "0.0.1"
version: "0.0.3"

maintainers:
- name: hfuss
Expand Down
3 changes: 3 additions & 0 deletions deploy/charts/firefly/ci/eth-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ dataexchange:

tlsSecret:
enabled: false

erc1155:
enabled: false
3 changes: 3 additions & 0 deletions deploy/charts/firefly/ci/fab-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ dataexchange:

tlsSecret:
enabled: false

erc1155:
enabled: false
31 changes: 25 additions & 6 deletions deploy/charts/firefly/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kuberentes.io/part-of: {{ .Chart.Name }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "firefly.dataexchangeLabels" -}}
helm.sh/chart: {{ include "firefly.chart" . }}
{{ include "firefly.dataexchangeSelectorLabels" . }}
Expand All @@ -56,6 +53,16 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kuberentes.io/part-of: {{ .Chart.Name }}
{{- end }}

{{- define "firefly.erc1155Labels" -}}
helm.sh/chart: {{ include "firefly.chart" . }}
{{ include "firefly.erc1155SelectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kuberentes.io/part-of: {{ .Chart.Name }}
{{- end }}

{{/*
Selector labels
*/}}
Expand All @@ -65,15 +72,18 @@ app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: core
{{- end }}

{{/*
Selector labels
*/}}
{{- define "firefly.dataexchangeSelectorLabels" -}}
app.kubernetes.io/name: {{ include "firefly.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: dx
{{- end }}

{{- define "firefly.erc1155SelectorLabels" -}}
app.kubernetes.io/name: {{ include "firefly.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: erc1155
{{- end }}

{{- define "firefly.dataexchangeP2PHost" -}}
{{- if .Values.dataexchange.ingress.enabled }}
{{- (index .Values.dataexchange.ingress.hosts 0).host }}
Expand Down Expand Up @@ -205,4 +215,13 @@ dataexchange:
{{- end }}
{{- end }}
{{- end }}
{{- if and .Values.config.tokensOverride (not .Values.erc1155.enabled) }}
tokens:
{{- toYaml (tpl .Values.config.tokensOverride .) | nindent 2 }}
{{- else if and .Values.erc1155.enabled }}
tokens:
- plugin: fftokens
name: erc1155
url: http://{{ include "firefly.fullname" . }}-erc1155.{{ .Release.Namespace }}.svc:{{ .Values.erc1155.service.port }}
{{- end }}
{{- end }}
89 changes: 89 additions & 0 deletions deploy/charts/firefly/templates/erc1155/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{{- if .Values.erc1155.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "firefly.fullname" . }}-erc1155
labels:
{{- include "firefly.erc1155Labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "firefly.erc1155SelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.erc1155.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "firefly.erc1155SelectorLabels" . | nindent 8 }}
spec:
{{- with .Values.erc1155.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.erc1155.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-erc1155
securityContext:
{{- toYaml .Values.erc1155.securityContext | nindent 12 }}
image: "{{ .Values.erc1155.image.repository }}:{{ .Values.erc1155.image.tag }}"
imagePullPolicy: {{ .Values.erc1155.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.erc1155.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /api/v1/health/liveness
port: http
successThreshold: 1
failureThreshold: 2
periodSeconds: 10
timeoutSeconds: 1
initialDelaySeconds: 5
readinessProbe:
httpGet:
path: /api/v1/health/readiness
port: http
successThreshold: 1
failureThreshold: 4
periodSeconds: 15
timeoutSeconds: 2
initialDelaySeconds: 15
env:
- name: PORT
value: {{ .Values.erc1155.service.port | quote }}
- name: ETHCONNECT_URL
value: {{ tpl .Values.config.ethconnectUrl . }}
- name: ETHCONNECT_INSTANCE
value: {{ .Values.config.erc1155ContractAddress }}
- name: ETHCONNECT_TOPIC
value: {{ .Values.config.erc1155EthconnectTopic | quote }}
- name: ETHCONNECT_PREFIX
value: {{ .Values.config.ethconnectPrefixShort | default "fly" }}
{{- if and .Values.config.ethconnectUsername .Values.config.ethconnectPassword }}
- name: ETHCONNECT_USERNAME
value: {{ .Values.config.ethconnectUsername | quote }}
- name: ETHCONNECT_PASSWORD
value: {{ .Values.config.ethconnectPassword | quote }}
{{- end }}
- name: AUTO_INIT
value: "true"
resources:
{{- toYaml .Values.erc1155.resources | nindent 12 }}
{{- with .Values.erc1155.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.erc1155.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.erc1155.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
17 changes: 17 additions & 0 deletions deploy/charts/firefly/templates/erc1155/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.erc1155.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "firefly.fullname" . }}-erc1155
labels:
{{- include "firefly.erc1155Labels" . | nindent 4 }}
spec:
type: {{ .Values.erc1155.service.type }}
ports:
- port: {{ .Values.erc1155.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "firefly.erc1155SelectorLabels" . | nindent 4 }}
{{- end }}
63 changes: 56 additions & 7 deletions deploy/charts/firefly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ config:
# The Ethconnect topic to use for blockchain event subscriptions
ethconnectTopic: 0

# The short prefix FireFly will prepend to certain headers it sends to Ethconnect i.e. ff or kld
# The short prefix FireFly will prepend to certain headers it sends to Ethconnect i.e. fly or kld
ethconnectPrefixShort: ""

# The long prefix FireFly will prepend to certain headers it sends to Ethconnect i.e. FireFly or Kaleido
Expand All @@ -100,6 +100,12 @@ config:
# The Fabric to use for signing transactions, must be pre-registered and enrolled
fabconnectSigner: ""

# The Ethconnet URI representing the ERC1155 tokens contract
erc1155ContractAddress: "/contracts/erc1155Addrress"

# The Ethconnet topic to use for tokens event subscriptions
erc1155EthconnectTopic: ""

# The following values can be used to override the templating of specific plugin sections, in the case where
# the user wants greater control to template the sections using global values, additional helpers, etc. OR if they
# want to use other plugin types i.e. `fabric` which currently do not exist at the time of writing.
Expand All @@ -110,6 +116,8 @@ config:

publicstorageOverride: {}

tokensOverride: {}

blockchainOverride: {}
# type: ethereum
# ethereum:
Expand All @@ -126,7 +134,7 @@ config:
core:
image:
repository: ghcr.io/hyperledger/firefly
pullPolicy: Always
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: latest

Expand All @@ -135,8 +143,6 @@ core:
# value: debug

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podAnnotations: {}

Expand Down Expand Up @@ -233,12 +239,10 @@ dataexchange:

image:
repository: ghcr.io/hyperledger/firefly-dataexchange-https
pullPolicy: Always
pullPolicy: IfNotPresent
tag: v0.9.3

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podAnnotations: {}

Expand Down Expand Up @@ -304,3 +308,48 @@ dataexchange:
subPath: ""
size: 2Gi
storageClass: ""

erc1155:
enabled: true

image:
repository: ghcr.io/hyperledger/firefly-tokens-erc1155
pullPolicy: IfNotPresent
tag: v0.10.2

imagePullSecrets: []

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: 3000

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}