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

Conversation

pvriel
Copy link
Contributor

@pvriel pvriel commented Sep 20, 2024

Started from https://xenitsupport.jira.com/browse/KANSUP74-23

Kansspelcommissie uses an NFS mount for both the ACS, Solr & ActiveMQ data.
For ACS, the problem was previously addressed by disabling the persistent storage of the ACS pods & adding a replacement volume & mount for a PV(C) pointing to the NFS mount. However, this option does not seem to be possible for ActiveMQ with the current version of our Helm charts.

This PR:

  • introduces the mq.additionalVolumes option;
  • introduces the mq.additionalVolumeMounts option;
  • introduces the persistentStorage.mq.additionalClaims option.

An alternative solution would have been to introduce NFS support in the volume helper. However, most templates for Kansspelcommissie have already been written, so investing time in this alternative approach seems to be wasteful at the moment.

Copy link
Contributor

@gert-glassee gert-glassee left a comment

Choose a reason for hiding this comment

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

you should set the volumeMounts: and volumes: entry outside of the check otherwise you cannot disable persistentstorage and use the alternative manualy created volumemount.

` volumeMounts:
{{- if .Values.persistentStorage.mq.enabled }}
              - name: data`

@@ -84,6 +84,16 @@ spec:
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) }}

@pvriel
Copy link
Contributor Author

pvriel commented Sep 23, 2024

@gert-glassee I'm confused; I thought that is already the case:

{{- if .Values.persistentStorage.mq.enabled }}
volumeMounts:
- name: data
mountPath: /opt/activemq/data
subPath: mq/data
{{- end }}
{{- if .Values.persistentStorage.mq.additionalClaims }}
{{- range .Values.persistentStorage.mq.additionalClaims }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}

I thought the first 'end'-statement ended the if-statment.

Same here:

{{- if .Values.persistentStorage.mq.enabled }}
volumes:
- 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 }}

@pvriel pvriel force-pushed the KANSUP74-23-introduce-additional-pvcs-activemq branch from f575a3e to d864101 Compare September 24, 2024 08:54
@pvriel pvriel force-pushed the KANSUP74-23-introduce-additional-pvcs-activemq branch from d864101 to 1545994 Compare September 24, 2024 08:54
@pvriel
Copy link
Contributor Author

pvriel commented Sep 24, 2024

Ignore my previous comments; I was wrong. The necessary changes have been applied.

@pvriel pvriel merged commit 02bc685 into master Sep 24, 2024
1 check passed
@pvriel pvriel deleted the KANSUP74-23-introduce-additional-pvcs-activemq branch September 24, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants