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.
61 lines
1.9 KiB
61 lines
1.9 KiB
4 years ago
|
{{- if .Values.portal.createAndUpgrade }}
|
||
|
apiVersion: batch/v1
|
||
|
kind: Job
|
||
|
metadata:
|
||
|
name: {{ include "portalmodelo.fullname" . }}-plonecfg
|
||
|
labels:
|
||
|
{{- include "portalmodelo.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
backoffLimit: 0
|
||
|
template:
|
||
|
metadata:
|
||
|
annotations:
|
||
|
"helm.sh/hook": pre-install,pre-upgrade
|
||
|
"helm.sh/hook-weight": "-1"
|
||
|
labels:
|
||
|
{{- include "portalmodelo.ploneSelectorLabels" . | nindent 8 }}
|
||
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
|
restartPolicy: Never
|
||
|
containers:
|
||
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||
|
name: {{ .Release.Name }}-plonecfg
|
||
|
command: [ "/configure.sh" ]
|
||
|
env:
|
||
|
{{- if .Values.instance.zeoclient }}
|
||
|
- name: ZEO_ADDRESS
|
||
|
value: {{ template "portalmodelo.fullname" . }}-zeoserver:8100
|
||
|
{{- else }}
|
||
|
- name: ZEO_ADDRESS
|
||
|
value: ""
|
||
|
{{- end }}
|
||
|
- name: EMAIL
|
||
|
value: {{ .Values.portal.adminEmail }}
|
||
|
- name: PASSWORD
|
||
|
value: {{ .Values.portal.adminPassword }}
|
||
|
- name: TITLE
|
||
|
value: {{ .Values.portal.title }}
|
||
|
- name: DESCR
|
||
|
value: {{ .Values.portal.description }}
|
||
|
- name: HOSTNAME
|
||
|
value: {{ .Values.portal.hostname }}
|
||
|
- name: ROOTPWD
|
||
|
value: {{ .Values.portal.rootPassword }}
|
||
|
- name: TZ
|
||
|
value: {{ .Values.portal.timeZone }}
|
||
|
volumeMounts:
|
||
|
- mountPath: /data
|
||
|
name: data
|
||
|
{{- if .Values.persistence.enabled }}
|
||
|
volumes:
|
||
|
- name: data
|
||
|
persistentVolumeClaim:
|
||
|
claimName: data
|
||
|
{{- end }}
|
||
|
{{- end }}
|