diff --git a/charts/sapl/v0.2.0/app-readme.md b/charts/sapl/v0.2.0/app-readme.md new file mode 100644 index 0000000..969d11c --- /dev/null +++ b/charts/sapl/v0.2.0/app-readme.md @@ -0,0 +1,3 @@ +# Sistema de Apoio ao Processo Legislativo + +Utilize o formulário abaixo para configurar seu SAPL. diff --git a/charts/sapl/v0.2.0/questions.yaml b/charts/sapl/v0.2.0/questions.yaml new file mode 100644 index 0000000..ec4bcad --- /dev/null +++ b/charts/sapl/v0.2.0/questions.yaml @@ -0,0 +1,156 @@ +labels: + io.cattle.role: project +categories: +- Processo Legislativo +questions: +# Informações Básicas +- variable: sapl.hostname + default: "sapl.teste.df.leg.br" + description: "Endereço para acesso ao SAPL" + label: "URL do SAPL" + type: string + group: Básico + required: true +- variable: sapl.adminEmail + default: "contato@admin.email" + description: "E-mail do contato do Portal" + label: Contato + type: string + group: Básico + required: true +- variable: sapl.adminPassword + default: "altereme" + description: "Senha do usuário adm do Plone" + label: Senha Adm + type: password + group: Básico + required: true + +# Correio +- variable: sapl.emailSendUser + default: "no-reply@interlegis.leg.br" + description: "Remetente dos e-mails enviados pelo SAPL" + label: "Remetente" + type: string + group: Correio + required: false +- variable: sapl.useTls + default: "False" + description: "Usar TLS ao conectar no servidor SMTP?" + label: "Usar TLS" + type: enum + group: Correio + options: + - "True" + - "False" + required: false +- variable: sapl.emailPort + default: 25 + description: "Porta de envio de E-mail (SMTP)" + type: int + label: "Porta SMTP" + required: false + group: Correio +- variable: sapl.emailHost + default: "smtp.interlegis.leg.br" + description: "Servidor de envio de e-mail (SMTP)" + label: "Servidor SMTP" + type: string + group: Correio + required: false + +# Solr +- variable: sapl.useSolr + default: "True" + description: "Usar Solr para indexação de documentos?" + label: "Usar Solr?" + type: enum + group: Solr + options: + - "True" + - "False" + required: true +- variable: sapl.solrCollection + default: "sapl" + description: "Nome da coleção do Solr" + label: "Coleção" + type: string + group: Solr + required: false +- variable: sapl.solrUrl + default: "http://solr:8983" + description: "Nome da coleção do Solr" + label: "Coleção" + type: string + group: Solr + required: true +- variable: sapl.solrNumShards + default: 1 + description: "Número de Shards do Solr" + label: "Shards" + type: int + group: Solr + required: false +- variable: sapl.solrReplFactor + default: 2 + description: "Fator de replicação do Solr" + label: "ReplFactor" + type: int + group: Solr + required: false +- variable: sapl.solrMaxShardsPerNode + default: 1 + description: "Número máximo de Shards por nó Solr" + label: "MaxShardsPerNode" + type: int + group: Solr + required: false + +# PostgreSQL +- variable: postgresql.internal + default: true + description: "Fazer o deploy do Postgres?" + label: "Postgres Interno?" + type: boolean + group: PostgreSQL + required: false +- variable: postgresql.postgresqlPassword + default: "altereme" + description: "Senha do banco de dados Postgres" + label: "Senha do Postgres" + type: password + group: PostgreSQL + required: true + +# Avançado +- variable: sapl.debug + default: "False" + description: "Habilitar mensagens de Debug?" + label: "Debug?" + type: enum + group: Avançado + options: + - "True" + - "False" +- variable: sapl.timeZone + default: "America/Sao_Paulo" + description: "Fuso Horário do SAPL" + type: enum + label: "Fuso" + options: + - "America/Sao_Paulo" + - "America/Fortaleza" + - "America/Belem" + - "America/Araguaina" + - "America/Bahia" + - "America/Boa_Vista" + - "America/Campo_Grande" + - "America/Cuiaba" + - "America/Maceio" + - "America/Manaus" + - "America/Porto_Velho" + - "America/Recife" + - "America/Rio_Branco" + - "America/Sao_Paulo" + required: true + group: Avançado diff --git a/charts/sapl/v0.2.0/templates/ingress.yaml b/charts/sapl/v0.2.0/templates/ingress.yaml index 6ac1cbd..2d22b6f 100644 --- a/charts/sapl/v0.2.0/templates/ingress.yaml +++ b/charts/sapl/v0.2.0/templates/ingress.yaml @@ -1,6 +1,6 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "sapl.fullname" . -}} -{{- $ingressPath := .Values.ingress.path -}} +{{- $hostName := .Values.sapl.hostname -}} {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1beta1 {{- else -}} @@ -11,29 +11,22 @@ metadata: name: {{ $fullName }} labels: {{- include "sapl.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} annotations: + cert-manager.io/cluster-issuer: "letsencrypt-prod" + {{- with .Values.ingress.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- if .Values.ingress.tls }} tls: - {{- range .Values.ingress.tls }} - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} + - "{{ $hostName }}" + secretName: {{ $hostName | replace "." "-" }}-tls rules: - {{- range .Values.ingress.hosts }} - - host: {{ . | quote }} + - host: "{{ $hostName }}" http: paths: - - path: {{ $ingressPath }} + - path: /(.*) backend: serviceName: {{ $fullName }} servicePort: http - {{- end }} - {{- end }} +{{- end }} diff --git a/charts/sapl/v0.2.0/values.yaml b/charts/sapl/v0.2.0/values.yaml index f9e7de6..b6e9c5c 100644 --- a/charts/sapl/v0.2.0/values.yaml +++ b/charts/sapl/v0.2.0/values.yaml @@ -61,19 +61,12 @@ sapl: solrNumShards: 1 solrReplFactor: 2 solrMaxShardsPerNode: 1 + hostname: 'sapl.domain.net' ingress: enabled: true + # extra annotations only annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - path: / - hosts: - - chart-example.local - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local postgresql: internal: true