From 97b287b2f22db0ddd0452d5b4cb076706f49102e Mon Sep 17 00:00:00 2001 From: JoostDeCupere Date: Fri, 2 Feb 2024 11:53:27 +0100 Subject: [PATCH] Added support to mount configmaps to the acs image as volumes --- README.md | 18 +++++++++++++ .../templates/acs/acs-deployment.yaml | 25 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/README.md b/README.md index 6cb66dc..52f71f3 100644 --- a/README.md +++ b/README.md @@ -520,6 +520,24 @@ For more information take a look at * Description: If you use an image that is not public. then you can create dockerconfigjson secrets on your cluster and reference them here. +#### `acs.configMapVolumes` + +* Required: false +* Default: None +* Description: A list of configMaps that need to be mounted as volumes to the alfresco pods. Make sure the configMap specified exists. Layout should be as follows: + +```yaml + - name: name1 + mountPath: /apps/example + subPath: subPath/example + readOnly: true + configMapName: "example-configMap" + items: + - key: data-key + path: pathToMountTo +``` + + ### Digital Workspace #### `digitalWorkspace.enabled` diff --git a/xenit-alfresco/templates/acs/acs-deployment.yaml b/xenit-alfresco/templates/acs/acs-deployment.yaml index d70fd7c..c583718 100644 --- a/xenit-alfresco/templates/acs/acs-deployment.yaml +++ b/xenit-alfresco/templates/acs/acs-deployment.yaml @@ -103,6 +103,18 @@ spec: subPath: {{ .subPath }} {{- end }} {{- end }} + {{- if .Values.acs.configMapVolumes }} + {{- range .Values.acs.configMapVolumes }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + {{- if .subPath }} + subPath: {{ .subPath }} + {{- end }} + {{- if .readOnly }} + readOnly: {{ .readOnly }} + {{- end }} + {{- end }} + {{- end }} {{- if .Values.share.mergeAcsShare}} - name: share-container image: {{ .Values.share.image.registry }}/{{ .Values.share.image.repository }}:{{ .Values.share.image.tag }} @@ -169,6 +181,19 @@ spec: claimName: {{ .name }}-pvc {{- end }} {{- end }} + {{- if .Values.acs.configMapVolumes }} + {{- range .Values.acs.configMapVolumes }} + - name: {{ .name }} + configMap: + defaultMode: 420 + name: ldap1-ad-auth-config + items: + {{- range .items }} + - key: {{ .key }} + path: {{ .path }} + {{- end }} + {{- end }} + {{- end }} imagePullSecrets: {{- if .Values.general.imagePullSecrets}} {{ toYaml .Values.general.imagePullSecrets | nindent 8 }}