Skip to content

Commit 7a7395e

Browse files
tommytroenybelMekk
andcommittedFeb 4, 2025··
feat: add ingress for grpc
Co-authored-by: ybelmekk <youssef.bel.mekki@nav.no>
1 parent 0487403 commit 7a7395e

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed
 

‎charts/Feature.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
environmentKinds:
22
- management
33
values:
4-
4+
5+
ingress.host:
6+
displayName: Ingress host
7+
config:
8+
type: string
9+
computed:
10+
template: '"{{ subdomain . "vulnerabilities" }}"'
11+
512
image.tag:
613
displayName: Image tag
714
config:

‎charts/templates/ingress.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: {{ include "v13s.name" . }}-grpc
5+
labels:
6+
{{- include "v13s.labels" . | nindent 4 }}
7+
annotations:
8+
nginx.ingress.kubernetes.io/backend-protocol: GRPC
9+
nginx.ingress.kubernetes.io/use-regex: "true"
10+
nginx.ingress.kubernetes.io/server-snippet: |
11+
grpc_read_timeout 86400s;
12+
grpc_send_timeout 86400s;
13+
client_body_timeout 86400s;
14+
grpc_next_upstream_tries 2;
15+
spec:
16+
ingressClassName: {{ .Values.ingress.className }}
17+
rules:
18+
- host: {{ .Values.ingress.host | quote }}
19+
http:
20+
paths:
21+
- path: /
22+
pathType: ImplementationSpecific
23+
backend:
24+
service:
25+
name: {{ include "v13s.fullname" . }}
26+
port:
27+
name: grpc
28+
number: 3001

‎charts/values.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ image:
66
serviceAccountEmail:
77
serviceAccountName: v13s-sa
88
updateInterval: 1h
9+
ingress:
10+
className: nais-ingress
11+
host: ""
912
dependencytrack:
10-
url:
11-
apikey:
13+
url:
14+
apikey:
1215
database:
1316
instance:
1417
public_ip:

0 commit comments

Comments
 (0)
Please sign in to comment.