Browse Source

Added parameter to disable vhostmonster in ingress

master
Fábio Kaiser Rauber 3 years ago
parent
commit
1df6d56a24
  1. 8
      charts/portalmodelo/v0.5.0/questions.yaml
  2. 4
      charts/portalmodelo/v0.5.0/templates/ingress.yaml
  3. 1
      charts/portalmodelo/v0.5.0/values.yaml

8
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

4
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}]'

1
charts/portalmodelo/v0.5.0/values.yaml

@ -73,6 +73,7 @@ ingress:
tls:
enabled: true
provider: letsencrypt
vhostmonster: true
# extra annotations only
annotations: {}

Loading…
Cancel
Save