Fábio Kaiser Rauber
4 years ago
3 changed files with 64 additions and 31 deletions
@ -0,0 +1,60 @@ |
|||||
|
{{- 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 }} |
Loading…
Reference in new issue