percona / roadmap

Public Percona Roadmaps
10 stars 1 forks source link

[K8SPG-440] Mount additional volumes into PG container #99

Open spron-in opened 10 months ago

spron-in commented 10 months ago

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