From 17600b03a465a98fa25f38115da0a213edf708ea Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Mon, 7 Mar 2022 14:27:12 -0300 Subject: [PATCH] Leave only one discourse volume --- .../templates/discourse-assets-pvc.yaml | 19 -------------- .../v0.4.0/templates/discourse-cache-pvc.yaml | 19 -------------- .../templates/discourse-deployment.yaml | 25 ++++++++----------- .../v0.4.0/templates/discourse-img-pvc.yaml | 19 -------------- ...scourse-js-pvc.yaml => discourse-pvc.yaml} | 2 +- 5 files changed, 11 insertions(+), 73 deletions(-) delete mode 100644 charts/edemocracia/v0.4.0/templates/discourse-assets-pvc.yaml delete mode 100644 charts/edemocracia/v0.4.0/templates/discourse-cache-pvc.yaml delete mode 100644 charts/edemocracia/v0.4.0/templates/discourse-img-pvc.yaml rename charts/edemocracia/v0.4.0/templates/{discourse-js-pvc.yaml => discourse-pvc.yaml} (89%) diff --git a/charts/edemocracia/v0.4.0/templates/discourse-assets-pvc.yaml b/charts/edemocracia/v0.4.0/templates/discourse-assets-pvc.yaml deleted file mode 100644 index c69d340..0000000 --- a/charts/edemocracia/v0.4.0/templates/discourse-assets-pvc.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.discourse.enabled }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "edemocracia.fullname" . }}-discourse-assets -spec: - accessModes: - - {{ .Values.discourse.persistence.accessMode }} - resources: - requests: - storage: {{ .Values.discourse.persistence.size }} -{{- if .Values.discourse.persistence.storageClass }} -{{- if (eq "-" .Values.discourse.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.discourse.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/edemocracia/v0.4.0/templates/discourse-cache-pvc.yaml b/charts/edemocracia/v0.4.0/templates/discourse-cache-pvc.yaml deleted file mode 100644 index 875ca03..0000000 --- a/charts/edemocracia/v0.4.0/templates/discourse-cache-pvc.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.discourse.enabled }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "edemocracia.fullname" . }}-discourse-cache -spec: - accessModes: - - {{ .Values.discourse.persistence.accessMode }} - resources: - requests: - storage: {{ .Values.discourse.persistence.size }} -{{- if .Values.discourse.persistence.storageClass }} -{{- if (eq "-" .Values.discourse.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.discourse.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/edemocracia/v0.4.0/templates/discourse-deployment.yaml b/charts/edemocracia/v0.4.0/templates/discourse-deployment.yaml index a2adb6a..99e129c 100644 --- a/charts/edemocracia/v0.4.0/templates/discourse-deployment.yaml +++ b/charts/edemocracia/v0.4.0/templates/discourse-deployment.yaml @@ -95,28 +95,23 @@ spec: {{- toYaml .Values.discourse.resources | nindent 12 }} volumeMounts: - mountPath: /var/www/discourse/public/assets/ - name: {{ include "edemocracia.fullname" . }}-discourse-assets + name: {{ include "edemocracia.fullname" . }}-discourse + subPath: assets - mountPath: /var/www/discourse/public/javascripts/ - name: {{ include "edemocracia.fullname" . }}-discourse-js + name: {{ include "edemocracia.fullname" . }}-discourse + subPath: javascripts - mountPath: /var/www/discourse/public/images/ - name: {{ include "edemocracia.fullname" . }}-discourse-img + name: {{ include "edemocracia.fullname" . }}-discourse + subPath: images - mountPath: /var/www/discourse/tmp/stylesheet-cache/ - name: {{ include "edemocracia.fullname" . }}-discourse-cache + name: {{ include "edemocracia.fullname" . }}-discourse + subPath: stylesheet-cache restartPolicy: Always serviceAccountName: "" volumes: - - name: {{ include "edemocracia.fullname" . }}-discourse-assets - persistentVolumeClaim: - claimName: {{ include "edemocracia.fullname" . }}-discourse-assets - - name: {{ include "edemocracia.fullname" . }}-discourse-js - persistentVolumeClaim: - claimName: {{ include "edemocracia.fullname" . }}-discourse-js - - name: {{ include "edemocracia.fullname" . }}-discourse-img - persistentVolumeClaim: - claimName: {{ include "edemocracia.fullname" . }}-discourse-img - - name: {{ include "edemocracia.fullname" . }}-discourse-cache + - name: {{ include "edemocracia.fullname" . }}-discourse persistentVolumeClaim: - claimName: {{ include "edemocracia.fullname" . }}-discourse-cache + claimName: {{ include "edemocracia.fullname" . }}-discourse {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/edemocracia/v0.4.0/templates/discourse-img-pvc.yaml b/charts/edemocracia/v0.4.0/templates/discourse-img-pvc.yaml deleted file mode 100644 index 64568f2..0000000 --- a/charts/edemocracia/v0.4.0/templates/discourse-img-pvc.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.discourse.enabled }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "edemocracia.fullname" . }}-discourse-img -spec: - accessModes: - - {{ .Values.discourse.persistence.accessMode }} - resources: - requests: - storage: {{ .Values.discourse.persistence.size }} -{{- if .Values.discourse.persistence.storageClass }} -{{- if (eq "-" .Values.discourse.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.discourse.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/edemocracia/v0.4.0/templates/discourse-js-pvc.yaml b/charts/edemocracia/v0.4.0/templates/discourse-pvc.yaml similarity index 89% rename from charts/edemocracia/v0.4.0/templates/discourse-js-pvc.yaml rename to charts/edemocracia/v0.4.0/templates/discourse-pvc.yaml index 8d15966..d9e7804 100644 --- a/charts/edemocracia/v0.4.0/templates/discourse-js-pvc.yaml +++ b/charts/edemocracia/v0.4.0/templates/discourse-pvc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "edemocracia.fullname" . }}-discourse-js + name: {{ include "edemocracia.fullname" . }}-discourse spec: accessModes: - {{ .Values.discourse.persistence.accessMode }}