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. 12
      charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml
  3. 8
      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 - nginx
- alb - 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 # Configurações Avançadas
- variable: portal.timeZone - variable: portal.timeZone
default: "America/Sao_Paulo" default: "America/Sao_Paulo"

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

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

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

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

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

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

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

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

Loading…
Cancel
Save