Skip to content

Commit 15de7a7

Browse files
committed
Enable rest-java endpoint by default
Signed-off-by: sdimitrov9 <[email protected]>
1 parent b75c3c8 commit 15de7a7

File tree

2 files changed

+16
-49
lines changed

2 files changed

+16
-49
lines changed

charts/hedera-mirror-rest-java/templates/ingress.yaml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,16 @@ spec:
2323
http:
2424
paths:
2525
{{- range .paths }}
26-
{{- $pathEnabled := false -}}
27-
{{- if eq .path "/api/v1/accounts/(\\d+\\.){0,2}(\\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/allowances/nfts" }}
28-
{{- $pathEnabled = $.Values.gateway.endpoints.accounts.allowances.nfts.enabled -}}
29-
{{- else if eq .path "/api/v1/accounts/(\\d+\\.){0,2}(\\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/airdrops/outstanding" }}
30-
{{- $pathEnabled = $.Values.gateway.endpoints.accounts.airdrops.outstanding.enabled -}}
31-
{{- else if eq .path "/api/v1/accounts/(\\d+\\.){0,2}(\\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/airdrops/pending" }}
32-
{{- $pathEnabled = $.Values.gateway.endpoints.accounts.airdrops.pending.enabled -}}
33-
{{- else if eq .path "/api/v1/topics/(\\d+\\.){0,2}\\d+$" }}
34-
{{- $pathEnabled = $.Values.gateway.endpoints.topics.enabled -}}
35-
{{- end }}
36-
{{- if $pathEnabled }}
37-
- path: {{ .path }}
38-
pathType: {{ .type | default "ImplementationSpecific" }}
39-
backend:
40-
service:
41-
name: {{ $fullName }}
42-
port:
43-
number: {{ $servicePort }}
44-
{{- end }}
26+
{{- if or (empty .condition) (eq (tpl .condition $) "true") }}
27+
- path: {{ .path }}
28+
pathType: {{ .type | default "ImplementationSpecific" }}
29+
backend:
30+
service:
31+
name: {{ $fullName }}
32+
port:
33+
number: {{ $servicePort }}
4534
{{- end }}
35+
{{- end }}
4636
{{- end }}
4737
{{- if .Values.ingress.tls.enabled }}
4838
tls:

charts/hedera-mirror-rest-java/values.yaml

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,10 @@ envFrom: []
4646

4747
fullnameOverride: ""
4848

49-
gateway:
50-
endpoints:
51-
accounts:
52-
allowances:
53-
nfts:
54-
enabled: true
55-
airdrops:
56-
outstanding:
57-
enabled: true
58-
pending:
59-
enabled: true
60-
topics:
61-
enabled: true
49+
routes:
50+
networkStake: false
6251

52+
gateway:
6353
gcp:
6454
backendPolicy:
6555
connectionDraining:
@@ -85,25 +75,10 @@ gateway:
8575
name: "{{ include \"hedera-mirror-rest-java.fullname\" $ }}"
8676
port: 80
8777
matches: |
88-
{{- if .Values.gateway.endpoints.accounts.allowances.nfts.enabled }}
89-
- path:
90-
type: RegularExpression # GKE does not yet support RegularExpression type
91-
value: '/api/v1/accounts/(\d+\.){0,2}(\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/allowances/nfts'
92-
{{- end }}
93-
{{- if .Values.gateway.endpoints.accounts.airdrops.outstanding.enabled }}
94-
- path:
95-
type: RegularExpression
96-
value: '/api/v1/accounts/(\d+\.){0,2}(\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/airdrops/outstanding'
97-
{{- end }}
98-
{{- if .Values.gateway.endpoints.accounts.airdrops.pending.enabled }}
99-
- path:
100-
type: RegularExpression
101-
value: '/api/v1/accounts/(\d+\.){0,2}(\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/airdrops/pending'
102-
{{- end }}
103-
{{- if .Values.gateway.endpoints.topics.enabled }}
78+
{{- if .Values.routes.networkStake }}
10479
- path:
10580
type: RegularExpression
106-
value: '/api/v1/topics/(\d+\.){0,2}\d+$'
81+
value: '/api/v1/network/stake$'
10782
{{- end }}
10883
target:
10984
group: ""
@@ -153,6 +128,8 @@ ingress:
153128
- path: '/api/v1/accounts/(\d+\.){0,2}(\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/airdrops/outstanding'
154129
- path: '/api/v1/accounts/(\d+\.){0,2}(\d+|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))/airdrops/pending'
155130
- path: '/api/v1/topics/(\d+\.){0,2}\d+$'
131+
- path: '/api/v1/network/stake$'
132+
condition: "{{ .Values.routes.networkStake }}"
156133
tls:
157134
enabled: false
158135
secretName: ""

0 commit comments

Comments
 (0)