Browse Source

New parameter to specify zope folder for portal object

master
Fábio Kaiser Rauber 3 years ago
parent
commit
6f7756e092
  1. 8
      charts/portalmodelo/v0.5.0/questions.yaml
  2. 5
      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

@ -149,6 +149,14 @@ questions:
required: false required: false
group: Avançado group: Avançado
- variable: portal.zopefolder
default: "/"
type: string
description: "Diretório no Zope onde está armazenado o portal. Precisa terminar com barra '/'."
label: "Zope Folder"
required: false
group: Avançado
- variable: instance.zeoclient - variable: instance.zeoclient
default: true default: true
type: boolean type: boolean

5
charts/portalmodelo/v0.5.0/templates/ingress.yaml

@ -2,6 +2,7 @@
{{- $fullName := include "portalmodelo.fullname" . -}} {{- $fullName := include "portalmodelo.fullname" . -}}
{{- $hostName := .Values.portal.hostname -}} {{- $hostName := .Values.portal.hostname -}}
{{- $hostPrefix := .Values.portal.hostprefix -}} {{- $hostPrefix := .Values.portal.hostprefix -}}
{{- $zopeFolder := .Values.portal.zopefolder -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1 apiVersion: networking.k8s.io/v1beta1
{{- else -}} {{- else -}}
@ -19,7 +20,7 @@ metadata:
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
{{- end }} {{- end }}
{{- if contains "nginx" .Values.ingress.class }} {{- if contains "nginx" .Values.ingress.class }}
nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/https/{{ $hostPrefix }}.{{ $hostName }}:443/portal/VirtualHostRoot/$1" nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/https/{{ $hostPrefix }}.{{ $hostName }}:443{{ $zopeFolder }}portal/VirtualHostRoot/$1"
nginx.ingress.kubernetes.io/from-to-www-redirect: "true" nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
nginx.ingress.kubernetes.io/service-upstream: "true" nginx.ingress.kubernetes.io/service-upstream: "true"
{{- end }} {{- end }}
@ -30,7 +31,7 @@ metadata:
{{- else }} {{- else }}
# DO NOT USE TLS # DO NOT USE TLS
{{- if contains "nginx" .Values.ingress.class }} {{- if contains "nginx" .Values.ingress.class }}
nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/http/{{ $hostPrefix }}.{{ $hostName }}:80/portal/VirtualHostRoot/$1" nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/http/{{ $hostPrefix }}.{{ $hostName }}:80{{ $zopeFolder }}portal/VirtualHostRoot/$1"
{{- end }} {{- end }}
{{- if contains "alb" .Values.ingress.class }} {{- if contains "alb" .Values.ingress.class }}
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]'

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

@ -41,6 +41,7 @@ portal:
hostprefix: www hostprefix: www
timeZone: America/Sao_Paulo timeZone: America/Sao_Paulo
createAndUpgrade: true createAndUpgrade: true
zopefolder: '/'
instance: instance:
zodbCacheSize: 1000 zodbCacheSize: 1000

Loading…
Cancel
Save