diff --git a/.hgtags b/.hgtags index ae06f1bbee9d3d5f0e9eac02f38eb29b5cb46cf4_LmhndGFncw==..f08919549ff5e60bb2ca777274f8cbf80aba4565_LmhndGFncw== 100644 --- a/.hgtags +++ b/.hgtags @@ -8,3 +8,4 @@ 0b0bb2091bd728b1da6a9b780974e5fe2d588960 0.2.0 0510e6f3ef2a489c603fd8dbe4976a89991e1c39 0.2.1 60a8fadc3464197836ccbc8c439d65afe37b4a8b 0.2.2 +a2909d42f1c678b0639ff299cb10f596d3443edb 0.3.0 diff --git a/Chart.yaml b/Chart.yaml index ae06f1bbee9d3d5f0e9eac02f38eb29b5cb46cf4_Q2hhcnQueWFtbA==..f08919549ff5e60bb2ca777274f8cbf80aba4565_Q2hhcnQueWFtbA== 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,4 +2,4 @@ name: web-app description: A Helm chart for web applitations type: application -version: 0.2.2 +version: 0.3.0 diff --git a/templates/ingress.yaml b/templates/ingress.yaml index ae06f1bbee9d3d5f0e9eac02f38eb29b5cb46cf4_dGVtcGxhdGVzL2luZ3Jlc3MueWFtbA==..f08919549ff5e60bb2ca777274f8cbf80aba4565_dGVtcGxhdGVzL2luZ3Jlc3MueWFtbA== 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -7,5 +7,4 @@ app.kubernetes.io/name: {{ .Values.appName }} app.kubernetes.io/instance: {{ .Release.Name }} annotations: - kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/force-ssl-redirect: "true" @@ -11,7 +10,10 @@ 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 }} {{- with .Values.ingress.annotations }} {{- toYaml . | nindent 4 }} {{- end }} @@ -12,12 +14,16 @@ {{- with .Values.ingress.clusterIssuer }} cert-manager.io/cluster-issuer: {{ . }} {{- end }} {{- with .Values.ingress.annotations }} {{- toYaml . | nindent 4 }} {{- end }} + {{- if .Values.ingress.corsAllowOrigin }} + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/cors-allow-origin: "{{ .Values.ingress.corsAllowOrigin }}" + {{- end}} {{- $noindex := .Values.ingress.noindex | required ".Values.ingress.noindex is required." -}} {{- if .Values.ingress.noindex }} nginx.ingress.kubernetes.io/server-snippet: |- add_header X-Robots-Tag "noindex, nofollow"; {{- end}} spec: @@ -18,9 +24,10 @@ {{- $noindex := .Values.ingress.noindex | required ".Values.ingress.noindex is required." -}} {{- if .Values.ingress.noindex }} nginx.ingress.kubernetes.io/server-snippet: |- add_header X-Robots-Tag "noindex, nofollow"; {{- end}} spec: + ingressClassName: nginx tls: - hosts: - {{ .Values.host }} @@ -24,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 ae06f1bbee9d3d5f0e9eac02f38eb29b5cb46cf4_dmFsdWVzLnlhbWw=..f08919549ff5e60bb2ca777274f8cbf80aba4565_dmFsdWVzLnlhbWw= 100644 --- a/values.yaml +++ b/values.yaml @@ -64,6 +64,8 @@ path: / annotations: {} # noindex: true + corsAllowOrigin: false # can be false, "*", "toto.example.org" … + redirectToFromWww: false # Additional ingresses additionalIngresses: []