Skip to content

Commit

Permalink
feat: enable legacy prism node (#828)
Browse files Browse the repository at this point in the history
* feat: support adding environment vars from helm

Signed-off-by: Kranium Gikos Mendoza <kraniumgikos.mendoza@iohk.io>

* fix: cardanoWallet hostname

Signed-off-by: Kranium Gikos Mendoza <kraniumgikos.mendoza@iohk.io>

* fix: apisix changes to enable prism v1.4

Signed-off-by: Kranium Gikos Mendoza <kraniumgikos.mendoza@iohk.io>

---------

Signed-off-by: Kranium Gikos Mendoza <kraniumgikos.mendoza@iohk.io>
  • Loading branch information
womfoo authored Jan 15, 2024
1 parent 30a8164 commit 15e6865
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
28 changes: 28 additions & 0 deletions infrastructure/charts/node/templates/apisixroute-legacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if and (.Values.ingress.enabled) (.Values.server.legacyMode) }}
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: node-route
namespace: "{{ .Release.Namespace }}"
labels:
{{ template "labels.common" . }}
spec:
http:
- name: node-rule
match:
hosts:
{{- range .Values.ingress.applicationUrls }}
- {{ . }}
{{- end }}
paths:
- /*
backends:
- serviceName: node-service
servicePort: 50053
resolveGranularity: service
plugins:
- name: redirect
enable: true
config:
http_to_https: true
{{- end -}}
2 changes: 1 addition & 1 deletion infrastructure/charts/node/templates/apisixroute.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.ingress.enabled }}
{{- if and (.Values.ingress.enabled) (not .Values.server.legacyMode) }}
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
Expand Down
11 changes: 11 additions & 0 deletions infrastructure/charts/node/templates/apisixupstream-legacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.ingress.enabled }}
apiVersion: apisix.apache.org/v2
kind: ApisixUpstream
metadata:
name: node-service
namespace: "{{ .Release.Namespace }}"
spec:
portLevelSettings:
- port: 50053
scheme: grpc
{{- end }}
6 changes: 5 additions & 1 deletion infrastructure/charts/node/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
- name: NODE_CARDANO_CONFIRMATION_BLOCKS
value: {{ .Values.server.confirmationBlocks | quote }}
- name: NODE_CARDANO_WALLET_API_HOST
value: "{{ .Values.vdr.cardanoNode }}.{{ .Values.cardanoNamespace }}"
value: "{{ .Values.vdr.cardanoNode }}.{{ .Values.vdr.cardanoNamespace }}"
- name: NODE_CARDANO_WALLET_ID
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -111,3 +111,7 @@ spec:
value: "15s:/metrics"
- name: PROMETHEUS
value: "true"
{{- range $key, $value := .Values.server.additionalEnvVariables }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
2 changes: 2 additions & 0 deletions infrastructure/charts/node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ server:
moveScheduledToPendingPeriod: 3s
refereshAndSubmitPeriod: 3s
confirmationBlocks: 1
legacyMode: false
image:
repository: ghcr.io
pullPolicy: IfNotPresent
Expand All @@ -29,6 +30,7 @@ server:
requests:
cpu: 250m
memory: 512Mi
additionalEnvVariables: []

database:
postgres:
Expand Down

0 comments on commit 15e6865

Please sign in to comment.