Fábio Kaiser Rauber 3 years ago
parent
commit
452f3f8368
  1. 23
      charts/edemocracia/v0.1.12/.helmignore
  2. 9
      charts/edemocracia/v0.1.12/Chart.lock
  3. 33
      charts/edemocracia/v0.1.12/Chart.yaml
  4. 3
      charts/edemocracia/v0.1.12/app-readme.md
  5. BIN
      charts/edemocracia/v0.1.12/charts/postgresql-8.6.13.tgz
  6. BIN
      charts/edemocracia/v0.1.12/charts/redis-10.6.3.tgz
  7. 182
      charts/edemocracia/v0.1.12/questions.yaml
  8. 19
      charts/edemocracia/v0.1.12/templates/NOTES.txt
  9. 79
      charts/edemocracia/v0.1.12/templates/_helpers.tpl
  10. 19
      charts/edemocracia/v0.1.12/templates/audiencias-pvc.yaml
  11. 147
      charts/edemocracia/v0.1.12/templates/audienciasweb-deployment.yaml
  12. 19
      charts/edemocracia/v0.1.12/templates/audienciasweb-service.yaml
  13. 147
      charts/edemocracia/v0.1.12/templates/audienciasworker-deployment.yaml
  14. 144
      charts/edemocracia/v0.1.12/templates/discourse-deployment.yaml
  15. 19
      charts/edemocracia/v0.1.12/templates/discourse-pvc.yaml
  16. 19
      charts/edemocracia/v0.1.12/templates/discourse-service.yaml
  17. 165
      charts/edemocracia/v0.1.12/templates/edemocracia-deployment.yaml
  18. 17
      charts/edemocracia/v0.1.12/templates/edemocracia-pvc.yaml
  19. 17
      charts/edemocracia/v0.1.12/templates/edemocracia-service.yaml
  20. 32
      charts/edemocracia/v0.1.12/templates/ingress.yaml
  21. 120
      charts/edemocracia/v0.1.12/templates/nginx-deployment.yaml
  22. 17
      charts/edemocracia/v0.1.12/templates/nginx-service.yaml
  23. 39
      charts/edemocracia/v0.1.12/templates/velero-schedule-monthly.yaml
  24. 39
      charts/edemocracia/v0.1.12/templates/velero-schedule-weekdays.yaml
  25. 39
      charts/edemocracia/v0.1.12/templates/velero-schedule-weekly.yaml
  26. 144
      charts/edemocracia/v0.1.12/templates/wikilegis-deployment.yaml
  27. 19
      charts/edemocracia/v0.1.12/templates/wikilegis-pvc.yaml
  28. 19
      charts/edemocracia/v0.1.12/templates/wikilegis-service.yaml
  29. 206
      charts/edemocracia/v0.1.12/values.yaml
  30. 23
      charts/edemocracia/v0.1.13/.helmignore
  31. 9
      charts/edemocracia/v0.1.13/Chart.lock
  32. 34
      charts/edemocracia/v0.1.13/Chart.yaml
  33. 3
      charts/edemocracia/v0.1.13/app-readme.md
  34. BIN
      charts/edemocracia/v0.1.13/charts/postgresql-8.6.13.tgz
  35. BIN
      charts/edemocracia/v0.1.13/charts/redis-10.6.3.tgz
  36. 182
      charts/edemocracia/v0.1.13/questions.yaml
  37. 19
      charts/edemocracia/v0.1.13/templates/NOTES.txt
  38. 79
      charts/edemocracia/v0.1.13/templates/_helpers.tpl
  39. 19
      charts/edemocracia/v0.1.13/templates/audiencias-pvc.yaml
  40. 147
      charts/edemocracia/v0.1.13/templates/audienciasweb-deployment.yaml
  41. 19
      charts/edemocracia/v0.1.13/templates/audienciasweb-service.yaml
  42. 147
      charts/edemocracia/v0.1.13/templates/audienciasworker-deployment.yaml
  43. 144
      charts/edemocracia/v0.1.13/templates/discourse-deployment.yaml
  44. 19
      charts/edemocracia/v0.1.13/templates/discourse-pvc.yaml
  45. 19
      charts/edemocracia/v0.1.13/templates/discourse-service.yaml
  46. 165
      charts/edemocracia/v0.1.13/templates/edemocracia-deployment.yaml
  47. 17
      charts/edemocracia/v0.1.13/templates/edemocracia-pvc.yaml
  48. 17
      charts/edemocracia/v0.1.13/templates/edemocracia-service.yaml
  49. 32
      charts/edemocracia/v0.1.13/templates/ingress.yaml
  50. 120
      charts/edemocracia/v0.1.13/templates/nginx-deployment.yaml
  51. 17
      charts/edemocracia/v0.1.13/templates/nginx-service.yaml
  52. 39
      charts/edemocracia/v0.1.13/templates/velero-schedule-monthly.yaml
  53. 39
      charts/edemocracia/v0.1.13/templates/velero-schedule-weekdays.yaml
  54. 39
      charts/edemocracia/v0.1.13/templates/velero-schedule-weekly.yaml
  55. 144
      charts/edemocracia/v0.1.13/templates/wikilegis-deployment.yaml
  56. 19
      charts/edemocracia/v0.1.13/templates/wikilegis-pvc.yaml
  57. 19
      charts/edemocracia/v0.1.13/templates/wikilegis-service.yaml
  58. 206
      charts/edemocracia/v0.1.13/values.yaml
  59. 0
      charts/edemocracia/v0.4.0/.helmignore
  60. 0
      charts/edemocracia/v0.4.0/Chart.lock
  61. 0
      charts/edemocracia/v0.4.0/Chart.yaml
  62. 0
      charts/edemocracia/v0.4.0/app-readme.md
  63. 0
      charts/edemocracia/v0.4.0/charts/postgresql-8.6.13.tgz
  64. 0
      charts/edemocracia/v0.4.0/charts/redis-10.6.3.tgz
  65. 8
      charts/edemocracia/v0.4.0/questions.yaml
  66. 0
      charts/edemocracia/v0.4.0/templates/NOTES.txt
  67. 0
      charts/edemocracia/v0.4.0/templates/_helpers.tpl
  68. 0
      charts/edemocracia/v0.4.0/templates/audiencias-pvc.yaml
  69. 0
      charts/edemocracia/v0.4.0/templates/audienciasweb-deployment.yaml
  70. 0
      charts/edemocracia/v0.4.0/templates/audienciasweb-service.yaml
  71. 0
      charts/edemocracia/v0.4.0/templates/audienciasworker-deployment.yaml
  72. 0
      charts/edemocracia/v0.4.0/templates/discourse-deployment.yaml
  73. 0
      charts/edemocracia/v0.4.0/templates/discourse-pvc.yaml
  74. 0
      charts/edemocracia/v0.4.0/templates/discourse-service.yaml
  75. 0
      charts/edemocracia/v0.4.0/templates/edemocracia-deployment.yaml
  76. 0
      charts/edemocracia/v0.4.0/templates/edemocracia-pvc.yaml
  77. 0
      charts/edemocracia/v0.4.0/templates/edemocracia-service.yaml
  78. 0
      charts/edemocracia/v0.4.0/templates/ingress.yaml
  79. 0
      charts/edemocracia/v0.4.0/templates/nginx-deployment.yaml
  80. 0
      charts/edemocracia/v0.4.0/templates/nginx-service.yaml
  81. 39
      charts/edemocracia/v0.4.0/templates/velero-schedule-monthly.yaml
  82. 39
      charts/edemocracia/v0.4.0/templates/velero-schedule-weekdays.yaml
  83. 39
      charts/edemocracia/v0.4.0/templates/velero-schedule-weekly.yaml
  84. 0
      charts/edemocracia/v0.4.0/templates/wikilegis-deployment.yaml
  85. 0
      charts/edemocracia/v0.4.0/templates/wikilegis-pvc.yaml
  86. 0
      charts/edemocracia/v0.4.0/templates/wikilegis-service.yaml
  87. 13
      charts/edemocracia/v0.4.0/values.yaml
  88. 22
      charts/osticket/v0.2.0/.helmignore
  89. 9
      charts/osticket/v0.2.0/Chart.lock
  90. 16
      charts/osticket/v0.2.0/Chart.yaml
  91. 24
      charts/osticket/v0.2.0/README.md
  92. BIN
      charts/osticket/v0.2.0/charts/mariadb-10.4.4.tgz
  93. BIN
      charts/osticket/v0.2.0/charts/memcached-6.0.10.tgz
  94. 45
      charts/osticket/v0.2.0/templates/_helpers.tpl
  95. 97
      charts/osticket/v0.2.0/templates/deployment.yaml
  96. 35
      charts/osticket/v0.2.0/templates/ingress.yaml
  97. 16
      charts/osticket/v0.2.0/templates/service.yaml
  98. 15
      charts/osticket/v0.2.0/templates/tests/test-connection.yaml
  99. 39
      charts/osticket/v0.2.0/templates/velero-schedule-weekdays.yaml
  100. 100
      charts/osticket/v0.2.0/values.yaml

23
charts/edemocracia/v0.1.12/.helmignore

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

9
charts/edemocracia/v0.1.12/Chart.lock

@ -0,0 +1,9 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 8.6.13
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 10.6.3
digest: sha256:988f8160c4bd6ea76a95e38d6ee19b07676affd51e6b05bc0e2ce29f488e8c9a
generated: "2020-04-07T14:22:09.711759-03:00"

33
charts/edemocracia/v0.1.12/Chart.yaml

@ -0,0 +1,33 @@
apiVersion: v2
name: edemocracia
description: Portal que visa ampliar a participação social no processo legislativo e aproximar cidadãos e seus representantes por meio da interação digital.
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.12
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.3.3
icon: https://git.interlegis.leg.br/SEIT/rancher-charts/raw/master/images/edemocracia.png
# Dependencies
dependencies:
- name: postgresql
version: 8.6.13
repository: https://charts.bitnami.com/bitnami
- name: redis
version: 10.6.3
repository: https://charts.bitnami.com/bitnami

3
charts/edemocracia/v0.1.12/app-readme.md

@ -0,0 +1,3 @@
# Sistema de participação popular para Casas Legislativas
Utilize o formulário abaixo para configurar seu E-democracia.

BIN
charts/edemocracia/v0.1.12/charts/postgresql-8.6.13.tgz

Binary file not shown.

BIN
charts/edemocracia/v0.1.12/charts/redis-10.6.3.tgz

Binary file not shown.

182
charts/edemocracia/v0.1.12/questions.yaml

@ -0,0 +1,182 @@
labels:
io.cattle.role: project
categories:
- Participação Popular
questions:
# Informações Básicas
- variable: edemocracia.siteName
default: "Câmara Municipal de Teste"
description: "Título que aparece no E-democracia"
label: "Nome do Site"
type: string
group: Básico
required: true
- variable: edemocracia.hostname
default: "edemocracia.teste.df.leg.br"
description: "Endereço para acesso ao E-democracia"
label: "URL do SAPL"
type: string
group: Básico
required: true
- variable: edemocracia.admin.email
default: "contato@admin.email"
description: "E-mail de contato do E-democracia"
label: Contato
type: string
group: Básico
required: true
- variable: edemocracia.admin.password
default: "altereme"
description: "Senha de administrador do E-democracia"
label: Senha admin
type: password
group: Básico
required: true
# Recaptcha
- variable: edemocracia.recaptcha.privateKey
default: "altereme"
description: "Chave privada do Recaptcha"
label: Recaptcha PrivateKey
type: string
group: Recaptcha
required: true
- variable: edemocracia.recaptcha.siteKey
default: "altereme"
description: "Chave de site do Recaptcha"
label: Recaptcha SiteKey
type: string
group: Recaptcha
required: true
# Login Social
- variable: edemocracia.socialAuth.facebook.key
default: ""
description: "Chave da autenticação via Facebook"
label: Facebook Key
type: string
group: Login Social
required: false
- variable: edemocracia.socialAuth.facebook.secret
default: ""
description: "Segredo da autenticação via Facebook"
label: Facebook Secret
type: string
group: Login Social
required: false
- variable: edemocracia.socialAuth.google.key
default: ""
description: "Chave da autenticação via Google"
label: Google Key
type: string
group: Login Social
required: false
- variable: edemocracia.socialAuth.google.secret
default: ""
description: "Segredo da autenticação via Google"
label: Google Secret
type: string
group: Login Social
required: false
# Correio
- variable: smtp.host
default: "smtp.interlegis.leg.br"
description: "Servidor de envio de e-mail (SMTP)"
label: "Servidor SMTP"
type: string
group: Correio
required: false
- variable: smtp.port
default: 25
description: "Porta de envio de E-mail (SMTP)"
type: int
label: "Porta SMTP"
required: false
group: Correio
- variable: smtp.tls
default: "False"
description: "Usar TLS ao conectar no servidor SMTP?"
label: "Usar TLS"
type: enum
group: Correio
options:
- "True"
- "False"
required: false
- variable: smtp.username
default: ""
description: "Nome de usuário para envio SMTP (vazio para nenhum)"
label: "SMTP Username"
required: false
group: Correio
type: string
- variable: smtp.password
default: ""
description: "Senha para envio SMTP (vazio para nenhuma)"
label: "SMTP Password"
required: false
group: Correio
type: string
# PostgreSQL
- 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: edemocracia.timeZone
default: "America/Sao_Paulo"
description: "Fuso Horário do E-democracia"
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
- variable: edemocracia.apikey
default: "uma_chave_de_api_secreta_mesmo"
description: "Chave de API do E-democracia"
type: string
label: "Chave de API"
required: true
group: Avançado
- variable: discourse.enabled
default: true
description: "Habilitar o discourse (Expressão)?"
label: "Usar o Discourse?"
type: boolean
group: Avançado
- variable: wikilegis.enabled
default: true
description: "Habilitar o Wikilegis?"
label: "Usar o Wikilegis?"
type: boolean
group: Avançado
- variable: audiencias.enabled
default: true
description: "Habilitar o Audiências Interativas?"
label: "Usar o Audiências?"
type: boolean
group: Avançado

19
charts/edemocracia/v0.1.12/templates/NOTES.txt

@ -0,0 +1,19 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.nginx.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "edemocracia.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.nginx.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "edemocracia.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "edemocracia.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.nginx.service.port }}
{{- else if contains "ClusterIP" .Values.nginx.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "edemocracia.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
{{- end }}

79
charts/edemocracia/v0.1.12/templates/_helpers.tpl

@ -0,0 +1,79 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "edemocracia.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "edemocracia.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "edemocracia.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "edemocracia.labels" -}}
helm.sh/chart: {{ include "edemocracia.chart" . }}
{{ include "edemocracia.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "edemocracia.selectorLabels" -}}
app.kubernetes.io/name: {{ include "edemocracia.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "edemocracia.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "edemocracia.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified app name for postgresql.
*/}}
{{- define "postgresql.fullname" -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name for redis.
*/}}
{{- define "redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

19
charts/edemocracia/v0.1.12/templates/audiencias-pvc.yaml

@ -0,0 +1,19 @@
{{- if .Values.audiencias.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "edemocracia.fullname" . }}-audiencias
spec:
accessModes:
- {{ .Values.audiencias.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.audiencias.persistence.size }}
{{- if .Values.audiencias.persistence.storageClass }}
{{- if (eq "-" .Values.audiencias.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.audiencias.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

147
charts/edemocracia/v0.1.12/templates/audienciasweb-deployment.yaml

@ -0,0 +1,147 @@
{{- if .Values.audiencias.enabled }}
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-audienciasweb
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
app.kubernetes.io/component: audiencias
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
app.kubernetes.io/component: audiencias
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "edemocracia.fullname" . }}-audienciasweb
image: "{{ .Values.audiencias.image.repository }}:{{ .Values.audiencias.image.tag }}"
imagePullPolicy: {{ .Values.audiencias.image.pullPolicy }}
args:
- ./start-web.sh
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ADMIN_USERNAME
value: admin
- name: ALLOWED_HOSTS
value: audienciasweb, localhost, 127.0.0.1, "{{ $edemoUrl }}"
- name: COMPRESS_OFFLINE
value: "True"
- name: DATABASE_ENGINE
value: postgresql_psycopg2
- name: DATABASE_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DATABASE_NAME
value: audiencias
- name: DATABASE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USER
value: {{ .Values.postgresql.postgresqlUsername | quote }}
- name: DEBUG
value: "False"
- name: DEFAULT_FROM_EMAIL
value: '"Portal e-Democracia[audiencias]" <{{ .Values.edemocracia.admin.email }}>'
- name: DJANGO_SECRET_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: EMAIL_HOST
value: {{ .Values.smtp.host | quote }}
- name: EMAIL_HOST_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: EMAIL_HOST_USER
value: {{ .Values.smtp.username | quote }}
- name: EMAIL_PORT
value: {{ .Values.smtp.port | quote }}
- name: EMAIL_USE_TLS
value: {{ .Values.smtp.tls | quote}}
- name: ENABLE_REMOTE_USER
value: "True"
- name: FORCE_SCRIPT_NAME
value: /audiencias
- name: GOOGLE_ANALYTICS_ID
value: {{ .Values.edemocracia.googleAnalyticsId | quote }}
- name: LOGIN_REDIRECT_URL
value: /
- name: LOGIN_URL
value: /
- name: LOGOUT_REDIRECT_URL
value: /
- name: NOTIFICATION_EMAIL_LIST
value: "{{ .Values.edemocracia.admin.email }},{{ .Values.audiencias.notifEmailList }}"
- name: OLARK_ID
value: {{ .Values.edemocracia.olarkId | quote }}
- name: RECAPTCHA_PRIVATE_KEY
value: {{ .Values.edemocracia.recaptcha.privateKey | quote }}
- name: RECAPTCHA_SITE_KEY
value: {{ .Values.edemocracia.recaptcha.siteKey | quote }}
- name: REDIS_SERVER
value: {{ (include "redis.fullname" .) }}-master
- name: SESSION_COOKIE_NAME
value: audiencias_session
- name: SITE_DOMAIN
value: "{{ $edemoUrl }}"
- name: SITE_NAME
value: {{ .Values.edemocracia.siteName | quote }}
- name: STATIC_URL
value: /audiencias/static/
- name: URL_PREFIX
value: audiencias
- name: WEBSERVICE_URL
value: {{ .Values.audiencias.webservice.url | quote }}
- name: WORDS_BLACK_LIST
value: {{ .Values.audiencias.wordsBlacklist | quote }}
resources:
{{- toYaml .Values.audiencias.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/audiencias/public/
name: {{ include "edemocracia.fullname" . }}-audiencias
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-audiencias
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-audiencias
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.12/templates/audienciasweb-service.yaml

@ -0,0 +1,19 @@
{{- if .Values.audiencias.enabled }}
apiVersion: v1
kind: Service
metadata:
name: audienciasweb
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
spec:
type: {{ .Values.audiencias.service.type }}
ports:
- port: {{ .Values.audiencias.service.port }}
targetPort: 8000
protocol: TCP
name: "8000"
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
{{- end }}

147
charts/edemocracia/v0.1.12/templates/audienciasworker-deployment.yaml

@ -0,0 +1,147 @@
{{- if .Values.audiencias.enabled }}
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-audienciasworker
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasworker
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasworker
app.kubernetes.io/component: audiencias
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasworker
app.kubernetes.io/component: audiencias
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "edemocracia.fullname" . }}-audienciasworker
image: "{{ .Values.audiencias.image.repository }}:{{ .Values.audiencias.image.tag }}"
imagePullPolicy: {{ .Values.audiencias.image.pullPolicy }}
args:
- ./start-worker.sh
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ADMIN_USERNAME
value: admin
- name: ALLOWED_HOSTS
value: audienciasweb, audienciasworker, localhost, 127.0.0.1, "{{ $edemoUrl }}"
- name: COMPRESS_OFFLINE
value: "True"
- name: DATABASE_ENGINE
value: postgresql_psycopg2
- name: DATABASE_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DATABASE_NAME
value: audiencias
- name: DATABASE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USER
value: {{ .Values.postgresql.postgresqlUsername | quote }}
- name: DEBUG
value: "False"
- name: DEFAULT_FROM_EMAIL
value: '"Portal e-Democracia[audiencias]" <{{ .Values.edemocracia.admin.email }}>'
- name: DJANGO_SECRET_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: EMAIL_HOST
value: {{ .Values.smtp.host | quote }}
- name: EMAIL_HOST_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: EMAIL_HOST_USER
value: {{ .Values.smtp.username | quote }}
- name: EMAIL_PORT
value: {{ .Values.smtp.port | quote }}
- name: EMAIL_USE_TLS
value: {{ .Values.smtp.tls | quote }}
- name: ENABLE_REMOTE_USER
value: "True"
- name: FORCE_SCRIPT_NAME
value: /audiencias
- name: GOOGLE_ANALYTICS_ID
value: {{ .Values.edemocracia.googleAnalyticsId }}
- name: LOGIN_REDIRECT_URL
value: /
- name: LOGIN_URL
value: /
- name: LOGOUT_REDIRECT_URL
value: /
- name: NOTIFICATION_EMAIL_LIST
value: "{{ .Values.edemocracia.admin.email }},{{ .Values.audiencias.notifEmailList }}"
- name: OLARK_ID
value: {{ .Values.edemocracia.olarkId | quote }}
- name: RECAPTCHA_PRIVATE_KEY
value: {{ .Values.edemocracia.recaptcha.privateKey | quote }}
- name: RECAPTCHA_SITE_KEY
value: {{ .Values.edemocracia.recaptcha.siteKey | quote }}
- name: REDIS_SERVER
value: {{ (include "redis.fullname" .) }}-master
- name: SESSION_COOKIE_NAME
value: audiencias_session
- name: SITE_DOMAIN
value: "{{ $edemoUrl }}"
- name: SITE_NAME
value: {{ .Values.edemocracia.siteName | quote }}
- name: STATIC_URL
value: /audiencias/static/
- name: URL_PREFIX
value: audiencias
- name: WEBSERVICE_URL
value: {{ .Values.audiencias.webservice.url | quote }}
- name: WORDS_BLACK_LIST
value: {{ .Values.audiencias.wordsBlacklist | quote }}
resources:
{{- toYaml .Values.audiencias.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/audiencias/public/
name: {{ include "edemocracia.fullname" . }}-audiencias
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-audiencias
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-audiencias
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

144
charts/edemocracia/v0.1.12/templates/discourse-deployment.yaml

@ -0,0 +1,144 @@
{{- if .Values.discourse.enabled }}
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-discourse
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: discourse
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: discourse
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- image: "{{ .Values.discourse.image.repository }}:{{ .Values.discourse.image.tag }}"
name: {{ include "edemocracia.fullname" . }}-discourse-cpimgs
command:
- "cp"
- "-au"
- "/var/www/discourse/public/images/."
- "/publicimgs/"
volumeMounts:
- mountPath: /publicimgs/
subPath: images
name: {{ include "edemocracia.fullname" . }}-discourse
containers:
- args:
- ./start-web.sh
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ADMIN_USERNAME
value: admin
- name: DISCOURSE_CONTACT_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: DISCOURSE_CONTACT_URL
value: {{ $edemoUrl }}
- name: DISCOURSE_DB_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DISCOURSE_DB_NAME
value: discourse
- name: DISCOURSE_DB_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DISCOURSE_DB_PORT
value: "5432"
- name: DISCOURSE_DB_USERNAME
value: {{ .Values.postgresql.postgresqlUsername | quote}}
- name: DISCOURSE_DEVELOPER_EMAILS
- name: DISCOURSE_FORCE_HOSTNAME
value: {{ $edemoUrl }}\/expressao
- name: DISCOURSE_HOSTNAME
value: {{ $edemoUrl }}\/expressao
- name: DISCOURSE_NOTIFICATION_EMAIL
value: {{ .Values.edemocracia.admin.email }}
- name: DISCOURSE_REDIS_HOST
value: {{ (include "redis.fullname" .) }}-master
- name: DISCOURSE_REDIS_PORT
value: "6379"
- name: DISCOURSE_RELATIVE_URL_ROOT
value: /expressao
- name: DISCOURSE_SMTP_ADDRESS
value: {{ .Values.smtp.host | quote }}
- name: DISCOURSE_SMTP_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: DISCOURSE_SMTP_PORT
value: {{ .Values.smtp.port | quote }}
- name: DISCOURSE_SMTP_USER_NAME
value: {{ .Values.smtp.username | quote }}
- name: DISCOURSE_SSO_SECRET
value: {{ .Values.discourse.sso.secret | quote }}
- name: DISCOURSE_SSO_URL
value: "https://{{ $edemoUrl }}"
- name: RAILS_ENV
value: production
image: {{.Values.discourse.image.repository}}:{{ .Values.discourse.image.tag }}
imagePullPolicy: {{ .Values.discourse.image.pullPolicy }}
name: {{ include "edemocracia.fullname" . }}-discourse
ports:
- containerPort: 8080
resources:
{{- toYaml .Values.discourse.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/www/discourse/public/assets/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: assets
- mountPath: /var/www/discourse/public/javascripts/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: javascripts
- mountPath: /var/www/discourse/public/images/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: images
- mountPath: /var/www/discourse/tmp/stylesheet-cache/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: stylesheet-cache
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-discourse
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-discourse
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.12/templates/discourse-pvc.yaml

@ -0,0 +1,19 @@
{{- if .Values.discourse.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "edemocracia.fullname" . }}-discourse
spec:
accessModes:
- {{ .Values.discourse.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.discourse.persistence.size }}
{{- if .Values.discourse.persistence.storageClass }}
{{- if (eq "-" .Values.discourse.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.discourse.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.12/templates/discourse-service.yaml

@ -0,0 +1,19 @@
{{- if .Values.discourse.enabled }}
apiVersion: v1
kind: Service
metadata:
name: discourse
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
spec:
type: {{ .Values.discourse.service.type }}
ports:
- port: {{ .Values.discourse.service.port }}
targetPort: 8080
protocol: TCP
name: "8080"
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
{{- end }}

165
charts/edemocracia/v0.1.12/templates/edemocracia-deployment.yaml

@ -0,0 +1,165 @@
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-edemocracia
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: edemocracia
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: edemocracia
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- image: "{{ .Values.edemocracia.image.repository }}:{{ .Values.edemocracia.image.tag }}"
name: {{ include "edemocracia.fullname" . }}-edemocracia-cpmedia
command:
- "cp"
- "-au"
- "/var/labhacker/edemocracia/src/public/media/"
- "/srcpublic/"
volumeMounts:
- mountPath: /srcpublic
name: {{ include "edemocracia.fullname" . }}-edemocracia
containers:
- name: {{ include "edemocracia.fullname" . }}-edemocracia
image: "{{ .Values.edemocracia.image.repository }}:{{ .Values.edemocracia.image.tag }}"
imagePullPolicy: {{ .Values.edemocracia.image.pullPolicy }}
args:
- ./runserver-production
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ADMIN_USERNAME
value: admin
- name: ALLOWED_HOSTS
value: "{{ $edemoUrl }}"
- name: AUDIENCIAS_API_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: AUDIENCIAS_ENABLED
{{- if .Values.audiencias.enabled }}
value: "True"
{{- else }}
value: "False"
{{- end }}
- name: AUDIENCIAS_UPSTREAM
value: http://audienciasweb:8000/audiencias
- name: DATABASE_ENGINE
value: postgresql_psycopg2
- name: DATABASE_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DATABASE_NAME
value: edemocracia
- name: DATABASE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USER
value: {{ .Values.postgresql.postgresqlUsername | quote }}
- name: DEBUG
value: "{{ .Values.edemocracia.debug }}"
- name: DEFAULT_FROM_EMAIL
value: '"Portal e-Democracia" <{{ .Values.edemocracia.admin.email }}>'
- name: DISCOURSE_ENABLED
{{- if .Values.discourse.enabled }}
value: "True"
{{- else }}
value: "False"
{{- end }}
- name: DISCOURSE_SSO_SECRET
value: {{ .Values.discourse.sso.secret | quote }}
# Workaround for a bug in runserver-production script, which does not check for DISCOURSE_ENABLED variable
- name: DISCOURSE_UPSTREAM
{{- if .Values.discourse.enabled }}
value: http://discourse:8080/expressao
{{- else }}
value: "--version"
{{- end }}
- name: EMAIL_BACKEND
value: django.core.mail.backends.smtp.EmailBackend
- name: EMAIL_HOST
value: {{ .Values.smtp.host | quote }}
- name: EMAIL_HOST_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: EMAIL_HOST_USER
value: {{ .Values.smtp.username | quote }}
- name: EMAIL_PORT
value: {{ .Values.smtp.port | quote }}
- name: EMAIL_USE_TLS
value: {{ .Values.smtp.tls | quote }}
- name: GOOGLE_ANALYTICS_ID
value: {{ .Values.edemocracia.googleAnalyticsId | quote }}
- name: OLARK_ID
value: {{ .Values.edemocracia.olarkId | quote }}
- name: RECAPTCHA_PRIVATE_KEY
value: {{ .Values.edemocracia.recaptcha.privateKey | quote }}
- name: RECAPTCHA_SITE_KEY
value: {{ .Values.edemocracia.recaptcha.siteKey | quote }}
- name: SECRET_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: SITE_NAME
value: {{ .Values.edemocracia.siteName | quote }}
- name: SITE_URL
value: "https://{{ $edemoUrl }}"
- name: SOCIAL_AUTH_FACEBOOK_KEY
value: {{ .Values.edemocracia.socialAuth.facebook.key | quote }}
- name: SOCIAL_AUTH_FACEBOOK_SECRET
value: {{ .Values.edemocracia.socialAuth.facebook.secret | quote }}
- name: SOCIAL_AUTH_GOOGLE_OAUTH2_KEY
value: {{ .Values.edemocracia.socialAuth.google.key | quote }}
- name: SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET
value: {{ .Values.edemocracia.socialAuth.google.secret | quote }}
- name: SOCIAL_AUTH_REDIRECT_IS_HTTPS
value: "True"
- name: WIKILEGIS_API_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: WIKILEGIS_API_URL
value: /api/v1/
- name: WIKILEGIS_ENABLED
{{- if .Values.wikilegis.enabled }}
value: "True"
{{- else }}
value: "False"
{{- end }}
- name: WIKILEGIS_UPSTREAM
value: http://wikilegis:8000
resources:
{{- toYaml .Values.edemocracia.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/edemocracia/src/public/
name: {{ include "edemocracia.fullname" . }}-edemocracia
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-edemocracia
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-edemocracia
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

17
charts/edemocracia/v0.1.12/templates/edemocracia-pvc.yaml

@ -0,0 +1,17 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "edemocracia.fullname" . }}-edemocracia
spec:
accessModes:
- {{ .Values.edemocracia.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.edemocracia.persistence.size }}
{{- if .Values.edemocracia.persistence.storageClass }}
{{- if (eq "-" .Values.edemocracia.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.edemocracia.persistence.storageClass }}"
{{- end }}
{{- end }}

17
charts/edemocracia/v0.1.12/templates/edemocracia-service.yaml

@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: edemocracia
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia
spec:
type: {{ .Values.edemocracia.service.type }}
ports:
- port: {{ .Values.edemocracia.service.port }}
targetPort: 8000
protocol: TCP
name: "8000"
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia

32
charts/edemocracia/v0.1.12/templates/ingress.yaml

@ -0,0 +1,32 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "edemocracia.fullname" . -}}
{{- $hostName := .Values.edemocracia.hostname -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
tls:
- hosts:
- "{{ $hostName }}"
secretName: {{ $hostName | replace "." "-" }}-tls
rules:
- host: "{{ $hostName }}"
http:
paths:
- path: /
backend:
serviceName: nginx
servicePort: http
{{- end }}

120
charts/edemocracia/v0.1.12/templates/nginx-deployment.yaml

@ -0,0 +1,120 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-nginx
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-nginx
image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}"
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: http
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: http
timeoutSeconds: 1
resources:
{{- toYaml .Values.nginx.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/edemocracia/src/public/
name: {{ include "edemocracia.fullname" . }}-edemocracia
{{- if .Values.wikilegis.enabled }}
- mountPath: /var/labhacker/wikilegis/wikilegis/public/
name: {{ include "edemocracia.fullname" . }}-wikilegis
{{- end }}
{{- if .Values.audiencias.enabled }}
- mountPath: /var/labhacker/audiencias/public/
name: {{ include "edemocracia.fullname" . }}-audiencias
{{- end }}
{{- if .Values.discourse.enabled }}
- mountPath: /var/www/discourse/public/assets/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: assets
- mountPath: /var/www/discourse/public/javascripts/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: javascripts
- mountPath: /var/www/discourse/public/images/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: images
- mountPath: /var/www/discourse/tmp/stylesheet-cache/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: stylesheet-cache
{{- end }}
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-edemocracia
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-edemocracia
{{- if .Values.wikilegis.enabled }}
- name: {{ include "edemocracia.fullname" . }}-wikilegis
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-wikilegis
{{- end }}
{{- if .Values.audiencias.enabled }}
- name: {{ include "edemocracia.fullname" . }}-audiencias
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-audiencias
{{- end }}
{{- if .Values.discourse.enabled }}
- name: {{ include "edemocracia.fullname" . }}-discourse
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-discourse
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

17
charts/edemocracia/v0.1.12/templates/nginx-service.yaml

@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
spec:
type: {{ .Values.nginx.service.type }}
ports:
- port: {{ .Values.nginx.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx

39
charts/edemocracia/v0.1.12/templates/velero-schedule-monthly.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-monthly
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on first day of every month
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} 1 * *
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every weekday backup is good for the next year (365 days)
ttl: 8760h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

39
charts/edemocracia/v0.1.12/templates/velero-schedule-weekdays.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-weekdays
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on weekdays
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 1-5
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every weekday backup is good for the next week (7 days)
ttl: 168h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

39
charts/edemocracia/v0.1.12/templates/velero-schedule-weekly.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-weekly
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on sunday
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 0
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every sunday backup is good for 30 days (aprox. 1 month)
ttl: 744h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

144
charts/edemocracia/v0.1.12/templates/wikilegis-deployment.yaml

@ -0,0 +1,144 @@
{{- if .Values.wikilegis.enabled }}
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-wikilegis
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
app.kubernetes.io/component: wikilegis
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
app.kubernetes.io/component: wikilegis
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- image: "{{ .Values.wikilegis.image.repository }}:{{ .Values.wikilegis.image.tag }}"
name: {{ include "edemocracia.fullname" . }}-wikilegis-cpmedia
command:
- "cp"
- "-au"
- "/var/labhacker/wikilegis/wikilegis/public/media/"
- "/wlpublic/"
volumeMounts:
- mountPath: /wlpublic
name: {{ include "edemocracia.fullname" . }}-wikilegis
containers:
- name: {{ include "edemocracia.fullname" . }}-wikilegis
image: "{{ .Values.wikilegis.image.repository }}:{{ .Values.wikilegis.image.tag }}"
imagePullPolicy: {{ .Values.wikilegis.image.pullPolicy }}
args:
- ./start.sh
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ALLOWED_HOSTS
value: "{{ $edemoUrl }},wikilegisweb,wikilegis,localhost,127.0.0.1"
- name: API_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: AUTH_USER_MODEL
value: accounts.User
- name: DATABASE_ENGINE
value: postgresql_psycopg2
- name: DATABASE_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DATABASE_NAME
value: wikilegis
- name: DATABASE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USER
value: {{ .Values.postgresql.postgresqlUsername | quote }}
- name: DEBUG
value: "True"
- name: DEFAULT_FROM_EMAIL
value: '"Portal e-Democracia[Wikilegis]" <{{ .Values.edemocracia.admin.email }}>'
- name: EMAIL_HOST
value: {{ .Values.smtp.host | quote }}
- name: EMAIL_HOST_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: EMAIL_HOST_USER
value: {{ .Values.smtp.username | quote }}
- name: EMAIL_PORT
value: {{ .Values.smtp.port | quote }}
- name: EMAIL_USE_TLS
value: {{ .Values.smtp.tls | quote }}
- name: ENABLE_REMOTE_USER
value: "True"
- name: FORCE_SCRIPT_NAME
value: /wikilegis
- name: LANGUAGE_CODE
value: pt-br
- name: LOGIN_REDIRECT_URL
value: /
- name: LOGIN_URL
value: /
- name: MEDIA_URL
value: /wikilegis/media/
- name: SECRET_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: SESSION_COOKIE_NAME
value: wikilegis_session
- name: SITE_DOMAIN
value: {{ $edemoUrl }}
- name: SITE_NAME
value: {{ .Values.edemocracia.sitename | quote }}
- name: STATIC_URL
value: /wikilegis/static/
- name: TIME_ZONE
value: {{ .Values.edemocracia.timeZone | quote }}
resources:
{{- toYaml .Values.wikilegis.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/wikilegis/wikilegis/public/
name: {{ include "edemocracia.fullname" . }}-wikilegis
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-wikilegis
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-wikilegis
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.12/templates/wikilegis-pvc.yaml

@ -0,0 +1,19 @@
{{- if .Values.wikilegis.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "edemocracia.fullname" . }}-wikilegis
spec:
accessModes:
- {{ .Values.wikilegis.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.wikilegis.persistence.size }}
{{- if .Values.wikilegis.persistence.storageClass }}
{{- if (eq "-" .Values.wikilegis.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.wikilegis.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.12/templates/wikilegis-service.yaml

@ -0,0 +1,19 @@
{{- if .Values.wikilegis.enabled }}
apiVersion: v1
kind: Service
metadata:
name: wikilegis
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
spec:
type: {{ .Values.wikilegis.service.type }}
ports:
- port: {{ .Values.wikilegis.service.port }}
targetPort: 8000
protocol: TCP
name: "8000"
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
{{- end }}

206
charts/edemocracia/v0.1.12/values.yaml

@ -0,0 +1,206 @@
# Default values for edemocracia.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
nginx:
image:
repository: labhackercd/nginx-edemocracia
tag: 1.0.0
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
resources:
limits:
cpu: 300m
memory: 150Mi
requests:
cpu: 50m
memory: 30Mi
discourse:
enabled: true
image:
repository: labhackercd/discourse-docker
tag: 2.0.20180703
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8080
sso:
secret: "uma_chave_sso_secreta_mesmo"
persistence:
#storageClass: ""
accessMode: ReadWriteOnce
size: 500Mi
resources:
limits:
cpu: 800m
memory: 1200Mi
requests:
cpu: 100m
memory: 650Mi
wikilegis:
enabled: true
image:
repository: labhackercd/wikilegis
tag: 2.2.0
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8000
persistence:
#storageClass: ""
accessMode: ReadWriteOnce
size: 2Gi
resources:
limits:
cpu: 800m
memory: 350Mi
requests:
cpu: 100m
memory: 200Mi
edemocracia:
admin:
email: seitadmins@interlegis.leg.br
password: p@ssw0rd
apikey: "uma_chave_de_api_secreta_mesmo"
debug: "False"
googleAnalyticsId: ""
olarkId: ""
recaptcha:
siteKey: "altereme"
privateKey: "altereme"
socialAuth:
facebook:
key: ""
secret: ""
google:
key: ""
secret: ""
siteName: "Camara Municipal"
hostname: "edemocracia.teste.df.leg.br"
timeZone: "America/Sao_Paulo"
image:
repository: labhackercd/edemocracia
tag: 1.3.2
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8000
persistence:
#storageClass: ""
accessMode: ReadWriteOnce
size: 4Gi
resources:
limits:
cpu: 500m
memory: 1350Mi
requests:
cpu: 100m
memory: 800Mi
audiencias:
enabled: true
image:
repository: labhackercd/audiencias-publicas
tag: 3.2.0
pullPolicy: IfNotPresent
persistence:
#storageClass: ""
accessMode: ReadWriteOnce
size: 300Mi
notifEmailList: ""
webservice:
url: ""
wordsBlacklist: "merda,cu,cuzao,cuzona,cusao,cusona,bunda,fodido,fodida,foda,foder,fodedor,fudido,fudida,fuder,chupa,chupada,chupador,chupadora,boquete,boqueteira,boquetera,boketeira,boketera,xupa,xupada,xupador,xupadora,pauduro,pauzudo,xoxota,chochota,buceta,boceta,busseta,bosseta,cacete,cassete,caceta,kacete,kassete,caralho,karalho,caraleo,pinto,pica,rola,roludo,gozado,gozada,goso,gosa,gosado,gosado,puta,puto,putinho,putinha,putona,putana,putaria,grelo,grelinho,filhodaputa,filhosdaputa,puta,fdps,siririca,punheta,trepar,trepada,trepadeira,caralho,caralhu,karalho,karalhu,tomarnocu,tomanocu,vadia,bosta,quenga,rabo,bolsa,cuzinho,piroca,pqp,puta que pariu,porra,carai,cú,viado,fdp,vtnc,corno,bicha,bixa,viado,viadinho,pederasta,filho da puta,bundao,bundão,filho de uma egua,filho de uma égua,achacador,achacadora,achacadores,achacar,babaca,bucetas,cagar,cagaram,cambada,caráleo,corja,cornão,covarde,covardes,cretino,cus,cús,cusão,cuzão,cuzinho,cuzona,danar,desgraça,drosoba,enrabar,escória,escroto,escrotas,escrotos,fodão,fodona,fudendo,fuder,idiota,imundo,imundos,ku,kú,lascar,merdas,patifaria,pilantra,pilantragem,pilantras,poha,porcaria,putas,putos,sacanagem,safadeza,safado,safados,salafrário,salafrários,vagabundagem,vagabundo,vagabundos,veadinho,veadinhos"
service:
type: ClusterIP
port: 8000
resources:
limits:
cpu: 500m
memory: 300Mi
requests:
cpu: 50m
memory: 100Mi
smtp:
host: "127.0.0.1"
username: ""
password: ""
port: "25"
tls: "False"
# PostgreSQL definitions
postgresql:
image:
tag: 9.6.17
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 5432
persistence:
enabled: true
size: 2Gi
postgresqlPassword: DbP@ssw0rd
postgresqlUsername: postgres
postgresqlDatabase: root
resources:
requests:
cpu: 50m
memory: 80Mi
# Redis definitions
redis:
image:
tag: 5.0.8
pullPolicy: IfNotPresent
cluster:
enabled: false
usePassword: false
persistence:
enabled: true
accessModes:
- ReadWriteOnce
size: 2Gi
resources:
requests:
cpu: 50m
memory: 150Mi
limits:
cpu: 800m
memory: 1Gi
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
ingress:
enabled: true
# extra annotations only
annotations: {}
velero:
namespace: velero
backup:
enabled: true
snapshotVolumes: false
defaultVolumesToRestic: true
# cert-manager objects are usually blocked during backup
excludedResources:
- certificates.cert-manager.io
- orders.acme.cert-manager.io
- certificaterequests.cert-manager.io
- challenges.acme.cert-manager.io
nodeSelector: {}
tolerations: []
affinity: {}

23
charts/edemocracia/v0.1.13/.helmignore

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

9
charts/edemocracia/v0.1.13/Chart.lock

@ -0,0 +1,9 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 8.6.13
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 10.6.3
digest: sha256:988f8160c4bd6ea76a95e38d6ee19b07676affd51e6b05bc0e2ce29f488e8c9a
generated: "2020-04-07T14:22:09.711759-03:00"

34
charts/edemocracia/v0.1.13/Chart.yaml

@ -0,0 +1,34 @@
apiVersion: v2
name: edemocracia
description: Portal que visa ampliar a participação social no processo legislativo e aproximar cidadãos e seus representantes por meio da interação digital.
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.:w
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.13
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.3.3
icon: https://git.interlegis.leg.br/SEIT/rancher-charts/raw/master/images/edemocracia.png
# Dependencies
dependencies:
- name: postgresql
version: 8.6.13
repository: https://charts.bitnami.com/bitnami
- name: redis
version: 10.6.3
repository: https://charts.bitnami.com/bitnami

3
charts/edemocracia/v0.1.13/app-readme.md

@ -0,0 +1,3 @@
# Sistema de participação popular para Casas Legislativas
Utilize o formulário abaixo para configurar seu E-democracia.

BIN
charts/edemocracia/v0.1.13/charts/postgresql-8.6.13.tgz

Binary file not shown.

BIN
charts/edemocracia/v0.1.13/charts/redis-10.6.3.tgz

Binary file not shown.

182
charts/edemocracia/v0.1.13/questions.yaml

@ -0,0 +1,182 @@
labels:
io.cattle.role: project
categories:
- Participação Popular
questions:
# Informações Básicas
- variable: edemocracia.siteName
default: "Câmara Municipal de Teste"
description: "Título que aparece no E-democracia"
label: "Nome do Site"
type: string
group: Básico
required: true
- variable: edemocracia.hostname
default: "edemocracia.teste.df.leg.br"
description: "Endereço para acesso ao E-democracia"
label: "URL do SAPL"
type: string
group: Básico
required: true
- variable: edemocracia.admin.email
default: "contato@admin.email"
description: "E-mail de contato do E-democracia"
label: Contato
type: string
group: Básico
required: true
- variable: edemocracia.admin.password
default: "altereme"
description: "Senha de administrador do E-democracia"
label: Senha admin
type: password
group: Básico
required: true
# Recaptcha
- variable: edemocracia.recaptcha.privateKey
default: "altereme"
description: "Chave privada do Recaptcha"
label: Recaptcha PrivateKey
type: string
group: Recaptcha
required: true
- variable: edemocracia.recaptcha.siteKey
default: "altereme"
description: "Chave de site do Recaptcha"
label: Recaptcha SiteKey
type: string
group: Recaptcha
required: true
# Login Social
- variable: edemocracia.socialAuth.facebook.key
default: ""
description: "Chave da autenticação via Facebook"
label: Facebook Key
type: string
group: Login Social
required: false
- variable: edemocracia.socialAuth.facebook.secret
default: ""
description: "Segredo da autenticação via Facebook"
label: Facebook Secret
type: string
group: Login Social
required: false
- variable: edemocracia.socialAuth.google.key
default: ""
description: "Chave da autenticação via Google"
label: Google Key
type: string
group: Login Social
required: false
- variable: edemocracia.socialAuth.google.secret
default: ""
description: "Segredo da autenticação via Google"
label: Google Secret
type: string
group: Login Social
required: false
# Correio
- variable: smtp.host
default: "smtp.interlegis.leg.br"
description: "Servidor de envio de e-mail (SMTP)"
label: "Servidor SMTP"
type: string
group: Correio
required: false
- variable: smtp.port
default: 25
description: "Porta de envio de E-mail (SMTP)"
type: int
label: "Porta SMTP"
required: false
group: Correio
- variable: smtp.tls
default: "False"
description: "Usar TLS ao conectar no servidor SMTP?"
label: "Usar TLS"
type: enum
group: Correio
options:
- "True"
- "False"
required: false
- variable: smtp.username
default: ""
description: "Nome de usuário para envio SMTP (vazio para nenhum)"
label: "SMTP Username"
required: false
group: Correio
type: string
- variable: smtp.password
default: ""
description: "Senha para envio SMTP (vazio para nenhuma)"
label: "SMTP Password"
required: false
group: Correio
type: string
# PostgreSQL
- 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: edemocracia.timeZone
default: "America/Sao_Paulo"
description: "Fuso Horário do E-democracia"
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
- variable: edemocracia.apikey
default: "uma_chave_de_api_secreta_mesmo"
description: "Chave de API do E-democracia"
type: string
label: "Chave de API"
required: true
group: Avançado
- variable: discourse.enabled
default: true
description: "Habilitar o discourse (Expressão)?"
label: "Usar o Discourse?"
type: boolean
group: Avançado
- variable: wikilegis.enabled
default: true
description: "Habilitar o Wikilegis?"
label: "Usar o Wikilegis?"
type: boolean
group: Avançado
- variable: audiencias.enabled
default: true
description: "Habilitar o Audiências Interativas?"
label: "Usar o Audiências?"
type: boolean
group: Avançado

19
charts/edemocracia/v0.1.13/templates/NOTES.txt

@ -0,0 +1,19 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.nginx.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "edemocracia.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.nginx.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "edemocracia.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "edemocracia.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.nginx.service.port }}
{{- else if contains "ClusterIP" .Values.nginx.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "edemocracia.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
{{- end }}

79
charts/edemocracia/v0.1.13/templates/_helpers.tpl

@ -0,0 +1,79 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "edemocracia.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "edemocracia.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "edemocracia.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "edemocracia.labels" -}}
helm.sh/chart: {{ include "edemocracia.chart" . }}
{{ include "edemocracia.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "edemocracia.selectorLabels" -}}
app.kubernetes.io/name: {{ include "edemocracia.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "edemocracia.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "edemocracia.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified app name for postgresql.
*/}}
{{- define "postgresql.fullname" -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name for redis.
*/}}
{{- define "redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

19
charts/edemocracia/v0.1.13/templates/audiencias-pvc.yaml

@ -0,0 +1,19 @@
{{- if .Values.audiencias.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "edemocracia.fullname" . }}-audiencias
spec:
accessModes:
- {{ .Values.audiencias.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.audiencias.persistence.size }}
{{- if .Values.audiencias.persistence.storageClass }}
{{- if (eq "-" .Values.audiencias.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.audiencias.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

147
charts/edemocracia/v0.1.13/templates/audienciasweb-deployment.yaml

@ -0,0 +1,147 @@
{{- if .Values.audiencias.enabled }}
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-audienciasweb
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
app.kubernetes.io/component: audiencias
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
app.kubernetes.io/component: audiencias
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "edemocracia.fullname" . }}-audienciasweb
image: "{{ .Values.audiencias.image.repository }}:{{ .Values.audiencias.image.tag }}"
imagePullPolicy: {{ .Values.audiencias.image.pullPolicy }}
args:
- ./start-web.sh
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ADMIN_USERNAME
value: admin
- name: ALLOWED_HOSTS
value: audienciasweb, localhost, 127.0.0.1, "{{ $edemoUrl }}"
- name: COMPRESS_OFFLINE
value: "True"
- name: DATABASE_ENGINE
value: postgresql_psycopg2
- name: DATABASE_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DATABASE_NAME
value: audiencias
- name: DATABASE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USER
value: {{ .Values.postgresql.postgresqlUsername | quote }}
- name: DEBUG
value: "False"
- name: DEFAULT_FROM_EMAIL
value: '"Portal e-Democracia[audiencias]" <{{ .Values.edemocracia.admin.email }}>'
- name: DJANGO_SECRET_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: EMAIL_HOST
value: {{ .Values.smtp.host | quote }}
- name: EMAIL_HOST_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: EMAIL_HOST_USER
value: {{ .Values.smtp.username | quote }}
- name: EMAIL_PORT
value: {{ .Values.smtp.port | quote }}
- name: EMAIL_USE_TLS
value: {{ .Values.smtp.tls | quote}}
- name: ENABLE_REMOTE_USER
value: "True"
- name: FORCE_SCRIPT_NAME
value: /audiencias
- name: GOOGLE_ANALYTICS_ID
value: {{ .Values.edemocracia.googleAnalyticsId | quote }}
- name: LOGIN_REDIRECT_URL
value: /
- name: LOGIN_URL
value: /
- name: LOGOUT_REDIRECT_URL
value: /
- name: NOTIFICATION_EMAIL_LIST
value: "{{ .Values.edemocracia.admin.email }},{{ .Values.audiencias.notifEmailList }}"
- name: OLARK_ID
value: {{ .Values.edemocracia.olarkId | quote }}
- name: RECAPTCHA_PRIVATE_KEY
value: {{ .Values.edemocracia.recaptcha.privateKey | quote }}
- name: RECAPTCHA_SITE_KEY
value: {{ .Values.edemocracia.recaptcha.siteKey | quote }}
- name: REDIS_SERVER
value: {{ (include "redis.fullname" .) }}-master
- name: SESSION_COOKIE_NAME
value: audiencias_session
- name: SITE_DOMAIN
value: "{{ $edemoUrl }}"
- name: SITE_NAME
value: {{ .Values.edemocracia.siteName | quote }}
- name: STATIC_URL
value: /audiencias/static/
- name: URL_PREFIX
value: audiencias
- name: WEBSERVICE_URL
value: {{ .Values.audiencias.webservice.url | quote }}
- name: WORDS_BLACK_LIST
value: {{ .Values.audiencias.wordsBlacklist | quote }}
resources:
{{- toYaml .Values.audiencias.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/audiencias/public/
name: {{ include "edemocracia.fullname" . }}-audiencias
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-audiencias
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-audiencias
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.13/templates/audienciasweb-service.yaml

@ -0,0 +1,19 @@
{{- if .Values.audiencias.enabled }}
apiVersion: v1
kind: Service
metadata:
name: audienciasweb
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
spec:
type: {{ .Values.audiencias.service.type }}
ports:
- port: {{ .Values.audiencias.service.port }}
targetPort: 8000
protocol: TCP
name: "8000"
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasweb
{{- end }}

147
charts/edemocracia/v0.1.13/templates/audienciasworker-deployment.yaml

@ -0,0 +1,147 @@
{{- if .Values.audiencias.enabled }}
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-audienciasworker
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasworker
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasworker
app.kubernetes.io/component: audiencias
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-audienciasworker
app.kubernetes.io/component: audiencias
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "edemocracia.fullname" . }}-audienciasworker
image: "{{ .Values.audiencias.image.repository }}:{{ .Values.audiencias.image.tag }}"
imagePullPolicy: {{ .Values.audiencias.image.pullPolicy }}
args:
- ./start-worker.sh
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ADMIN_USERNAME
value: admin
- name: ALLOWED_HOSTS
value: audienciasweb, audienciasworker, localhost, 127.0.0.1, "{{ $edemoUrl }}"
- name: COMPRESS_OFFLINE
value: "True"
- name: DATABASE_ENGINE
value: postgresql_psycopg2
- name: DATABASE_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DATABASE_NAME
value: audiencias
- name: DATABASE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USER
value: {{ .Values.postgresql.postgresqlUsername | quote }}
- name: DEBUG
value: "False"
- name: DEFAULT_FROM_EMAIL
value: '"Portal e-Democracia[audiencias]" <{{ .Values.edemocracia.admin.email }}>'
- name: DJANGO_SECRET_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: EMAIL_HOST
value: {{ .Values.smtp.host | quote }}
- name: EMAIL_HOST_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: EMAIL_HOST_USER
value: {{ .Values.smtp.username | quote }}
- name: EMAIL_PORT
value: {{ .Values.smtp.port | quote }}
- name: EMAIL_USE_TLS
value: {{ .Values.smtp.tls | quote }}
- name: ENABLE_REMOTE_USER
value: "True"
- name: FORCE_SCRIPT_NAME
value: /audiencias
- name: GOOGLE_ANALYTICS_ID
value: {{ .Values.edemocracia.googleAnalyticsId }}
- name: LOGIN_REDIRECT_URL
value: /
- name: LOGIN_URL
value: /
- name: LOGOUT_REDIRECT_URL
value: /
- name: NOTIFICATION_EMAIL_LIST
value: "{{ .Values.edemocracia.admin.email }},{{ .Values.audiencias.notifEmailList }}"
- name: OLARK_ID
value: {{ .Values.edemocracia.olarkId | quote }}
- name: RECAPTCHA_PRIVATE_KEY
value: {{ .Values.edemocracia.recaptcha.privateKey | quote }}
- name: RECAPTCHA_SITE_KEY
value: {{ .Values.edemocracia.recaptcha.siteKey | quote }}
- name: REDIS_SERVER
value: {{ (include "redis.fullname" .) }}-master
- name: SESSION_COOKIE_NAME
value: audiencias_session
- name: SITE_DOMAIN
value: "{{ $edemoUrl }}"
- name: SITE_NAME
value: {{ .Values.edemocracia.siteName | quote }}
- name: STATIC_URL
value: /audiencias/static/
- name: URL_PREFIX
value: audiencias
- name: WEBSERVICE_URL
value: {{ .Values.audiencias.webservice.url | quote }}
- name: WORDS_BLACK_LIST
value: {{ .Values.audiencias.wordsBlacklist | quote }}
resources:
{{- toYaml .Values.audiencias.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/audiencias/public/
name: {{ include "edemocracia.fullname" . }}-audiencias
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-audiencias
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-audiencias
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

144
charts/edemocracia/v0.1.13/templates/discourse-deployment.yaml

@ -0,0 +1,144 @@
{{- if .Values.discourse.enabled }}
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-discourse
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: discourse
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: discourse
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- image: "{{ .Values.discourse.image.repository }}:{{ .Values.discourse.image.tag }}"
name: {{ include "edemocracia.fullname" . }}-discourse-cpimgs
command:
- "cp"
- "-au"
- "/var/www/discourse/public/images/."
- "/publicimgs/"
volumeMounts:
- mountPath: /publicimgs/
subPath: images
name: {{ include "edemocracia.fullname" . }}-discourse
containers:
- args:
- ./start-web.sh
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ADMIN_USERNAME
value: admin
- name: DISCOURSE_CONTACT_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: DISCOURSE_CONTACT_URL
value: {{ $edemoUrl }}
- name: DISCOURSE_DB_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DISCOURSE_DB_NAME
value: discourse
- name: DISCOURSE_DB_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DISCOURSE_DB_PORT
value: "5432"
- name: DISCOURSE_DB_USERNAME
value: {{ .Values.postgresql.postgresqlUsername | quote}}
- name: DISCOURSE_DEVELOPER_EMAILS
- name: DISCOURSE_FORCE_HOSTNAME
value: {{ $edemoUrl }}\/expressao
- name: DISCOURSE_HOSTNAME
value: {{ $edemoUrl }}\/expressao
- name: DISCOURSE_NOTIFICATION_EMAIL
value: {{ .Values.edemocracia.admin.email }}
- name: DISCOURSE_REDIS_HOST
value: {{ (include "redis.fullname" .) }}-master
- name: DISCOURSE_REDIS_PORT
value: "6379"
- name: DISCOURSE_RELATIVE_URL_ROOT
value: /expressao
- name: DISCOURSE_SMTP_ADDRESS
value: {{ .Values.smtp.host | quote }}
- name: DISCOURSE_SMTP_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: DISCOURSE_SMTP_PORT
value: {{ .Values.smtp.port | quote }}
- name: DISCOURSE_SMTP_USER_NAME
value: {{ .Values.smtp.username | quote }}
- name: DISCOURSE_SSO_SECRET
value: {{ .Values.discourse.sso.secret | quote }}
- name: DISCOURSE_SSO_URL
value: "https://{{ $edemoUrl }}"
- name: RAILS_ENV
value: production
image: {{.Values.discourse.image.repository}}:{{ .Values.discourse.image.tag }}
imagePullPolicy: {{ .Values.discourse.image.pullPolicy }}
name: {{ include "edemocracia.fullname" . }}-discourse
ports:
- containerPort: 8080
resources:
{{- toYaml .Values.discourse.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/www/discourse/public/assets/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: assets
- mountPath: /var/www/discourse/public/javascripts/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: javascripts
- mountPath: /var/www/discourse/public/images/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: images
- mountPath: /var/www/discourse/tmp/stylesheet-cache/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: stylesheet-cache
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-discourse
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-discourse
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.13/templates/discourse-pvc.yaml

@ -0,0 +1,19 @@
{{- if .Values.discourse.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "edemocracia.fullname" . }}-discourse
spec:
accessModes:
- {{ .Values.discourse.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.discourse.persistence.size }}
{{- if .Values.discourse.persistence.storageClass }}
{{- if (eq "-" .Values.discourse.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.discourse.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.13/templates/discourse-service.yaml

@ -0,0 +1,19 @@
{{- if .Values.discourse.enabled }}
apiVersion: v1
kind: Service
metadata:
name: discourse
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
spec:
type: {{ .Values.discourse.service.type }}
ports:
- port: {{ .Values.discourse.service.port }}
targetPort: 8080
protocol: TCP
name: "8080"
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
{{- end }}

165
charts/edemocracia/v0.1.13/templates/edemocracia-deployment.yaml

@ -0,0 +1,165 @@
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-edemocracia
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: edemocracia
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: edemocracia
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- image: "{{ .Values.edemocracia.image.repository }}:{{ .Values.edemocracia.image.tag }}"
name: {{ include "edemocracia.fullname" . }}-edemocracia-cpmedia
command:
- "cp"
- "-au"
- "/var/labhacker/edemocracia/src/public/media/"
- "/srcpublic/"
volumeMounts:
- mountPath: /srcpublic
name: {{ include "edemocracia.fullname" . }}-edemocracia
containers:
- name: {{ include "edemocracia.fullname" . }}-edemocracia
image: "{{ .Values.edemocracia.image.repository }}:{{ .Values.edemocracia.image.tag }}"
imagePullPolicy: {{ .Values.edemocracia.image.pullPolicy }}
args:
- ./runserver-production
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ADMIN_USERNAME
value: admin
- name: ALLOWED_HOSTS
value: "{{ $edemoUrl }}"
- name: AUDIENCIAS_API_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: AUDIENCIAS_ENABLED
{{- if .Values.audiencias.enabled }}
value: "True"
{{- else }}
value: "False"
{{- end }}
- name: AUDIENCIAS_UPSTREAM
value: http://audienciasweb:8000/audiencias
- name: DATABASE_ENGINE
value: postgresql_psycopg2
- name: DATABASE_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DATABASE_NAME
value: edemocracia
- name: DATABASE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USER
value: {{ .Values.postgresql.postgresqlUsername | quote }}
- name: DEBUG
value: "{{ .Values.edemocracia.debug }}"
- name: DEFAULT_FROM_EMAIL
value: '"Portal e-Democracia" <{{ .Values.edemocracia.admin.email }}>'
- name: DISCOURSE_ENABLED
{{- if .Values.discourse.enabled }}
value: "True"
{{- else }}
value: "False"
{{- end }}
- name: DISCOURSE_SSO_SECRET
value: {{ .Values.discourse.sso.secret | quote }}
# Workaround for a bug in runserver-production script, which does not check for DISCOURSE_ENABLED variable
- name: DISCOURSE_UPSTREAM
{{- if .Values.discourse.enabled }}
value: http://discourse:8080/expressao
{{- else }}
value: "--version"
{{- end }}
- name: EMAIL_BACKEND
value: django.core.mail.backends.smtp.EmailBackend
- name: EMAIL_HOST
value: {{ .Values.smtp.host | quote }}
- name: EMAIL_HOST_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: EMAIL_HOST_USER
value: {{ .Values.smtp.username | quote }}
- name: EMAIL_PORT
value: {{ .Values.smtp.port | quote }}
- name: EMAIL_USE_TLS
value: {{ .Values.smtp.tls | quote }}
- name: GOOGLE_ANALYTICS_ID
value: {{ .Values.edemocracia.googleAnalyticsId | quote }}
- name: OLARK_ID
value: {{ .Values.edemocracia.olarkId | quote }}
- name: RECAPTCHA_PRIVATE_KEY
value: {{ .Values.edemocracia.recaptcha.privateKey | quote }}
- name: RECAPTCHA_SITE_KEY
value: {{ .Values.edemocracia.recaptcha.siteKey | quote }}
- name: SECRET_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: SITE_NAME
value: {{ .Values.edemocracia.siteName | quote }}
- name: SITE_URL
value: "https://{{ $edemoUrl }}"
- name: SOCIAL_AUTH_FACEBOOK_KEY
value: {{ .Values.edemocracia.socialAuth.facebook.key | quote }}
- name: SOCIAL_AUTH_FACEBOOK_SECRET
value: {{ .Values.edemocracia.socialAuth.facebook.secret | quote }}
- name: SOCIAL_AUTH_GOOGLE_OAUTH2_KEY
value: {{ .Values.edemocracia.socialAuth.google.key | quote }}
- name: SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET
value: {{ .Values.edemocracia.socialAuth.google.secret | quote }}
- name: SOCIAL_AUTH_REDIRECT_IS_HTTPS
value: "True"
- name: WIKILEGIS_API_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: WIKILEGIS_API_URL
value: /api/v1/
- name: WIKILEGIS_ENABLED
{{- if .Values.wikilegis.enabled }}
value: "True"
{{- else }}
value: "False"
{{- end }}
- name: WIKILEGIS_UPSTREAM
value: http://wikilegis:8000
resources:
{{- toYaml .Values.edemocracia.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/edemocracia/src/public/
name: {{ include "edemocracia.fullname" . }}-edemocracia
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-edemocracia
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-edemocracia
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

17
charts/edemocracia/v0.1.13/templates/edemocracia-pvc.yaml

@ -0,0 +1,17 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "edemocracia.fullname" . }}-edemocracia
spec:
accessModes:
- {{ .Values.edemocracia.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.edemocracia.persistence.size }}
{{- if .Values.edemocracia.persistence.storageClass }}
{{- if (eq "-" .Values.edemocracia.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.edemocracia.persistence.storageClass }}"
{{- end }}
{{- end }}

17
charts/edemocracia/v0.1.13/templates/edemocracia-service.yaml

@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: edemocracia
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia
spec:
type: {{ .Values.edemocracia.service.type }}
ports:
- port: {{ .Values.edemocracia.service.port }}
targetPort: 8000
protocol: TCP
name: "8000"
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-edemocracia

32
charts/edemocracia/v0.1.13/templates/ingress.yaml

@ -0,0 +1,32 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "edemocracia.fullname" . -}}
{{- $hostName := .Values.edemocracia.hostname -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
tls:
- hosts:
- "{{ $hostName }}"
secretName: {{ $hostName | replace "." "-" }}-tls
rules:
- host: "{{ $hostName }}"
http:
paths:
- path: /
backend:
serviceName: nginx
servicePort: http
{{- end }}

120
charts/edemocracia/v0.1.13/templates/nginx-deployment.yaml

@ -0,0 +1,120 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-nginx
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-nginx
image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}"
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: http
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: http
timeoutSeconds: 1
resources:
{{- toYaml .Values.nginx.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/edemocracia/src/public/
name: {{ include "edemocracia.fullname" . }}-edemocracia
{{- if .Values.wikilegis.enabled }}
- mountPath: /var/labhacker/wikilegis/wikilegis/public/
name: {{ include "edemocracia.fullname" . }}-wikilegis
{{- end }}
{{- if .Values.audiencias.enabled }}
- mountPath: /var/labhacker/audiencias/public/
name: {{ include "edemocracia.fullname" . }}-audiencias
{{- end }}
{{- if .Values.discourse.enabled }}
- mountPath: /var/www/discourse/public/assets/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: assets
- mountPath: /var/www/discourse/public/javascripts/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: javascripts
- mountPath: /var/www/discourse/public/images/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: images
- mountPath: /var/www/discourse/tmp/stylesheet-cache/
name: {{ include "edemocracia.fullname" . }}-discourse
subPath: stylesheet-cache
{{- end }}
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-edemocracia
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-edemocracia
{{- if .Values.wikilegis.enabled }}
- name: {{ include "edemocracia.fullname" . }}-wikilegis
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-wikilegis
{{- end }}
{{- if .Values.audiencias.enabled }}
- name: {{ include "edemocracia.fullname" . }}-audiencias
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-audiencias
{{- end }}
{{- if .Values.discourse.enabled }}
- name: {{ include "edemocracia.fullname" . }}-discourse
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-discourse
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

17
charts/edemocracia/v0.1.13/templates/nginx-service.yaml

@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx
spec:
type: {{ .Values.nginx.service.type }}
ports:
- port: {{ .Values.nginx.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-nginx

39
charts/edemocracia/v0.1.13/templates/velero-schedule-monthly.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-monthly
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on first day of every month
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} 1 * *
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every weekday backup is good for the next year (365 days)
ttl: 8760h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

39
charts/edemocracia/v0.1.13/templates/velero-schedule-weekdays.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-weekdays
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on weekdays
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 1-5
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every weekday backup is good for the next week (7 days)
ttl: 168h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

39
charts/edemocracia/v0.1.13/templates/velero-schedule-weekly.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-weekly
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on sunday
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 0
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every sunday backup is good for 30 days (aprox. 1 month)
ttl: 744h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

144
charts/edemocracia/v0.1.13/templates/wikilegis-deployment.yaml

@ -0,0 +1,144 @@
{{- if .Values.wikilegis.enabled }}
{{- $edemoUrl := .Values.edemocracia.hostname -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edemocracia.fullname" . }}-wikilegis
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
spec:
selector:
matchLabels:
{{- include "edemocracia.selectorLabels" . | nindent 6 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
app.kubernetes.io/component: wikilegis
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
app.kubernetes.io/component: wikilegis
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- image: "{{ .Values.wikilegis.image.repository }}:{{ .Values.wikilegis.image.tag }}"
name: {{ include "edemocracia.fullname" . }}-wikilegis-cpmedia
command:
- "cp"
- "-au"
- "/var/labhacker/wikilegis/wikilegis/public/media/"
- "/wlpublic/"
volumeMounts:
- mountPath: /wlpublic
name: {{ include "edemocracia.fullname" . }}-wikilegis
containers:
- name: {{ include "edemocracia.fullname" . }}-wikilegis
image: "{{ .Values.wikilegis.image.repository }}:{{ .Values.wikilegis.image.tag }}"
imagePullPolicy: {{ .Values.wikilegis.image.pullPolicy }}
args:
- ./start.sh
env:
- name: ADMIN_EMAIL
value: {{ .Values.edemocracia.admin.email | quote }}
- name: ADMIN_PASSWORD
value: {{ .Values.edemocracia.admin.password | quote }}
- name: ALLOWED_HOSTS
value: "{{ $edemoUrl }},wikilegisweb,wikilegis,localhost,127.0.0.1"
- name: API_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: AUTH_USER_MODEL
value: accounts.User
- name: DATABASE_ENGINE
value: postgresql_psycopg2
- name: DATABASE_HOST
value: {{ (include "postgresql.fullname" .) }}
- name: DATABASE_NAME
value: wikilegis
- name: DATABASE_PASSWORD
value: {{ .Values.postgresql.postgresqlPassword | quote }}
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USER
value: {{ .Values.postgresql.postgresqlUsername | quote }}
- name: DEBUG
value: "True"
- name: DEFAULT_FROM_EMAIL
value: '"Portal e-Democracia[Wikilegis]" <{{ .Values.edemocracia.admin.email }}>'
- name: EMAIL_HOST
value: {{ .Values.smtp.host | quote }}
- name: EMAIL_HOST_PASSWORD
value: {{ .Values.smtp.password | quote }}
- name: EMAIL_HOST_USER
value: {{ .Values.smtp.username | quote }}
- name: EMAIL_PORT
value: {{ .Values.smtp.port | quote }}
- name: EMAIL_USE_TLS
value: {{ .Values.smtp.tls | quote }}
- name: ENABLE_REMOTE_USER
value: "True"
- name: FORCE_SCRIPT_NAME
value: /wikilegis
- name: LANGUAGE_CODE
value: pt-br
- name: LOGIN_REDIRECT_URL
value: /
- name: LOGIN_URL
value: /
- name: MEDIA_URL
value: /wikilegis/media/
- name: SECRET_KEY
value: {{ .Values.edemocracia.apikey | quote }}
- name: SESSION_COOKIE_NAME
value: wikilegis_session
- name: SITE_DOMAIN
value: {{ $edemoUrl }}
- name: SITE_NAME
value: {{ .Values.edemocracia.sitename | quote }}
- name: STATIC_URL
value: /wikilegis/static/
- name: TIME_ZONE
value: {{ .Values.edemocracia.timeZone | quote }}
resources:
{{- toYaml .Values.wikilegis.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/labhacker/wikilegis/wikilegis/public/
name: {{ include "edemocracia.fullname" . }}-wikilegis
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: {{ include "edemocracia.fullname" . }}-wikilegis
persistentVolumeClaim:
claimName: {{ include "edemocracia.fullname" . }}-wikilegis
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- {{ include "edemocracia.name" . }}
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Name }}
- key: app.kubernetes.io/component
operator: In
values:
- edemocracia
topologyKey: kubernetes.io/hostname
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.13/templates/wikilegis-pvc.yaml

@ -0,0 +1,19 @@
{{- if .Values.wikilegis.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "edemocracia.fullname" . }}-wikilegis
spec:
accessModes:
- {{ .Values.wikilegis.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.wikilegis.persistence.size }}
{{- if .Values.wikilegis.persistence.storageClass }}
{{- if (eq "-" .Values.wikilegis.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.wikilegis.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

19
charts/edemocracia/v0.1.13/templates/wikilegis-service.yaml

@ -0,0 +1,19 @@
{{- if .Values.wikilegis.enabled }}
apiVersion: v1
kind: Service
metadata:
name: wikilegis
labels:
{{- include "edemocracia.labels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
spec:
type: {{ .Values.wikilegis.service.type }}
ports:
- port: {{ .Values.wikilegis.service.port }}
targetPort: 8000
protocol: TCP
name: "8000"
selector:
{{- include "edemocracia.selectorLabels" . | nindent 4 }}
io.kompose.service: {{ include "edemocracia.fullname" . }}-wikilegis
{{- end }}

206
charts/edemocracia/v0.1.13/values.yaml

@ -0,0 +1,206 @@
# Default values for edemocracia.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
nginx:
image:
repository: labhackercd/nginx-edemocracia
tag: 1.0.0
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
resources:
limits:
cpu: 300m
memory: 150Mi
requests:
cpu: 50m
memory: 30Mi
discourse:
enabled: true
image:
repository: labhackercd/discourse-docker
tag: 2.0.20180703
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8080
sso:
secret: "uma_chave_sso_secreta_mesmo"
persistence:
#storageClass: ""
accessMode: ReadWriteOnce
size: 500Mi
resources:
limits:
cpu: 800m
memory: 1200Mi
requests:
cpu: 100m
memory: 650Mi
wikilegis:
enabled: true
image:
repository: labhackercd/wikilegis
tag: 2.3.0
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8000
persistence:
#storageClass: ""
accessMode: ReadWriteOnce
size: 2Gi
resources:
limits:
cpu: 800m
memory: 350Mi
requests:
cpu: 100m
memory: 200Mi
edemocracia:
admin:
email: seitadmins@interlegis.leg.br
password: p@ssw0rd
apikey: "uma_chave_de_api_secreta_mesmo"
debug: "False"
googleAnalyticsId: ""
olarkId: ""
recaptcha:
siteKey: "altereme"
privateKey: "altereme"
socialAuth:
facebook:
key: ""
secret: ""
google:
key: ""
secret: ""
siteName: "Camara Municipal"
hostname: "edemocracia.teste.df.leg.br"
timeZone: "America/Sao_Paulo"
image:
repository: labhackercd/edemocracia
tag: 1.3.2
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8000
persistence:
#storageClass: ""
accessMode: ReadWriteOnce
size: 4Gi
resources:
limits:
cpu: 500m
memory: 1350Mi
requests:
cpu: 100m
memory: 800Mi
audiencias:
enabled: true
image:
repository: labhackercd/audiencias-publicas
tag: 3.2.0
pullPolicy: IfNotPresent
persistence:
#storageClass: ""
accessMode: ReadWriteOnce
size: 300Mi
notifEmailList: ""
webservice:
url: ""
wordsBlacklist: "merda,cu,cuzao,cuzona,cusao,cusona,bunda,fodido,fodida,foda,foder,fodedor,fudido,fudida,fuder,chupa,chupada,chupador,chupadora,boquete,boqueteira,boquetera,boketeira,boketera,xupa,xupada,xupador,xupadora,pauduro,pauzudo,xoxota,chochota,buceta,boceta,busseta,bosseta,cacete,cassete,caceta,kacete,kassete,caralho,karalho,caraleo,pinto,pica,rola,roludo,gozado,gozada,goso,gosa,gosado,gosado,puta,puto,putinho,putinha,putona,putana,putaria,grelo,grelinho,filhodaputa,filhosdaputa,puta,fdps,siririca,punheta,trepar,trepada,trepadeira,caralho,caralhu,karalho,karalhu,tomarnocu,tomanocu,vadia,bosta,quenga,rabo,bolsa,cuzinho,piroca,pqp,puta que pariu,porra,carai,cú,viado,fdp,vtnc,corno,bicha,bixa,viado,viadinho,pederasta,filho da puta,bundao,bundão,filho de uma egua,filho de uma égua,achacador,achacadora,achacadores,achacar,babaca,bucetas,cagar,cagaram,cambada,caráleo,corja,cornão,covarde,covardes,cretino,cus,cús,cusão,cuzão,cuzinho,cuzona,danar,desgraça,drosoba,enrabar,escória,escroto,escrotas,escrotos,fodão,fodona,fudendo,fuder,idiota,imundo,imundos,ku,kú,lascar,merdas,patifaria,pilantra,pilantragem,pilantras,poha,porcaria,putas,putos,sacanagem,safadeza,safado,safados,salafrário,salafrários,vagabundagem,vagabundo,vagabundos,veadinho,veadinhos"
service:
type: ClusterIP
port: 8000
resources:
limits:
cpu: 500m
memory: 300Mi
requests:
cpu: 50m
memory: 100Mi
smtp:
host: "127.0.0.1"
username: ""
password: ""
port: "25"
tls: "False"
# PostgreSQL definitions
postgresql:
image:
tag: 9.6.17
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 5432
persistence:
enabled: true
size: 2Gi
postgresqlPassword: DbP@ssw0rd
postgresqlUsername: postgres
postgresqlDatabase: root
resources:
requests:
cpu: 50m
memory: 80Mi
# Redis definitions
redis:
image:
tag: 5.0.8
pullPolicy: IfNotPresent
cluster:
enabled: false
usePassword: false
persistence:
enabled: true
accessModes:
- ReadWriteOnce
size: 2Gi
resources:
requests:
cpu: 50m
memory: 150Mi
limits:
cpu: 800m
memory: 1Gi
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
ingress:
enabled: true
# extra annotations only
annotations: {}
velero:
namespace: velero
backup:
enabled: true
snapshotVolumes: false
defaultVolumesToRestic: true
# cert-manager objects are usually blocked during backup
excludedResources:
- certificates.cert-manager.io
- orders.acme.cert-manager.io
- certificaterequests.cert-manager.io
- challenges.acme.cert-manager.io
nodeSelector: {}
tolerations: []
affinity: {}

0
charts/edemocracia/v0.4.0/.helmignore

0
charts/edemocracia/v0.4.0/Chart.lock

0
charts/edemocracia/v0.4.0/Chart.yaml

0
charts/edemocracia/v0.4.0/app-readme.md

0
charts/edemocracia/v0.4.0/charts/postgresql-8.6.13.tgz

0
charts/edemocracia/v0.4.0/charts/redis-10.6.3.tgz

8
charts/edemocracia/v0.4.0/questions.yaml

@ -152,6 +152,14 @@ questions:
required: true required: true
group: Avançado group: Avançado
- variable: velero.backup.enabled
default: true
type: boolean
label: "Habilitar backup com Velero?"
description: "Criar ou não os objetos para backup com o Velero."
required: false
group: Avançado
- variable: edemocracia.apikey - variable: edemocracia.apikey
default: "uma_chave_de_api_secreta_mesmo" default: "uma_chave_de_api_secreta_mesmo"
description: "Chave de API do E-democracia" description: "Chave de API do E-democracia"

0
charts/edemocracia/v0.4.0/templates/NOTES.txt

0
charts/edemocracia/v0.4.0/templates/_helpers.tpl

0
charts/edemocracia/v0.4.0/templates/audiencias-pvc.yaml

0
charts/edemocracia/v0.4.0/templates/audienciasweb-deployment.yaml

0
charts/edemocracia/v0.4.0/templates/audienciasweb-service.yaml

0
charts/edemocracia/v0.4.0/templates/audienciasworker-deployment.yaml

0
charts/edemocracia/v0.4.0/templates/discourse-deployment.yaml

0
charts/edemocracia/v0.4.0/templates/discourse-pvc.yaml

0
charts/edemocracia/v0.4.0/templates/discourse-service.yaml

0
charts/edemocracia/v0.4.0/templates/edemocracia-deployment.yaml

0
charts/edemocracia/v0.4.0/templates/edemocracia-pvc.yaml

0
charts/edemocracia/v0.4.0/templates/edemocracia-service.yaml

0
charts/edemocracia/v0.4.0/templates/ingress.yaml

0
charts/edemocracia/v0.4.0/templates/nginx-deployment.yaml

0
charts/edemocracia/v0.4.0/templates/nginx-service.yaml

39
charts/edemocracia/v0.4.0/templates/velero-schedule-monthly.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-monthly
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on first day of every month
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} 1 * *
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every weekday backup is good for the next year (365 days)
ttl: 8760h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

39
charts/edemocracia/v0.4.0/templates/velero-schedule-weekdays.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-weekdays
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on weekdays
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 1-5
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every weekday backup is good for the next week (7 days)
ttl: 168h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

39
charts/edemocracia/v0.4.0/templates/velero-schedule-weekly.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "edemocracia.fullname" . }}-weekly
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on sunday
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 0
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every sunday backup is good for 30 days (aprox. 1 month)
ttl: 744h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: pgdump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: postgresql
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "PGPASSWORD=$POSTGRES_PASSWORD /opt/bitnami/postgresql/bin/pg_dumpall -U postgres > /bitnami/postgresql/all.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

0
charts/edemocracia/v0.4.0/templates/wikilegis-deployment.yaml

0
charts/edemocracia/v0.4.0/templates/wikilegis-pvc.yaml

0
charts/edemocracia/v0.4.0/templates/wikilegis-service.yaml

13
charts/edemocracia/v0.4.0/values.yaml

@ -186,6 +186,19 @@ ingress:
# extra annotations only # extra annotations only
annotations: {} annotations: {}
velero:
namespace: velero
backup:
enabled: true
snapshotVolumes: false
defaultVolumesToRestic: true
# cert-manager objects are usually blocked during backup
excludedResources:
- certificates.cert-manager.io
- orders.acme.cert-manager.io
- certificaterequests.cert-manager.io
- challenges.acme.cert-manager.io
nodeSelector: {} nodeSelector: {}
tolerations: [] tolerations: []

22
charts/osticket/v0.2.0/.helmignore

@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

9
charts/osticket/v0.2.0/Chart.lock

@ -0,0 +1,9 @@
dependencies:
- name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 10.4.4
- name: memcached
repository: https://charts.bitnami.com/bitnami
version: 6.0.10
digest: sha256:82bd28a75702fa0313d8aedd8686527365365c914f2a5776e722da436e45135c
generated: "2022-04-01T11:42:33.634085-03:00"

16
charts/osticket/v0.2.0/Chart.yaml

@ -0,0 +1,16 @@
apiVersion: v2
appVersion: "1.14.1"
description: OSTicket Open Source Ticket System
name: osticket
icon: https://osticket.com/wp-content/uploads/2021/03/osticket-supsys-new-1-e1616621912452.png
version: 0.2.0
dependencies:
- name: mariadb
version: 10.4.4
repository: https://charts.bitnami.com/bitnami
condition: mariadb.internal
- name: memcached
version: 6.0.10
repository: https://charts.bitnami.com/bitnami
condition: memcached.internal

24
charts/osticket/v0.2.0/README.md

@ -0,0 +1,24 @@
# OSTicket support ticket system Helm chart
This is a Helm chart to install OSTicket with MySQL as database and memcached as session storage.
Requirements:
- Default persistent storage class (StorageClass)
- Ingress Controller (ex: nginx)
## Parameters and default values
| Parametro | Description | Default |
|---------------------------|--------------------------------------------|--------------------------|
| image.repository | Repository of docker image | `interlegis/osticket` |
| image.tag | Docker image version | `1.14.1` |
| image.pullPolicy | Docker image Pull Policy | `IfNotPresent` |
| replicaCount | Number of OSTicket replicas | `1` |
| persistence.enabled | Enable persistent volumes | `true` |
| persistence.storageClass | Persistent volume storage class | `` |
| persistence.accessMode | Persistent volume acces mode | `ReadWriteOnce` |
| persistence.size | Persistent volume size | `10Gi ` |
| installSecret | OSTicket install secret | `` |
| mariadb.auth.database | OSTicket database name | `osticket` |
| mariadb.auth.username | OSTicket database user name | `osticket` |
| mariadb.auth.password | OSTicket database user password | `mysecretpw` |

BIN
charts/osticket/v0.2.0/charts/mariadb-10.4.4.tgz

Binary file not shown.

BIN
charts/osticket/v0.2.0/charts/memcached-6.0.10.tgz

Binary file not shown.

45
charts/osticket/v0.2.0/templates/_helpers.tpl

@ -0,0 +1,45 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "osticket.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "osticket.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "osticket.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "osticket.labels" -}}
app.kubernetes.io/name: {{ include "osticket.name" . }}
helm.sh/chart: {{ include "osticket.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

97
charts/osticket/v0.2.0/templates/deployment.yaml

@ -0,0 +1,97 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "osticket.fullname" . }}
labels:
{{ include "osticket.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "osticket.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "osticket.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- name: {{ .Chart.Name }}-install
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: INSTALL_SECRET
value: "{{ .Values.installSecret }}"
- name: MYSQL_HOST
value: "{{ include "osticket.name" . }}-mariadb"
- name: MYSQL_PASSWORD
value: "{{ .Values.mariadb.auth.password }}"
- name: USE_MEMCACHE
value: "true"
- name: MEMCACHE_NAME
value: "{{ include "osticket.name" . }}-memcached"
command:
- "php"
- "/data/bin/install.php"
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
env:
- name: INSTALL_SECRET
value: "{{ .Values.installSecret }}"
- name: MYSQL_HOST
value: "{{ include "osticket.name" . }}-mariadb"
- name: MYSQL_PASSWORD
value: "{{ .Values.mariadb.auth.password }}"
- name: USE_MEMCACHE
value: "true"
- name: MEMCACHE_NAME
value: "{{ include "osticket.name" . }}-memcached"
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
httpGet:
path: /
port: http
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 2
timeoutSeconds: 1
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

35
charts/osticket/v0.2.0/templates/ingress.yaml

@ -0,0 +1,35 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "osticket.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{ include "osticket.labels" . | indent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

16
charts/osticket/v0.2.0/templates/service.yaml

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "osticket.fullname" . }}
labels:
{{ include "osticket.labels" . | indent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: {{ include "osticket.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

15
charts/osticket/v0.2.0/templates/tests/test-connection.yaml

@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "osticket.fullname" . }}-test-connection"
labels:
{{ include "osticket.labels" . | indent 4 }}
annotations:
"helm.sh/hook": test-success
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "osticket.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never

39
charts/osticket/v0.2.0/templates/velero-schedule-weekdays.yaml

@ -0,0 +1,39 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "osticket.fullname" . }}-weekdays
namespace: {{ .Values.velero.namespace }}
spec:
# generate a random backup time between 1 and 5 AM on weekdays
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 1-5
template:
includedNamespaces:
- {{ .Release.Namespace }}
{{- with .Values.velero.backup.excludedResources }}
excludedResources:
{{- toYaml . | nindent 8 }}
{{- end }}
snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }}
# every weekday backup is good for the next week (7 days)
ttl: 168h0m0s
defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }}
hooks:
resources:
- name: mysqldump
includedResources:
- pods
labelSelector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: mariadb
pre:
- exec:
command:
- "/bin/bash"
- "-c"
- "/opt/bitnami/mariadb/bin/mysqldump osticket -u osticket -p$MARIADB_PASSWORD > /bitnami/mariadb/osticket.dump"
timeout: 360s
onError: Continue
useOwnerReferencesInBackup: false
{{- end }}

100
charts/osticket/v0.2.0/values.yaml

@ -0,0 +1,100 @@
# Default values for osticket.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: interlegis/osticket
tag: 1.14.1
pullPolicy: IfNotPresent
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
installSecret: ""
persistence:
enabled: true
#storageClass: ""
accessMode: ReadWriteOnce
size: 10Gi
velero:
namespace: velero
backup:
enabled: true
snapshotVolumes: false
defaultVolumesToRestic: true
# cert-manager objects are usually blocked during backup
excludedResources:
- certificates.cert-manager.io
- orders.acme.cert-manager.io
- certificaterequests.cert-manager.io
- challenges.acme.cert-manager.io
service:
type: ClusterIP
port: 80
ingress:
enabled: true
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
mariadb:
internal: true
image:
tag: 10.5.13-debian-10-r58
architecture: standalone
auth:
database: osticket
username: osticket
password: mysecretpw
primary:
persistence:
enabled: true
accessModes:
- ReadWriteOnce
size: 20Gi
resources:
requests:
memory: 700Mi
cpu: 100m
memcached:
internal: true
image:
tag: 1.6.13-debian-10-r0
architecture: standalone
replicaCount: 1
pdb:
minAvailable: 1
nodeSelector: {}
tolerations: []
affinity: {}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save