Browse Source

Default portalmodelo do ReadWriteOnce volumes

master
Fábio Kaiser Rauber 4 years ago
parent
commit
7210da74ae
  1. 19
      charts/portalmodelo/v0.5.0/questions.yaml
  2. 10
      charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml
  3. 6
      charts/portalmodelo/v0.5.0/templates/zeopack-cronjob.yaml
  4. 2
      charts/portalmodelo/v0.5.0/templates/zeoserver-deployment.yaml
  5. 2
      charts/portalmodelo/v0.5.0/values.yaml

19
charts/portalmodelo/v0.5.0/questions.yaml

@ -91,6 +91,25 @@ questions:
- nginx
- alb
# Configurações de Armazenamento
- variable: persistence.accessMode
default: ReadWriteOnce
type: enum
label: "Modo de acesso do volume"
description: "ReadWriteOnce para volumes de bloco, ReadWriteMany para volumes de arquivo (NFS)."
options:
- "ReadWriteOnce"
- "ReadWriteMany"
required: true
group: Armazenamento
- variable: persistence.size
default: 2Gi
type: string
required: false
label: "Tamanho do volume"
description: "Espaço em disco disponível para o portal."
group: Armazenamento
# Configurações Avançadas
- variable: portal.timeZone
default: "America/Sao_Paulo"

10
charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml

@ -43,7 +43,6 @@ spec:
volumeMounts:
- mountPath: /data
name: data
{{- end }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
name: {{ .Release.Name }}-initplone
command:
@ -56,6 +55,7 @@ spec:
volumeMounts:
- mountPath: /data
name: data
{{- end }}
{{- if .Values.portal.createAndUpgrade }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
name: {{ .Release.Name }}-plonecfg
@ -91,9 +91,11 @@ spec:
{{- if .Values.instance.zeoclient }}
- name: ZEO_ADDRESS
value: {{ template "portalmodelo.fullname" . }}-zeoserver:8100
{{- if eq .Values.persistence.accessMode "ReadWriteMany"}}
- name: ZEO_SHARED_BLOB_DIR
value: "on"
{{- end }}
{{- end }}
- name: TZ
value: {{ .Values.portal.timeZone }}
- name: ZODB_CACHE_SIZE
@ -124,19 +126,19 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
{{- if eq .Values.persistence.accessMode "ReadWriteMany" }}
volumeMounts:
- mountPath: /data
name: data
{{- end }}
resources:
{{- toYaml .Values.resources.plone | nindent 12 }}
restartPolicy: Always
{{- if .Values.persistence.enabled }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: data
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:

6
charts/portalmodelo/v0.5.0/templates/zeopack-cronjob.yaml

@ -35,19 +35,19 @@ spec:
value: {{ template "portalmodelo.fullname" . }}-zeoserver:8100
- name: TZ
value: {{ .Values.portal.timeZone }}
{{- if eq .Values.persistence.accessMode "ReadWriteMany" }}
volumeMounts:
- mountPath: /data
name: data
{{- end }}
resources:
{{- toYaml .Values.resources.zeo | nindent 16 }}
restartPolicy: OnFailure
{{- if and .Values.persistence.enabled (eq .Values.persistence.accessMode "ReadWriteMany") }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: data
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:

2
charts/portalmodelo/v0.5.0/templates/zeoserver-deployment.yaml

@ -66,8 +66,10 @@ spec:
args:
- zeoserver
env:
{{- if eq .Values.persistence.accessMode "ReadWriteMany"}}
- name: ZEO_SHARED_BLOB_DIR
value: "on"
{{- end }}
- name: TZ
value: {{ .Values.portal.timeZone }}
imagePullPolicy: {{ .Values.image.pullPolicy }}

2
charts/portalmodelo/v0.5.0/values.yaml

@ -17,7 +17,7 @@ fullnameOverride: ""
persistence:
enabled: true
#storageClass: ""
accessMode: ReadWriteMany
accessMode: ReadWriteOnce
size: 2Gi
portal:

Loading…
Cancel
Save