Skip to content

Commit d7b0b66

Browse files
committed
add specific ingress for grpc and grpc-web
1 parent 14175e4 commit d7b0b66

File tree

2 files changed

+61
-33
lines changed

2 files changed

+61
-33
lines changed

starship/charts/devnet/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.9.1
18+
version: 1.9.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

starship/charts/devnet/templates/ingress/ingress.yaml

Lines changed: 60 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ spec:
3131
- hosts:
3232
- "rpc.{{ $chain.id }}-genesis.{{ $host }}"
3333
secretName: rpc.{{ $chain.id }}-genesis.{{ $.Values.ingress.type }}-ingress-tls
34-
- hosts:
35-
- "grpc.{{ $chain.id }}-genesis.{{ $host }}"
36-
secretName: grpc.{{ $chain.id }}-genesis.{{ $.Values.ingress.type }}-ingress-tls
37-
- hosts:
38-
- "grpc-web.{{ $chain.id }}-genesis.{{ $host }}"
39-
secretName: grpc-web.{{ $chain.id }}-genesis.{{ $.Values.ingress.type }}-ingress-tls
4034
{{- end }}
4135
{{- range $frontend := $.Values.frontends }}
4236
- hosts:
@@ -103,32 +97,6 @@ spec:
10397
name: {{ $chain.id }}-genesis
10498
port:
10599
name: rpc
106-
- host: "grpc.{{ $chain.id }}-genesis.{{ $host }}"
107-
metadata:
108-
annotations:
109-
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
110-
http:
111-
paths:
112-
- pathType: ImplementationSpecific
113-
path: "/(.*)"
114-
backend:
115-
service:
116-
name: {{ $chain.id }}-genesis
117-
port:
118-
name: grpc
119-
- host: "grpc-web.{{ $chain.id }}-genesis.{{ $host }}"
120-
metadata:
121-
annotations:
122-
nginx.ingress.kubernetes.io/backend-protocol: "GRPC-WEB"
123-
http:
124-
paths:
125-
- pathType: ImplementationSpecific
126-
path: "/(.*)"
127-
backend:
128-
service:
129-
name: {{ $chain.id }}-genesis
130-
port:
131-
name: grpc-web
132100
{{- end }}
133101
{{- range $relayer := $.Values.relayers }}
134102
{{- if eq $relayer.type "hermes" }}
@@ -164,4 +132,64 @@ spec:
164132
name: http
165133
{{- end }}
166134
---
135+
apiVersion: networking.k8s.io/v1
136+
kind: Ingress
137+
metadata:
138+
name: {{ $.Values.ingress.type }}-grpc-ingress
139+
annotations:
140+
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
141+
nginx.ingress.kubernetes.io/use-regex: "true"
142+
cert-manager.io/issuer: "{{ $.Values.ingress.certManager.issuer }}"
143+
spec:
144+
ingressClassName: {{ $.Values.ingress.type }}
145+
tls:
146+
{{- range $chain := $.Values.chains }}
147+
- hosts:
148+
- "grpc.{{ $chain.id }}-genesis.{{ $host }}"
149+
secretName: grpc.{{ $chain.id }}-genesis.{{ $.Values.ingress.type }}-ingress-tls
150+
{{- end }}
151+
rules:
152+
{{- range $chain := $.Values.chains }}
153+
- host: "grpc.{{ $chain.id }}-genesis.{{ $host }}"
154+
http:
155+
paths:
156+
- pathType: ImplementationSpecific
157+
path: "/(.*)"
158+
backend:
159+
service:
160+
name: {{ $chain.id }}-genesis
161+
port:
162+
name: grpc
163+
{{- end }}
164+
---
165+
apiVersion: networking.k8s.io/v1
166+
kind: Ingress
167+
metadata:
168+
name: {{ $.Values.ingress.type }}-grpc-web-ingress
169+
annotations:
170+
nginx.ingress.kubernetes.io/backend-protocol: "GRPC-WEB"
171+
nginx.ingress.kubernetes.io/use-regex: "true"
172+
cert-manager.io/issuer: "{{ $.Values.ingress.certManager.issuer }}"
173+
spec:
174+
ingressClassName: {{ $.Values.ingress.type }}
175+
tls:
176+
{{- range $chain := $.Values.chains }}
177+
- hosts:
178+
- "grpc-web.{{ $chain.id }}-genesis.{{ $host }}"
179+
secretName: grpc-web.{{ $chain.id }}-genesis.{{ $.Values.ingress.type }}-ingress-tls
180+
{{- end }}
181+
rules:
182+
{{- range $chain := $.Values.chains }}
183+
- host: "grpc-web.{{ $chain.id }}-genesis.{{ $host }}"
184+
http:
185+
paths:
186+
- pathType: ImplementationSpecific
187+
path: "/(.*)"
188+
backend:
189+
service:
190+
name: {{ $chain.id }}-genesis
191+
port:
192+
name: grpc-web
193+
{{- end }}
194+
---
167195
{{- end }}

0 commit comments

Comments
 (0)