Skip to content

Commit 15e6865

Browse files
authored
feat: enable legacy prism node (#828)
* feat: support adding environment vars from helm Signed-off-by: Kranium Gikos Mendoza <[email protected]> * fix: cardanoWallet hostname Signed-off-by: Kranium Gikos Mendoza <[email protected]> * fix: apisix changes to enable prism v1.4 Signed-off-by: Kranium Gikos Mendoza <[email protected]> --------- Signed-off-by: Kranium Gikos Mendoza <[email protected]>
1 parent 30a8164 commit 15e6865

File tree

5 files changed

+47
-2
lines changed

5 files changed

+47
-2
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{- if and (.Values.ingress.enabled) (.Values.server.legacyMode) }}
2+
apiVersion: apisix.apache.org/v2
3+
kind: ApisixRoute
4+
metadata:
5+
name: node-route
6+
namespace: "{{ .Release.Namespace }}"
7+
labels:
8+
{{ template "labels.common" . }}
9+
spec:
10+
http:
11+
- name: node-rule
12+
match:
13+
hosts:
14+
{{- range .Values.ingress.applicationUrls }}
15+
- {{ . }}
16+
{{- end }}
17+
paths:
18+
- /*
19+
backends:
20+
- serviceName: node-service
21+
servicePort: 50053
22+
resolveGranularity: service
23+
plugins:
24+
- name: redirect
25+
enable: true
26+
config:
27+
http_to_https: true
28+
{{- end -}}

infrastructure/charts/node/templates/apisixroute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.ingress.enabled }}
1+
{{- if and (.Values.ingress.enabled) (not .Values.server.legacyMode) }}
22
apiVersion: apisix.apache.org/v2
33
kind: ApisixRoute
44
metadata:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- if .Values.ingress.enabled }}
2+
apiVersion: apisix.apache.org/v2
3+
kind: ApisixUpstream
4+
metadata:
5+
name: node-service
6+
namespace: "{{ .Release.Namespace }}"
7+
spec:
8+
portLevelSettings:
9+
- port: 50053
10+
scheme: grpc
11+
{{- end }}

infrastructure/charts/node/templates/deployment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
- name: NODE_CARDANO_CONFIRMATION_BLOCKS
4949
value: {{ .Values.server.confirmationBlocks | quote }}
5050
- name: NODE_CARDANO_WALLET_API_HOST
51-
value: "{{ .Values.vdr.cardanoNode }}.{{ .Values.cardanoNamespace }}"
51+
value: "{{ .Values.vdr.cardanoNode }}.{{ .Values.vdr.cardanoNamespace }}"
5252
- name: NODE_CARDANO_WALLET_ID
5353
valueFrom:
5454
secretKeyRef:
@@ -111,3 +111,7 @@ spec:
111111
value: "15s:/metrics"
112112
- name: PROMETHEUS
113113
value: "true"
114+
{{- range $key, $value := .Values.server.additionalEnvVariables }}
115+
- name: {{ $key }}
116+
value: {{ $value | quote }}
117+
{{- end }}

infrastructure/charts/node/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ server:
1818
moveScheduledToPendingPeriod: 3s
1919
refereshAndSubmitPeriod: 3s
2020
confirmationBlocks: 1
21+
legacyMode: false
2122
image:
2223
repository: ghcr.io
2324
pullPolicy: IfNotPresent
@@ -29,6 +30,7 @@ server:
2930
requests:
3031
cpu: 250m
3132
memory: 512Mi
33+
additionalEnvVariables: []
3234

3335
database:
3436
postgres:

0 commit comments

Comments
 (0)