Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about the feature
The problem:
When using Full Text Search in PostgreSQL very often users need to keep dictionaries on a separate folder. The value is specified through a —sharedir flag. Right now in the operator it is not possible to set such folder.
There are multiple ways to approach it. Zalando Operator solves it with providing additionalVolumes:
{code:java}
• additionalVolumes List of additional volumes to mount in each container of the statefulset pod. Each item must contain a name, mountPath, and volumeSource which is a kubernetes volumeSource. It allows you to mount existing PersistentVolumeClaims, ConfigMaps and Secrets inside the StatefulSet. Also an emptyDir volume can be shared between initContainer and statefulSet. Additionaly, you can provide a SubPath for volume mount (a file in a configMap source volume, for example). You can also specify in which container the additional Volumes will be mounted with the targetContainers array option. If targetContainers is empty, additional volumes will be mounted only in the postgres container. If you set the all special item, it will be mounted in all containers (postgres + sidecars). Else you can set the list of target containers in which the additional volumes will be mounted (eg : postgres, telegraf){code}
We may also think if it can be done through a sidecar.
Community Note
Tell us about the feature
The problem:
When using Full Text Search in PostgreSQL very often users need to keep dictionaries on a separate folder. The value is specified through a —sharedir flag. Right now in the operator it is not possible to set such folder.
Described well here: https://forums.percona.com/t/accessing-root-on-percona-postgres-instances/25134/14
Solution hypothesis:
There are multiple ways to approach it. Zalando Operator solves it with providing additionalVolumes: {code:java} • additionalVolumes List of additional volumes to mount in each container of the statefulset pod. Each item must contain a name, mountPath, and volumeSource which is a kubernetes volumeSource. It allows you to mount existing PersistentVolumeClaims, ConfigMaps and Secrets inside the StatefulSet. Also an emptyDir volume can be shared between initContainer and statefulSet. Additionaly, you can provide a SubPath for volume mount (a file in a configMap source volume, for example). You can also specify in which container the additional Volumes will be mounted with the targetContainers array option. If targetContainers is empty, additional volumes will be mounted only in the postgres container. If you set the all special item, it will be mounted in all containers (postgres + sidecars). Else you can set the list of target containers in which the additional volumes will be mounted (eg : postgres, telegraf){code} We may also think if it can be done through a sidecar.
Link to JIRA