Skip to content

Commit 737c1ed

Browse files
committed
[FIX] approach with nginx.conf
1 parent a2fccb9 commit 737c1ed

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

charts/adhoc-defaultbackend/v0.1.8/templates/deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,18 @@ spec:
6161
- mountPath: /usr/share/nginx/html/logo_adhoc.png
6262
name: nginx-index
6363
subPath: logo_adhoc.png
64+
- mountPath: /etc/nginx/nginx.conf
65+
name: nginx-config
66+
subPath: nginx.conf
6467
resources:
6568
{{- toYaml .Values.resources | nindent 12 }}
6669
volumes:
6770
- name: nginx-index
6871
configMap:
6972
name: {{ include "adhoc-defaultbackend.fullname" . }}-index
73+
- name: nginx-config
74+
configMap:
75+
name: {{ include "adhoc-defaultbackend.fullname" . }}-nginx-config
7076
affinity:
7177
nodeAffinity:
7278
requiredDuringSchedulingIgnoredDuringExecution:

charts/adhoc-defaultbackend/v0.1.8/templates/ingress.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ metadata:
1313
{{- include "adhoc-defaultbackend.labels" . | nindent 4 }}
1414
{{- with .Values.ingress.annotations }}
1515
annotations:
16-
nginx.ingress.kubernetes.io/rewrite-target: /$1
1716
{{- toYaml . | nindent 4 }}
1817
{{- end }}
1918
spec:
2019
rules:
2120
- http:
2221
paths:
23-
- path: /(.*)
24-
pathType: "ImplementationSpecific"
22+
- path: /
23+
pathType: "Prefix"
2524
backend:
2625
service:
2726
name: {{ include "adhoc-defaultbackend.fullname" . }}

0 commit comments

Comments
 (0)