Skip to content

Commit ff8f1f9

Browse files
authored
injecting gateway and virtual service configs based on provided dev settings (#61)
* added k8s manifests for gateway and virtual service based on provided dev config * correcting location to service to include namespace correctly * correcting names to indicate ingress context better
1 parent ddaef71 commit ff8f1f9

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- if not (hasKey .Values.api.service "gateways") }}
2+
apiVersion: networking.istio.io/v1
3+
kind: Gateway
4+
metadata:
5+
name: {{ include "npl.svc.name" . }}-gw
6+
spec:
7+
selector:
8+
app: {{ .Values.o11y.istio.ingress.selector }}
9+
servers:
10+
- port:
11+
number: 80
12+
name: http
13+
protocol: HTTP2
14+
hosts:
15+
- '*'
16+
{{- end }}
File renamed without changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: networking.istio.io/v1
2+
kind: VirtualService
3+
metadata:
4+
name: {{ include "npl.svc.name" . }}-vs
5+
spec:
6+
gateways:
7+
{{- if not (hasKey .Values.api.service "gateways") }}
8+
- {{ include "npl.svc.name" . }}-gw
9+
{{- else }}
10+
{{- toYaml .Values.api.service.gateways | nindent 2 }}
11+
{{- end }}
12+
hosts:
13+
- '*'
14+
http:
15+
- name: {{ .Values.api.k8s.impl }}-default-route
16+
match:
17+
- uri:
18+
prefix: "/"
19+
route:
20+
- destination:
21+
host: {{ .Values.api.k8s.impl }}.{{ include "npl.svc.namespace" . }}.svc.cluster.local
22+
port:
23+
number: {{ .Values.api.container.port }}

charts/meta-chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
o11y:
22
istio:
33
namespace: "istio-system"
4+
ingress:
5+
selector: "istio-gateway"
46
nopo11y:
57
enabled: true
68
namespace: "observability"

0 commit comments

Comments
 (0)