diff --git a/infrastructure/charts/node/templates/apisixroute-legacy.yaml b/infrastructure/charts/node/templates/apisixroute-legacy.yaml new file mode 100644 index 000000000..79b4f55f9 --- /dev/null +++ b/infrastructure/charts/node/templates/apisixroute-legacy.yaml @@ -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 -}} diff --git a/infrastructure/charts/node/templates/apisixroute.yaml b/infrastructure/charts/node/templates/apisixroute.yaml index e192ab8c8..1865f62ed 100644 --- a/infrastructure/charts/node/templates/apisixroute.yaml +++ b/infrastructure/charts/node/templates/apisixroute.yaml @@ -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: diff --git a/infrastructure/charts/node/templates/apisixupstream-legacy.yaml b/infrastructure/charts/node/templates/apisixupstream-legacy.yaml new file mode 100644 index 000000000..61af3d20f --- /dev/null +++ b/infrastructure/charts/node/templates/apisixupstream-legacy.yaml @@ -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 }} diff --git a/infrastructure/charts/node/templates/deployment.yaml b/infrastructure/charts/node/templates/deployment.yaml index 63d1294a5..bee9c4f48 100644 --- a/infrastructure/charts/node/templates/deployment.yaml +++ b/infrastructure/charts/node/templates/deployment.yaml @@ -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: @@ -111,3 +111,7 @@ spec: value: "15s:/metrics" - name: PROMETHEUS value: "true" + {{- range $key, $value := .Values.server.additionalEnvVariables }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} diff --git a/infrastructure/charts/node/values.yaml b/infrastructure/charts/node/values.yaml index a58b5af52..0e7578754 100644 --- a/infrastructure/charts/node/values.yaml +++ b/infrastructure/charts/node/values.yaml @@ -18,6 +18,7 @@ server: moveScheduledToPendingPeriod: 3s refereshAndSubmitPeriod: 3s confirmationBlocks: 1 + legacyMode: false image: repository: ghcr.io pullPolicy: IfNotPresent @@ -29,6 +30,7 @@ server: requests: cpu: 250m memory: 512Mi + additionalEnvVariables: [] database: postgres: