Skip to content

Commit 4c22cca

Browse files
authored
Merge pull request #2476 from wireapp/bump-nginz-vts
//services/nginz/third_party/nginx-module-vts: update
2 parents 3e5aa1f + 2801cb7 commit 4c22cca

File tree

8 files changed

+57
-33
lines changed

8 files changed

+57
-33
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The `nginz{-tcp,-http}` services have been unified into a `nginz` service, and
2+
moved into the nginz chart.
3+
4+
The nginz-ingress-services chart simply targets the `nginz` service, so there's
5+
no need to set matching `service.nginz.external{Http,Tcp}Port` inside the
6+
`nginx-ingress-services` chart anymore.
7+
8+
The `config.http.httpPort` and `config.ws.wsPort` values in the `nginz` chart
9+
still configure the ports the `nginz` service is listening on.
10+
11+
The `nginz` chart also gained support for `metrics.serviceMonitor.enabled`,
12+
creating a `ServiceMonitor` resource to scrape metrics, like for other wire
13+
services.
14+
15+
(#2476)

charts/nginx-ingress-services/templates/ingress.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ spec:
3232
paths:
3333
- path: /
3434
backend:
35-
serviceName: nginz-http
36-
servicePort: {{ .Values.service.nginz.externalHttpPort }}
35+
serviceName: nginz
36+
servicePort: http
3737
{{- if .Values.websockets.enabled }}
3838
- host: {{ .Values.config.dns.ssl }}
3939
http:
4040
paths:
4141
- path: /
4242
backend:
43-
serviceName: nginz-tcp
44-
servicePort: {{ .Values.service.nginz.externalTcpPort }}
43+
serviceName: nginz
44+
servicePort: ws
4545
{{- end }}
4646
{{- if .Values.webapp.enabled }}
4747
- host: {{ .Values.config.dns.webapp }}

charts/nginx-ingress-services/templates/service.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
# FUTUREWORK: move services into the respective charts
2-
apiVersion: v1
3-
kind: Service
4-
metadata:
5-
name: nginz-http
6-
spec:
7-
type: ClusterIP
8-
ports:
9-
- port: {{ .Values.service.nginz.externalHttpPort }}
10-
targetPort: 8080
11-
selector:
12-
app: nginz
13-
{{- if .Values.websockets.enabled }}
14-
---
15-
apiVersion: v1
16-
kind: Service
17-
metadata:
18-
name: nginz-tcp
19-
spec:
20-
type: ClusterIP
21-
ports:
22-
- port: {{ .Values.service.nginz.externalTcpPort }}
23-
targetPort: 8081
24-
selector:
25-
app: nginz
26-
{{- end }}
272
{{- if .Values.webapp.enabled }}
283
---
294
apiVersion: v1

charts/nginx-ingress-services/values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ certManager:
8080
customSolvers:
8181

8282
service:
83-
nginz:
84-
externalHttpPort: 8080
85-
externalTcpPort: 8081
8683
webapp:
8784
externalPort: 8080
8885
s3:

charts/nginz/templates/service.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: nginz
5+
spec:
6+
type: ClusterIP
7+
ports:
8+
- name: http
9+
port: {{ .Values.config.http.httpPort }}
10+
targetPort: 8080
11+
- name: ws
12+
port: {{ .Values.config.ws.wsPort }}
13+
targetPort: 8081
14+
selector:
15+
app: nginz
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{- if .Values.metrics.serviceMonitor.enabled }}
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: ServiceMonitor
4+
metadata:
5+
name: nginz
6+
labels:
7+
app: nginz
8+
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
9+
release: {{ .Release.Name }}
10+
heritage: {{ .Release.Service }}
11+
spec:
12+
endpoints:
13+
- port: http
14+
path: /vts/status/format/prometheus
15+
selector:
16+
matchLabels:
17+
app: nginz
18+
release: {{ .Release.Name }}
19+
{{- end }}

charts/nginz/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ resources:
66
limits:
77
memory: "1024Mi"
88
cpu: "2"
9+
metrics:
10+
serviceMonitor:
11+
enabled: false
912
images:
1013
nginzDisco:
1114
repository: quay.io/wire/nginz_disco

0 commit comments

Comments
 (0)