Browse Source

Added ingress.tls parameter, to enable or disable tls

master
Fábio Kaiser Rauber 4 years ago
parent
commit
7a13c54558
  1. 9
      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

9
charts/portalmodelo/v0.5.0/questions.yaml

@ -52,6 +52,15 @@ questions:
group: Básico
required: true
# Ingress
- variable: ingress.tls
default: true
type: boolean
description: "Habilitar criptografia do protocolo HTTP (HTTPS)?"
label: "Habilitar TLS?"
required: false
group: Ingress
# Configurações Avançadas
- variable: portal.timeZone
default: "America/Sao_Paulo"

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

@ -12,15 +12,19 @@ metadata:
labels:
{{- include "portalmodelo.labels" . | nindent 4 }}
annotations:
{{- if .Values.ingress.tls -}}
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/https/www.{{ $hostName }}:443/portal/VirtualHostRoot/$1"
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end}}
spec:
{{- if .Values.ingress.tls -}}
tls:
- hosts:
- "www.{{ $hostName }}"
- "{{ $hostName }}"
secretName: {{ $hostName | replace "." "-" }}-tls
{{- end -}}
rules:
- host: "www.{{ $hostName }}"
http:

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

@ -53,6 +53,7 @@ securityContext: {}
ingress:
enabled: true
tls: true
# extra annotations only
annotations: {}

Loading…
Cancel
Save