Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KANSUP74-23: introduce additional pvcs activemq #160

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,26 @@ Digital Workspace are disabled.
* Description: If you use an image that is not public. then you can create dockerconfigjson secrets on your cluster and
reference them here.

#### `mq.additionalVolumes`
* Required: false
* Default: None
* Description: A list of additional volumes for the mq pods. Example:
```yaml
- name: activemq-data-1
persistentVolumeClaim:
claimName: alfresco-pvc-1
```

#### `mq.additionalVolumeMounts`
* Required: false
* Default: None
* Description: A list of additional volume mounts for the mq pods. Example:
```yaml
- name: activemq-data-1
mountPath: /mountpath
subPath: subpath
```

### Postgresql

#### `postgresql.enabled`
Expand Down Expand Up @@ -2270,3 +2290,18 @@ additional settings can be added through additionalEnvironmentVariables.
* Required: when `persistentStorage.mq.storageClassName` is `scw-bssd`
* Default: None
* Description: The volume handle pointing to the AWS EFS location

### `persistentStorage.mq.additionalClaims`
* Required: false
* Default: None
* Description: A list of additional volume claims that can be added to the mq pods. Layout should be as follows:

```yaml
- name: name1
mountPath: /apps/example
subPath: subPath/example
storageClassName: "standard"
storage: 2
efs:
volumeHandle: "efs-identifier"
```
24 changes: 22 additions & 2 deletions xenit-alfresco/templates/active-mq/mq-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,22 @@ spec:
{{ toYaml .Values.mq.resources.limits | nindent 14 }}
{{- end }}
{{- end }}
{{- if .Values.persistentStorage.mq.enabled }}
volumeMounts:
{{- if .Values.persistentStorage.mq.enabled }}
- name: data
mountPath: /opt/activemq/data
subPath: mq/data
{{- end }}
{{- if .Values.persistentStorage.mq.additionalClaims }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you also want to enable addittionalClaims (to be managed by the helm helper) you should also alter the mq-volumes.yaml (see alfresco-volumes.yaml)
{{- if .additionalClaims }} {{- range .additionalClaims }} {{- $name := .name -}} {{- $storageClassName := .storageClassName -}} {{- $storage := .storage -}} {{- $efsVolumeHandle := .efs.volumeHandle -}} {{- include "hepers.volumeHelper" (list $namespace $name $storageClassName $storage $efsVolumeHandle) }}

{{- range .Values.persistentStorage.mq.additionalClaims }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- if .Values.mq.additionalVolumeMounts }}
{{- toYaml .Values.mq.additionalVolumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.persistentStorage.mq.initVolumes }}
initContainers:
- name: init-fs
Expand All @@ -109,10 +119,20 @@ spec:
{{- if .Values.mq.imagePullSecrets}}
{{ toYaml .Values.mq.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.persistentStorage.mq.enabled }}
volumes:
{{- if .Values.persistentStorage.mq.enabled }}
- name: data
persistentVolumeClaim:
claimName: mq-pvc
{{- end }}
{{- if .Values.persistentStorage.mq.additionalClaims }}
{{- range .Values.persistentStorage.mq.additionalClaims }}
- name: {{ .name }}
persistentVolumeClaim:
claimName: {{ .name }}-pvc
{{- end }}
{{- end }}
{{- if .Values.mq.additionalVolumes }}
{{- toYaml .Values.mq.additionalVolumes | nindent 8 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions xenit-alfresco/templates/storage/mq-volumes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,15 @@
{{- $efsVolumeHandle := .efs.volumeHandle -}}
{{- include "hepers.volumeHelper" (list $namespace $name $storageClassName $storage $efsVolumeHandle) }}
{{- end }}
{{- if .additionalClaims }}
{{- range .additionalClaims }}
{{- $name := .name -}}
{{- $storageClassName := .storageClassName -}}
{{- $storage := .storage -}}
{{- $efsVolumeHandle := .efs.volumeHandle -}}
{{- include "hepers.volumeHelper" (list $namespace $name $storageClassName $storage $efsVolumeHandle) }}
---
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Loading