|
@ -13,12 +13,32 @@ metadata: |
|
|
{{- include "portalmodelo.labels" . | nindent 4 }} |
|
|
{{- include "portalmodelo.labels" . | nindent 4 }} |
|
|
annotations: |
|
|
annotations: |
|
|
{{- if .Values.ingress.tls.enabled }} |
|
|
{{- if .Values.ingress.tls.enabled }} |
|
|
|
|
|
# USE TLS |
|
|
{{- if contains "letsencrypt" .Values.ingress.tls.provider }} |
|
|
{{- if contains "letsencrypt" .Values.ingress.tls.provider }} |
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod" |
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod" |
|
|
{{- end }} |
|
|
{{- end }} |
|
|
|
|
|
{{- if contains "nginx" .Values.ingress.class }} |
|
|
nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/https/www.{{ $hostName }}:443/portal/VirtualHostRoot/$1" |
|
|
nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/https/www.{{ $hostName }}:443/portal/VirtualHostRoot/$1" |
|
|
nginx.ingress.kubernetes.io/from-to-www-redirect: "true" |
|
|
nginx.ingress.kubernetes.io/from-to-www-redirect: "true" |
|
|
{{- end }} |
|
|
{{- end }} |
|
|
|
|
|
{{- if contains "alb" .Values.ingress.class }} |
|
|
|
|
|
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]' |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- else }} |
|
|
|
|
|
# DO NOT USE TLS |
|
|
|
|
|
{{- if contains "nginx" .Values.ingress.class }} |
|
|
|
|
|
nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/http/www.{{ $hostName }}:80/portal/VirtualHostRoot/$1" |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- if contains "alb" .Values.ingress.class }} |
|
|
|
|
|
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- if contains "alb" .Values.ingress.class }} |
|
|
|
|
|
alb.ingress.kubernetes.io/group.name: pm |
|
|
|
|
|
alb.ingress.kubernetes.io/scheme: internet-facing |
|
|
|
|
|
alb.ingress.kubernetes.io/target-type: ip |
|
|
|
|
|
kubernetes.io/ingress.class: alb |
|
|
|
|
|
{{- end }} |
|
|
spec: |
|
|
spec: |
|
|
{{- if .Values.ingress.tls.enabled }} |
|
|
{{- if .Values.ingress.tls.enabled }} |
|
|
tls: |
|
|
tls: |
|
@ -31,7 +51,11 @@ spec: |
|
|
- host: "www.{{ $hostName }}" |
|
|
- host: "www.{{ $hostName }}" |
|
|
http: |
|
|
http: |
|
|
paths: |
|
|
paths: |
|
|
|
|
|
{{- if contains "nginx" .Values.ingress.class }} |
|
|
- path: /(.*) |
|
|
- path: /(.*) |
|
|
|
|
|
{{- else }} |
|
|
|
|
|
- path: /* |
|
|
|
|
|
{{- end }} |
|
|
backend: |
|
|
backend: |
|
|
serviceName: {{ $fullName }}-plone |
|
|
serviceName: {{ $fullName }}-plone |
|
|
servicePort: 8080 |
|
|
servicePort: 8080 |
|
|