Browse Source

fix host name www

pull/116/head
selmankoc 4 years ago
parent
commit
887720066b
  1. 13
      etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml
  2. 2
      etc/k8s/eshoponabp/values.azure.yaml

13
etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml

@ -8,25 +8,34 @@ metadata:
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
{{- if eq .Release.Name "eshop-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }}
spec:
ingressClassName: nginx
tls:
- hosts:
- {{ .Values.ingress.host }}
{{- if eq .Release.Name "eshop-az" }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
{{- if eq .Release.Name "eshop-az" }}
secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls
{{- else }}
secretName: {{ .Values.ingress.tlsSecret }}
{{- end }}
rules:
{{- if eq .Release.Name "eshop-az" }}
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.ingress.host }}"
{{- end }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-{{ .Chart.Name }}
port:
number: 80
number: 80

2
etc/k8s/eshoponabp/values.azure.yaml

@ -52,7 +52,7 @@ public-web:
elasticsearchHost: eshop-az-elasticsearch
ingress:
host: www.eshoponabp.com
host: eshoponabp.com
image:
repository: "volocr.azurecr.io/eshoponabp/app-publicweb"
tag: 1.0.0

Loading…
Cancel
Save