|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ include "portalmodelo.fullname" . }}-plone
|
|
|
|
labels:
|
|
|
|
{{- include "portalmodelo.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
{{- end }}
|
|
|
|
strategy:
|
|
|
|
{{- if .Values.instance.zeoclient }}
|
|
|
|
type: RollingUpdate
|
|
|
|
{{- else }}
|
|
|
|
type: Recreate
|
|
|
|
{{- end }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "portalmodelo.selectorLabels" . | nindent 6 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
{{- with .Values.podAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
labels:
|
|
|
|
{{- include "portalmodelo.selectorLabels" . | nindent 8 }}
|
|
|
|
spec:
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
securityContext:
|
|
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
|
|
initContainers:
|
|
|
|
{{- if not .Values.instance.zeoclient }}
|
|
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
|
|
name: {{ .Release.Name }}-rmlock
|
|
|
|
command:
|
|
|
|
- "rm"
|
|
|
|
- "-f"
|
|
|
|
- "/data/filestorage/Data.fs.lock"
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /data
|
|
|
|
name: data
|
|
|
|
{{- end }}
|
|
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
|
|
name: {{ .Release.Name }}-initplone
|
|
|
|
command:
|
|
|
|
- "mkdir"
|
|
|
|
- "-p"
|
|
|
|
- "/data/filestorage"
|
|
|
|
- "/data/blobstorage"
|
|
|
|
- "/data/instance"
|
|
|
|
- "/data/log"
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /data
|
|
|
|
name: data
|
|
|
|
{{- if .Values.portal.createAndUpgrade }}
|
|
|
|
- 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
|
|
|
|
{{- end }}
|
|
|
|
containers:
|
|
|
|
- env:
|
|
|
|
{{- if .Values.instance.zeoclient }}
|
|
|
|
- name: ZEO_ADDRESS
|
|
|
|
value: {{ template "portalmodelo.fullname" . }}-zeoserver:8100
|
|
|
|
- name: ZEO_SHARED_BLOB_DIR
|
|
|
|
value: "on"
|
|
|
|
{{- end }}
|
|
|
|
- name: TZ
|
|
|
|
value: {{ .Values.portal.timeZone }}
|
|
|
|
- name: ZODB_CACHE_SIZE
|
|
|
|
value: "{{ .Values.portal.zodbCacheSize }}"
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
name: {{ .Release.Name }}-plone
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
- containerPort: 8881
|
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- /plone/instance/bin/instance
|
|
|
|
- monitor
|
|
|
|
- health_ok
|
|
|
|
initialDelaySeconds: 180
|
|
|
|
failureThreshold: 2
|
|
|
|
periodSeconds: 400
|
|
|
|
successThreshold: 1
|
|
|
|
timeoutSeconds: 5
|
|
|
|
readinessProbe:
|
|
|
|
failureThreshold: 3
|
|
|
|
httpGet:
|
|
|
|
path: /
|
|
|
|
port: 8080
|
|
|
|
initialDelaySeconds: 90
|
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
|
|
|
timeoutSeconds: 2
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /data
|
|
|
|
name: data
|
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.resources.plone | nindent 12 }}
|
|
|
|
restartPolicy: Always
|
|
|
|
volumes:
|
|
|
|
- name: data
|
|
|
|
{{- if .Values.persistence.enabled }}
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: data
|
|
|
|
{{- else }}
|
|
|
|
emptyDir: {}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|