diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 42036adcd0a70631605492a1e94d151d81931d20_dGVtcGxhdGVzL2luZ3Jlc3MueWFtbA==..07d511e4a0bb131115c065a0f1ad19ed4aa0c911_dGVtcGxhdGVzL2luZ3Jlc3MueWFtbA== 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -8,6 +8,9 @@ app.kubernetes.io/instance: {{ .Release.Name }} annotations: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + {{- if .Values.ingress.redirectToFromWww }} + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" + {{- end }} {{- with .Values.ingress.clusterIssuer }} cert-manager.io/cluster-issuer: {{ . }} {{- end }} @@ -28,6 +31,9 @@ tls: - hosts: - {{ .Values.host }} + {{- if .Values.ingress.redirectToFromWww }} + - www.{{ .Values.host }} + {{- end }} {{- if .Values.ingress.tlsSecret }} secretName: {{ .Release.Name }}-tls {{- end }} diff --git a/values.yaml b/values.yaml index 42036adcd0a70631605492a1e94d151d81931d20_dmFsdWVzLnlhbWw=..07d511e4a0bb131115c065a0f1ad19ed4aa0c911_dmFsdWVzLnlhbWw= 100644 --- a/values.yaml +++ b/values.yaml @@ -65,6 +65,7 @@ annotations: {} # noindex: true corsAllowOrigin: false # can be false, "*", "toto.example.org" … + redirectToFromWww: false # Additional ingresses additionalIngresses: []