You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
4.8 KiB
128 lines
4.8 KiB
{{- 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
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "edemocracia.selectorLabels" . | nindent 8 }}
|
|
io.kompose.service: {{ include "edemocracia.fullname" . }}-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 }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|