diff --git a/charts/portalmodelo/v0.5.0/questions.yaml b/charts/portalmodelo/v0.5.0/questions.yaml index f17220a..018dc2d 100644 --- a/charts/portalmodelo/v0.5.0/questions.yaml +++ b/charts/portalmodelo/v0.5.0/questions.yaml @@ -91,6 +91,14 @@ questions: - nginx - alb +- variable: ingress.vhostmonster + default: true + type: boolean + description: "Habilitar reescrita de URL para o VirtualHostMonster no Ingress?" + label: "VHostMonster no Ingress" + required: true + group: Ingress + # Configurações de Armazenamento - variable: persistence.accessMode default: ReadWriteOnce diff --git a/charts/portalmodelo/v0.5.0/templates/ingress.yaml b/charts/portalmodelo/v0.5.0/templates/ingress.yaml index 8196915..ca7cabd 100644 --- a/charts/portalmodelo/v0.5.0/templates/ingress.yaml +++ b/charts/portalmodelo/v0.5.0/templates/ingress.yaml @@ -20,7 +20,9 @@ metadata: cert-manager.io/cluster-issuer: "letsencrypt-prod" {{- end }} {{- if contains "nginx" .Values.ingress.class }} + {{- if .Values.ingress.vhostmonster -}} nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/https/{{ $hostPrefix }}.{{ $hostName }}:443{{ $zopeFolder }}portal/VirtualHostRoot/$1" + {{- end }} nginx.ingress.kubernetes.io/from-to-www-redirect: "true" nginx.ingress.kubernetes.io/service-upstream: "true" {{- end }} @@ -31,7 +33,9 @@ metadata: {{- else }} # DO NOT USE TLS {{- if contains "nginx" .Values.ingress.class }} + {{- if .Values.ingress.vhostmonster -}} nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/http/{{ $hostPrefix }}.{{ $hostName }}:80{{ $zopeFolder }}portal/VirtualHostRoot/$1" + {{- end }} {{- end }} {{- if contains "alb" .Values.ingress.class }} alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' diff --git a/charts/portalmodelo/v0.5.0/values.yaml b/charts/portalmodelo/v0.5.0/values.yaml index 698f9ee..3de35d2 100644 --- a/charts/portalmodelo/v0.5.0/values.yaml +++ b/charts/portalmodelo/v0.5.0/values.yaml @@ -73,6 +73,7 @@ ingress: tls: enabled: true provider: letsencrypt + vhostmonster: true # extra annotations only annotations: {}