Browse Source

Added Rancher Chart files to SAPL chart

master
Fábio Kaiser Rauber 4 years ago
parent
commit
dccaddef3e
  1. 3
      charts/sapl/v0.2.0/app-readme.md
  2. 156
      charts/sapl/v0.2.0/questions.yaml
  3. 23
      charts/sapl/v0.2.0/templates/ingress.yaml
  4. 11
      charts/sapl/v0.2.0/values.yaml

3
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.

156
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

23
charts/sapl/v0.2.0/templates/ingress.yaml

@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
{{- $fullName := include "sapl.fullname" . -}} {{- $fullName := include "sapl.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}} {{- $hostName := .Values.sapl.hostname -}}
{{- 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 -}}
@ -11,29 +11,22 @@ metadata:
name: {{ $fullName }} name: {{ $fullName }}
labels: labels:
{{- include "sapl.labels" . | nindent 4 }} {{- include "sapl.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations: annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
{{- if .Values.ingress.tls }}
tls: tls:
{{- range .Values.ingress.tls }}
- hosts: - hosts:
{{- range .hosts }} - "{{ $hostName }}"
- {{ . | quote }} secretName: {{ $hostName | replace "." "-" }}-tls
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules: rules:
{{- range .Values.ingress.hosts }} - host: "{{ $hostName }}"
- host: {{ . | quote }}
http: http:
paths: paths:
- path: {{ $ingressPath }} - path: /(.*)
backend: backend:
serviceName: {{ $fullName }} serviceName: {{ $fullName }}
servicePort: http servicePort: http
{{- end }} {{- end }}
{{- end }}

11
charts/sapl/v0.2.0/values.yaml

@ -61,19 +61,12 @@ sapl:
solrNumShards: 1 solrNumShards: 1
solrReplFactor: 2 solrReplFactor: 2
solrMaxShardsPerNode: 1 solrMaxShardsPerNode: 1
hostname: 'sapl.domain.net'
ingress: ingress:
enabled: true enabled: true
# extra annotations only
annotations: {} 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: postgresql:
internal: true internal: true

Loading…
Cancel
Save