Skip to content

Commit 7de1696

Browse files
committed
fix(Ingress): Move non-existing part to service to reduce error logging noise
1 parent 1ce8220 commit 7de1696

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

chart/templates/ingress.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ spec:
4242
name: {{ include "ots.fullname" . }}
4343
port:
4444
name: app
45-
# redirect metrics path to non existing service to prevent public access: That will return a "503 Service Temporarily Unavailable" on that specific URL
45+
# redirect metrics path to non existing service port to prevent public access: That will return a "503 Service Temporarily Unavailable" on that specific URL
4646
- path: /metrics
4747
pathType: Prefix
4848
backend:
4949
service:
50-
name: {{ include "ots.fullname" . }}-non-existing
50+
name: {{ include "ots.fullname" . }}
5151
port:
52-
name: app
53-
{{- end }}
52+
name: non-existing
53+
{{- end }}

chart/templates/service-app.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,9 @@ spec:
1111
targetPort: ots-tcp
1212
protocol: TCP
1313
name: app
14+
- port: 9999
15+
targetPort: non-existing
16+
protocol: TCP
17+
name: non-existing
1418
selector:
15-
{{- include "ots.selectorLabels" . | nindent 4 }}
19+
{{- include "ots.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)