From f8d2ac830633a71dc9da83e0e6f138386f260740 Mon Sep 17 00:00:00 2001 From: JoostDeCupere Date: Fri, 2 Feb 2024 11:53:27 +0100 Subject: [PATCH 1/5] 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 }} From 6a16533732ece61f1ae0cb23cb659c668c442f38 Mon Sep 17 00:00:00 2001 From: JoostDeCupere Date: Fri, 2 Feb 2024 14:14:06 +0100 Subject: [PATCH 2/5] Added support to mount configmaps to the acs image as volumes --- xenit-alfresco/templates/acs/acs-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xenit-alfresco/templates/acs/acs-deployment.yaml b/xenit-alfresco/templates/acs/acs-deployment.yaml index c583718..8867a06 100644 --- a/xenit-alfresco/templates/acs/acs-deployment.yaml +++ b/xenit-alfresco/templates/acs/acs-deployment.yaml @@ -186,7 +186,7 @@ spec: - name: {{ .name }} configMap: defaultMode: 420 - name: ldap1-ad-auth-config + name: {{ .name }} items: {{- range .items }} - key: {{ .key }} From 6b592db8a6c736f84655ecf835f49ab64b97e46e Mon Sep 17 00:00:00 2001 From: JoostDeCupere Date: Fri, 2 Feb 2024 14:15:45 +0100 Subject: [PATCH 3/5] Added support to mount configmaps to the acs image as volumes --- xenit-alfresco/templates/acs/acs-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xenit-alfresco/templates/acs/acs-deployment.yaml b/xenit-alfresco/templates/acs/acs-deployment.yaml index 8867a06..f3dc0c7 100644 --- a/xenit-alfresco/templates/acs/acs-deployment.yaml +++ b/xenit-alfresco/templates/acs/acs-deployment.yaml @@ -186,7 +186,7 @@ spec: - name: {{ .name }} configMap: defaultMode: 420 - name: {{ .name }} + name: {{ .configMapName }} items: {{- range .items }} - key: {{ .key }} From bb2c1cef0173ac73cf43a7d052439c23512e8a58 Mon Sep 17 00:00:00 2001 From: JoostDeCupere Date: Mon, 5 Feb 2024 09:13:27 +0100 Subject: [PATCH 4/5] Change the configmaps to use plain yaml instead of predifined values --- README.md | 50 ++++++++++++++++--- .../templates/acs/acs-deployment.yaml | 27 ++-------- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 52f71f3..86f1150 100644 --- a/README.md +++ b/README.md @@ -520,21 +520,55 @@ 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` +#### `acs.configMapVolumes.volumeMounts` * 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 + - mountPath: >- + /usr/local/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/oup-ad1 + name: ldap1-ad-auth-volume + readOnly: true + - mountPath: >- + /usr/local/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/oup-ad2 + name: ldap2-ad-auth-volume + readOnly: true + - mountPath: >- + /usr/local/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/oup-ad3 + name: ldap3-ad-auth-volume readOnly: true - configMapName: "example-configMap" - items: - - key: data-key - path: pathToMountTo +``` + +#### `acs.configMapVolumes.volumes` + +* 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 + - configMap: + defaultMode: 420 + items: + - key: ldap-ad-authentication.properties + path: ldap-ad-authentication.properties + name: ldap1-ad-auth-config + name: ldap1-ad-auth-volume + - configMap: + defaultMode: 420 + items: + - key: ldap-ad-authentication.properties + path: ldap-ad-authentication.properties + name: ldap2-ad-auth-config + name: ldap2-ad-auth-volume + - configMap: + defaultMode: 420 + items: + - key: ldap-ad-authentication.properties + path: ldap-ad-authentication.properties + name: ldap3-ad-auth-config + name: ldap3-ad-auth-volume ``` diff --git a/xenit-alfresco/templates/acs/acs-deployment.yaml b/xenit-alfresco/templates/acs/acs-deployment.yaml index f3dc0c7..26af460 100644 --- a/xenit-alfresco/templates/acs/acs-deployment.yaml +++ b/xenit-alfresco/templates/acs/acs-deployment.yaml @@ -103,17 +103,8 @@ 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 }} + {{- if and .Values.acs.configMapVolumes .Values.acs.configMapVolumes.volumeMounts }} + {{- toYaml .Values.acs.configMapVolumes.volumeMounts | nindent 10 }} {{- end }} {{- if .Values.share.mergeAcsShare}} - name: share-container @@ -181,18 +172,8 @@ spec: claimName: {{ .name }}-pvc {{- end }} {{- end }} - {{- if .Values.acs.configMapVolumes }} - {{- range .Values.acs.configMapVolumes }} - - name: {{ .name }} - configMap: - defaultMode: 420 - name: {{ .configMapName }} - items: - {{- range .items }} - - key: {{ .key }} - path: {{ .path }} - {{- end }} - {{- end }} + {{- if and .Values.acs.configMapVolumes .Values.acs.configMapVolumes.volumes }} + {{ toYaml .Values.acs.configMapVolumes.volumes | nindent 8 }} {{- end }} imagePullSecrets: {{- if .Values.general.imagePullSecrets}} From d7381b9cc5423231b12edf292a49726675044038 Mon Sep 17 00:00:00 2001 From: JoostDeCupere Date: Mon, 5 Feb 2024 09:22:50 +0100 Subject: [PATCH 5/5] rename configmaps from the fields since the use case is more generic --- README.md | 6 +++--- xenit-alfresco/templates/acs/acs-deployment.yaml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 86f1150..9ca16cf 100644 --- a/README.md +++ b/README.md @@ -520,7 +520,7 @@ 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.volumeMounts` +#### `acs.additionalVolumeMounts` * Required: false * Default: None @@ -541,7 +541,7 @@ For more information take a look at readOnly: true ``` -#### `acs.configMapVolumes.volumes` +#### `acs.additionalVolumes` * Required: false * Default: None @@ -2082,7 +2082,7 @@ additional settings can be added through additionalEnvironmentVariables. * Required: false * Default: None -* Description: A list of aditional volume claims that can be added to the alfresco pods. Layout should be as follows: +* Description: A list of additional volume claims that can be added to the alfresco pods. Layout should be as follows: ```yaml - name: name1 diff --git a/xenit-alfresco/templates/acs/acs-deployment.yaml b/xenit-alfresco/templates/acs/acs-deployment.yaml index 26af460..61db1cb 100644 --- a/xenit-alfresco/templates/acs/acs-deployment.yaml +++ b/xenit-alfresco/templates/acs/acs-deployment.yaml @@ -103,8 +103,8 @@ spec: subPath: {{ .subPath }} {{- end }} {{- end }} - {{- if and .Values.acs.configMapVolumes .Values.acs.configMapVolumes.volumeMounts }} - {{- toYaml .Values.acs.configMapVolumes.volumeMounts | nindent 10 }} + {{- if .Values.acs.additionalVolumeMounts }} + {{- toYaml .Values.acs.additionalVolumeMounts | nindent 10 }} {{- end }} {{- if .Values.share.mergeAcsShare}} - name: share-container @@ -172,8 +172,8 @@ spec: claimName: {{ .name }}-pvc {{- end }} {{- end }} - {{- if and .Values.acs.configMapVolumes .Values.acs.configMapVolumes.volumes }} - {{ toYaml .Values.acs.configMapVolumes.volumes | nindent 8 }} + {{- if .Values.acs.additionalVolumes }} + {{ toYaml .Values.acs.additionalVolumes | nindent 8 }} {{- end }} imagePullSecrets: {{- if .Values.general.imagePullSecrets}}