Skip to content
Merged
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
2 changes: 1 addition & 1 deletion charts/cardano-node/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: cardano-node
description: Creates a Cardano node deployment with SOCAT sidecar
version: 0.2.0
version: 0.3.0
appVersion: 10.3.1
maintainers:
- name: aurora
Expand Down
15 changes: 15 additions & 0 deletions charts/cardano-node/templates/keys-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.blockProducer.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-secret
namespace: {{ .Release.Namespace | default "default" }}
labels:
{{- include "cardano-node.labels" . | nindent 4 }}
cardano_network: {{ .Values.cardano_network }}
type: Opaque
data:
{{- range .Values.blockProducer.keys }}
{{ .name }}: {{ dict "type" .type "description" .description "cborHex" .cborHex | toJson | b64enc }}
{{- end }}
{{- end }}
60 changes: 43 additions & 17 deletions charts/cardano-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,37 @@ spec:
affinity: {{ .Values.affinity | toYaml | nindent 8 }}
{{- end }}
containers:
- env:
- name: CARDANO_NODE_SOCKET_PATH
value: /ipc/node.socket
- args:
- run
env:
- name: CARDANO_DATABASE_PATH
value: /data/db
- name: CARDANO_SOCKET_PATH
value: /ipc/node.socket
- name: NETWORK
value: {{ .Values.cardano_network }}
- name: CARDANO_NETWORK

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NETWORK to CARDANO_NETWORK won't work properly because the entrypoint of the Blinklabs' cardano node image observes NETWORK
https://github.com/blinklabs-io/docker-cardano-node/blob/main/bin/entrypoint#L7

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to remove it for 'run-node' else the image won't load keys and turn peer sharing off.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses both. Using NETWORK goes down the "short" path, which bypasses much of the configurability of the image.

value: "{{ .Values.cardano_network }}"
- name: CARDANO_PORT
value: "{{ .Values.service.ports.ntn.targetPort }}"
- name: CARDANO_SOCKET_PATH
value: /ipc/node.socket
- name: CARDANO_TOPOLOGY
value: "/opt/cardano/config/{{ .Values.cardano_network }}/topology.json"
{{- if .Values.blockProducer.enabled }}
- name: CARDANO_BLOCK_PRODUCER
value: "true"
- name: CARDANO_SHELLEY_KES_KEY
value: "/opt/cardano/config/keys/kes.skey"
- name: CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE
value: "/opt/cardano/config/keys/node.cert"
- name: CARDANO_SHELLEY_VRF_KEY
value: "/opt/cardano/config/keys/vrf.skey"
{{- end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: cardano-node
ports:
- name: ntn
containerPort: {{ .Values.service.ports.ntn.targetPort }}
- name: metrics
containerPort: {{ .Values.service.ports.metrics.targetPort }}
- containerPort: {{ .Values.service.ports.ntn.targetPort }}
name: ntn
- containerPort: {{ .Values.service.ports.metrics.targetPort }}
name: metrics
resources: {{ .Values.resources | toYaml | nindent 10 }}
volumeMounts:
- mountPath: /data
Expand All @@ -57,16 +67,20 @@ spec:
mountPath: /opt/cardano/config/{{ .Values.cardano_network }}/topology.json
subPath: topology.json
{{- end }}
- command:
{{- if .Values.blockProducer.enabled }}
- mountPath: /opt/cardano/config/keys
name: block-producer-keys
{{- end }}
- name: socat-ntc
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: IfNotPresent
command:
- sh
- -c
- socat TCP-LISTEN:${PORT},fork UNIX-CLIENT:/ipc/node.socket,ignoreeof
env:
- name: PORT
value: "{{ .Values.service.ports.socatNtc.targetPort }}"
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: IfNotPresent
name: socat-ntc
ports:
- containerPort: {{ .Values.service.ports.socatNtc.targetPort }}
resources: {{ .Values.socat.resources | toYaml | nindent 10 }}
Expand All @@ -85,8 +99,20 @@ spec:
- name: node-db
persistentVolumeClaim:
claimName: node-db
- emptyDir: {}
name: node-ipc
- name: node-ipc
emptyDir: {}
{{- if .Values.topology.enabled }}
- name: topology
configMap:
name: {{ include "cardano-node.fullname" . }}-topology
defaultMode: 0644
{{- end }}
{{- if .Values.blockProducer.enabled }}
- name: block-producer-keys
secret:
defaultMode: 0600
secretName: {{ .Release.Name }}-secret
{{- end }}
updateStrategy:
type: OnDelete
volumeClaimTemplates:
Expand Down
18 changes: 18 additions & 0 deletions charts/cardano-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ service:
metrics:
port: 12798
targetPort: 12798
blockProducer:
enabled: false
# These are placeholder keys used as an example. You will need to generate your own.
# keys:
# - name: kes.skey
# type: KesSigningKey_ed25519_kes_2^6
# description: KES Signing Key
# cborHex: 590260ba480db1c8b51c48ab3e2fb26b34429431464e3e3b8c0bf86ab6f605a977627c31988677b46cdc192ef06fd2904e0fb648322c86d13815238f870a025caa33064ca7bcfd61b0e4743c449768780c29027cad1769ae1ecba361e47c52c327558736dfacb13a4f5538d5232901ce88fbbfd6cae9e0550218bae11112cb9951126109664e353d69d44a7769ae8a0d4e76baf66f6e228e718ea4e3e22cf680ae54470c39bdaf573e14a9ac0db7e8c91c44b49847b5bf601442bcfd8694de3990e6903eaeb1bf6230689002164637bf0ba7dcd97728c67768123c14f8fc41f321eaf6bd463615f9e502f0841d0661ff14427e6af7922542d62234ed70083e0cb17a72685566f8b4547ea00034ac252cf929a643ae14a7d532b706283bc768cbe58c438f65db66d5f66d28935942fcb77eeeb7508224c32f7edec35e0cc6e970e18bcfe3992a380bd52a758d9f20d1eac3606e6c3031c71b55ca3315fa5d7cf7c502c735cd58da3674ea2db88e1232f99a3cf330cff14f1744b0633d0cec98754fc9106e9b38f61433c8f75dbf718b55d7935f981d09acdaa84e4dca65cc38b2ee8ab2047771eeed256a1154cb70587e1cf815699b8ff6ed274c793616f89a13b2402b9d94d30ed670f5ef15fb7cfaf7e67ef5af570b12884618ae687309e35bbc6796b866032cd03a9af9e2dd706b98a484c502d86c48d97cf5638fa1d8b0aa190f70f4ec1b5b8c06f68a01e967e8aa0b88ae1ca84f6a9632df235fc4e3c9125678c13f813dc6d07b3a18b284eedb7661307273db653260c1be0f6a842aed45ed2c2a7478963934d5777243d22319597fa89a9db59624d229050c10bfacbeb65027cd
# - name: node.cert
# type: NodeOperationalCertificate
# description: ""
# cborHex: 82845820a0a32c47052755271d3ba14f4e44d8d5ec7fe6d55743a7982db5e67d70e0979e001902bf58403a2f841ae8ebdd751e6d52583963d8df37e05f3ec9225cc8ab160e38ad97296fe306e03a1240e7e704f260bed5a193ff69a6e6fa0526d6f0d4988b6b37ffc3075820da34b28ddcda277d264a7e5e5238996501cf76be0eacb555ab7a02d146b86b46
# - name: vrf.skey
# type: VrfSigningKey_PraosVRF
# description: VRF Signing Key
# cborHex: 5840823318989cf48897044629a22a27c8bf975215fe28161fc90cc42e9446a331be96a37ee0c4060a46ee0bf99fcba3460be133e7e343dd7d4144f67f2a6402e886

topology:
enabled: false
# config:
Expand All @@ -37,6 +54,7 @@ topology:
# - accessPoints: []
# advertise: false
# useLedgerAfterSlot: 83116868

storage:
# Suitable for preview and preprod, 250+ for mainnet
size: "24Gi"
Expand Down