2020 labels :
2121 app.kubernetes.io/name : {{ include "dingo.name" . }}
2222 app.kubernetes.io/instance : {{ .Release.Name }}
23+ {{- with .Values.podLabels }}
24+ {{- toYaml . | nindent 8 }}
25+ {{- end }}
26+ annotations :
27+ cluster-autoscaler.kubernetes.io/safe-to-evict : " false"
28+ kubectl.kubernetes.io/default-container : dingo
29+ {{- if .Values.blockProducer.enabled }}
30+ checksum/keys : {{ .Values.blockProducer.keys | toJson | sha256sum }}
31+ {{- end }}
32+ {{- if .Values.topology.enabled }}
33+ checksum/topology : {{ .Values.topology | toJson | sha256sum }}
34+ {{- end }}
35+ {{- if .Values.dingoConfig.enabled }}
36+ checksum/config : {{ .Values.dingoConfig.data | sha256sum }}
37+ {{- end }}
2338 spec :
24- serviceAccountName : {{ .Release.Name }}
39+ serviceAccountName : {{ .Values.serviceAccount.name | default .Release.Name }}
40+ {{- if .Values.affinity }}
41+ affinity : {{- toYaml .Values.affinity | nindent 8 }}
42+ {{- end }}
2543 {{- if .Values.tolerations }}
2644 tolerations : {{- toYaml .Values.tolerations | nindent 8 }}
2745 {{- end }}
@@ -165,6 +183,9 @@ spec:
165183 containers :
166184 - name : dingo
167185 command : ["dingo"]
186+ {{- if .Values.dingoConfig.enabled }}
187+ args : ["--config", "/etc/dingo/dingo.yaml"]
188+ {{- end }}
168189 image : {{ .Values.image.repository }}:{{ .Values.image.tag }}
169190 imagePullPolicy : {{ .Values.image.pullPolicy }}
170191 env :
@@ -174,21 +195,91 @@ spec:
174195 value : " {{ $value }}"
175196 {{- end }}
176197 {{- end }}
198+ {{- if not (index .Values.environment "CARDANO_CONFIG") }}
199+ - name : CARDANO_CONFIG
200+ value : " /opt/cardano/config/{{ .Values.environment.CARDANO_NETWORK }}/config.json"
201+ {{- end }}
202+ - name : CARDANO_TOPOLOGY
203+ value : " /opt/cardano/config/{{ .Values.environment.CARDANO_NETWORK }}/topology.json"
204+ {{- if .Values.blockProducer.enabled }}
205+ - name : CARDANO_BLOCK_PRODUCER
206+ value : " true"
207+ - name : CARDANO_SHELLEY_VRF_KEY
208+ value : " /keys/vrf.skey"
209+ - name : CARDANO_SHELLEY_KES_KEY
210+ value : " /keys/kes.skey"
211+ - name : CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE
212+ value : " /keys/node.cert"
213+ {{- if .Values.blockProducer.forgeSyncToleranceSlots }}
214+ - name : DINGO_FORGE_SYNC_TOLERANCE_SLOTS
215+ value : {{ .Values.blockProducer.forgeSyncToleranceSlots | quote }}
216+ {{- end }}
217+ {{- if .Values.blockProducer.forgeStaleGapThresholdSlots }}
218+ - name : DINGO_FORGE_STALE_GAP_THRESHOLD_SLOTS
219+ value : {{ .Values.blockProducer.forgeStaleGapThresholdSlots | quote }}
220+ {{- end }}
221+ {{- end }}
222+ - name : DINGO_SOCKET_PATH
223+ value : /ipc/dingo.socket
224+ - name : CARDANO_SOCKET_PATH
225+ value : /ipc/dingo.socket
226+ - name : CARDANO_NODE_SOCKET_PATH
227+ value : /ipc/dingo.socket
177228 ports :
178229 - name : private
179230 containerPort : {{ .Values.service.ports.private }}
180231 - name : relay
181232 containerPort : {{ .Values.environment.CARDANO_PORT | default .Values.service.ports.relay }}
182233 - name : utxorpc
183- containerPort : {{ .Values.environment.CARDANO_UTXORPC_PORT | default .Values.service.ports.utxorpc }}
234+ containerPort : {{ .Values.environment.DINGO_UTXORPC_PORT | default .Values.service.ports.utxorpc }}
184235 - name : metrics
185236 containerPort : {{ .Values.environment.CARDANO_METRICS_PORT | default .Values.service.ports.metrics }}
186237 volumeMounts :
187238 - name : dingo-data
188239 mountPath : {{ .Values.environment.CARDANO_DATABASE_PATH }}
240+ {{- if .Values.blockProducer.enabled }}
241+ - name : block-producer-keys
242+ mountPath : /keys
243+ readOnly : true
244+ {{- end }}
245+ {{- if .Values.topology.enabled }}
246+ - name : topology
247+ mountPath : /opt/cardano/config/{{ .Values.environment.CARDANO_NETWORK }}/topology.json
248+ subPath : topology.json
249+ readOnly : true
250+ {{- end }}
251+ - name : node-ipc
252+ mountPath : /ipc
253+ {{- if .Values.dingoConfig.enabled }}
254+ - name : dingo-config
255+ mountPath : /etc/dingo/dingo.yaml
256+ subPath : dingo.yaml
257+ readOnly : true
258+ {{- end }}
189259 {{- if .Values.resources }}
190260 resources : {{- toYaml .Values.resources | nindent 12 }}
191261 {{- end }}
262+ volumes :
263+ - name : node-ipc
264+ emptyDir : {}
265+ {{- if .Values.blockProducer.enabled }}
266+ - name : block-producer-keys
267+ secret :
268+ defaultMode : 0600
269+ secretName : {{ .Release.Name }}-secret
270+ {{- end }}
271+ {{- if .Values.topology.enabled }}
272+ - name : topology
273+ configMap :
274+ name : {{ include "dingo.fullname" . }}-topology
275+ defaultMode : 0644
276+ {{- end }}
277+ {{- if .Values.dingoConfig.enabled }}
278+ - name : dingo-config
279+ configMap :
280+ name : {{ include "dingo.fullname" . }}-config
281+ defaultMode : 0644
282+ {{- end }}
192283 volumeClaimTemplates :
193284 - metadata :
194285 name : dingo-data
0 commit comments