truecharts / public

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.15k stars 620 forks source link

[common] Allow custom postgresGID on cnpg definition. #27350

Open nlaille opened 3 months ago

nlaille commented 3 months ago

Is your feature request related to a problem?

I need to be able to set postgresGID in cluster spec for CloudNative PG clusters, otherwise CloudNative PG clusters' pods will inherit the default value (26). I am using NFS (synology) as storage provider, and the GID 26 doesn't exists and cannot be created.

Describe the solution you'd like

Allow custom postgresGID on cnpg definition.

ClusterSpec for CNPG : https://cloudnative-pg.io/documentation/1.15/api_reference/#ClusterSpec

Describe alternatives you've considered

Create CNPG cluster outside of charts, however some charts (authelia) are relying on cnpg values and cannot be overriden.

Additional context

No response

I've read and agree with the following

PrivatePuffin commented 3 months ago

Actually, preferably we have it follow the .Values.securityContext setting unless overridden. So it shouldn't be using 26 in the first place.

Though I would HEAVILY advice running postgresql on a NFS backend.

nlaille commented 3 months ago

@Ornias1993 , I may have missed something, but even with securityContext set, the cnpg clusters' pods won't inherit it. It seems that the only way to change the securityContext of cnpg clusters' pods is with postgresUID and postgresGID.

PrivatePuffin commented 3 months ago

@Ornias1993 , I may have missed something, but even with securityContext set, the cnpg clusters' pods won't inherit it. It seems that the only way to change the securityContext of cnpg clusters' pods is with postgresUID and postgresGID.

That's why I was saying we should implement that instead.

PrivatePuffin commented 3 months ago

Locked as no use input is required.