diff --git a/charts/portalmodelo/v0.5.0/questions.yaml b/charts/portalmodelo/v0.5.0/questions.yaml index f9e2bb4..1ce0d56 100644 --- a/charts/portalmodelo/v0.5.0/questions.yaml +++ b/charts/portalmodelo/v0.5.0/questions.yaml @@ -53,13 +53,25 @@ questions: required: true # Ingress -- variable: ingress.tls +- variable: ingress.tls.enabled default: true type: boolean description: "Habilitar criptografia do protocolo HTTP (HTTPS)?" label: "Habilitar TLS?" required: false group: Ingress + show_subquestion_if: true + subquestions: + - variable: ingress.tls.provider + default: letsencrypt + type: enum + description: "Qual provedor de certificados utilizar?" + label: "Provedor de certificados" + required: false + group: Ingress + options: + - letsencrypt + - aws # Configurações Avançadas - variable: portal.timeZone diff --git a/charts/portalmodelo/v0.5.0/templates/NOTES.txt b/charts/portalmodelo/v0.5.0/templates/NOTES.txt index 0a1428b..8e73d59 100644 --- a/charts/portalmodelo/v0.5.0/templates/NOTES.txt +++ b/charts/portalmodelo/v0.5.0/templates/NOTES.txt @@ -1,7 +1,7 @@ 1. Seu Portal Modelo pode ser acessado através da URL: {{- if .Values.ingress.enabled }} {{- range .Values.ingress.hosts }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} + http{{ if $.Values.ingress.tls.enabled }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} {{- end }} {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "portalmodelo.fullname" . }}) diff --git a/charts/portalmodelo/v0.5.0/templates/ingress.yaml b/charts/portalmodelo/v0.5.0/templates/ingress.yaml index 9d2f06d..6787292 100644 --- a/charts/portalmodelo/v0.5.0/templates/ingress.yaml +++ b/charts/portalmodelo/v0.5.0/templates/ingress.yaml @@ -12,13 +12,15 @@ metadata: labels: {{- include "portalmodelo.labels" . | nindent 4 }} annotations: - {{- if .Values.ingress.tls }} + {{- if .Values.ingress.tls.enabled }} + {{- if contains "letsencrypt" .Values.ingress.tls.provider }} cert-manager.io/cluster-issuer: "letsencrypt-prod" + {{- end }} nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/https/www.{{ $hostName }}:443/portal/VirtualHostRoot/$1" nginx.ingress.kubernetes.io/from-to-www-redirect: "true" - {{- end }} + {{- end }} spec: - {{- if .Values.ingress.tls }} + {{- if .Values.ingress.tls.enabled }} tls: - hosts: - "www.{{ $hostName }}" diff --git a/charts/portalmodelo/v0.5.0/values.yaml b/charts/portalmodelo/v0.5.0/values.yaml index eb58f7c..28f9abd 100644 --- a/charts/portalmodelo/v0.5.0/values.yaml +++ b/charts/portalmodelo/v0.5.0/values.yaml @@ -53,7 +53,9 @@ securityContext: {} ingress: enabled: true - tls: true + tls: + enabled: true + provider: letsencrypt # extra annotations only annotations: {}