From d5524bce47bc9e8cb47dfbf45045d3f2c390fafa Mon Sep 17 00:00:00 2001 From: Andrei Rebegea Date: Thu, 15 Mar 2018 15:09:45 +0200 Subject: [PATCH] Merge DEPLOY-321 as part of REPO-3335 --- helm/alfresco-content-services/requirements.yaml | 6 +----- .../templates/deployment-repository.yaml | 8 ++++++++ .../templates/deployment-solr.yaml | 10 +++++++++- helm/alfresco-content-services/values.yaml | 14 +++++++++++++- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/helm/alfresco-content-services/requirements.yaml b/helm/alfresco-content-services/requirements.yaml index c9adec13f..5dfbc3cf4 100644 --- a/helm/alfresco-content-services/requirements.yaml +++ b/helm/alfresco-content-services/requirements.yaml @@ -3,8 +3,4 @@ dependencies: - name: postgresql version: 0.8.5 repository: https://kubernetes-charts.storage.googleapis.com/ - condition: postgresql.enabled -- name: nginx-ingress - version: ^0.8.21 - repository: https://kubernetes-charts.storage.googleapis.com - condition: alfresco-content-services.nginx-ingress.enabled \ No newline at end of file + condition: postgresql.enabled \ No newline at end of file diff --git a/helm/alfresco-content-services/templates/deployment-repository.yaml b/helm/alfresco-content-services/templates/deployment-repository.yaml index 84ecceb69..9b923c565 100644 --- a/helm/alfresco-content-services/templates/deployment-repository.yaml +++ b/helm/alfresco-content-services/templates/deployment-repository.yaml @@ -28,7 +28,15 @@ spec: - containerPort: {{ .Values.repository.image.internalPort }} resources: {{ toYaml .Values.repository.resources | indent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.persistence.repository.data.mountPath }} + subPath: {{ .Values.persistence.repository.data.subPath }} initContainers: - name: init-db image: busybox command: ['sh', '-c', 'until nc -w1 {{ template "database.hostname" . }} {{ template "database.port" . }}; do echo "waiting for {{ .Values.database.type }}"; sleep 2; done;'] + volumes: + - name: data + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim }} diff --git a/helm/alfresco-content-services/templates/deployment-solr.yaml b/helm/alfresco-content-services/templates/deployment-solr.yaml index 7a8901e9c..23f0aea65 100644 --- a/helm/alfresco-content-services/templates/deployment-solr.yaml +++ b/helm/alfresco-content-services/templates/deployment-solr.yaml @@ -27,4 +27,12 @@ spec: ports: - containerPort: {{ .Values.solr.image.internalPort }} resources: -{{ toYaml .Values.solr.resources | indent 12 }} \ No newline at end of file +{{ toYaml .Values.solr.resources | indent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.persistence.solr.data.mountPath }} + subPath: {{ .Values.persistence.solr.data.subPath }} + volumes: + - name: data + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim }} \ No newline at end of file diff --git a/helm/alfresco-content-services/values.yaml b/helm/alfresco-content-services/values.yaml index 9d81af9e9..f6d0d60c0 100644 --- a/helm/alfresco-content-services/values.yaml +++ b/helm/alfresco-content-services/values.yaml @@ -51,7 +51,7 @@ solr: image: repository: quay.io/alfresco/search-services tag: "1.2.0-SNAPSHOT" - pullPolicy: IfNotPresent + pullPolicy: Always internalPort: 8983 service: name: solr @@ -61,12 +61,24 @@ solr: path: /solr environment: SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive + SOLR_OPTS: "-Dsolr.content.dir=/opt/alfresco-search-services/data/contentstore" resources: requests: memory: "250Mi" limits: memory: "500Mi" +persistence: + existingClaim: "alfresco-volume-claim" + repository: + data: + mountPath: "/usr/local/tomcat/alf_data" + subPath: "alfresco-content-services/repository-data" + solr: + data: + mountPath: "/opt/alfresco-search-services/data" + subPath: "alfresco-content-services/solr-data" + database: type: postgresql