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.
73 lines
2.4 KiB
73 lines
2.4 KiB
{{- if .Values.portal.createAndUpgrade }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: {{ include "portalmodelo.fullname" . }}-plonecfg
|
|
labels:
|
|
{{- include "portalmodelo.labels" . | nindent 4 }}
|
|
spec:
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
"helm.sh/hook": post-install,post-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
|
|
initContainers:
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
name: {{ .Release.Name }}-chownplone
|
|
command:
|
|
- "chown"
|
|
- "plone:plone"
|
|
- "/data"
|
|
securityContext:
|
|
runAsNonRoot: false
|
|
runAsUser: 0
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: data
|
|
containers:
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
name: {{ .Release.Name }}-plonecfg
|
|
command: [ "/configure.sh" ]
|
|
env:
|
|
- name: ZEO_ADDRESS
|
|
{{- if .Values.instance.zeoclient }}
|
|
value: {{ template "portalmodelo.fullname" . }}-zeoserver:8100
|
|
{{- else }}
|
|
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 }}
|
|
{{- if eq .Values.persistence.accessMode "ReadWriteMany" }}
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: data
|
|
{{- if .Values.persistence.enabled }}
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: data
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|