Skip to content

Set the user/uid of the PG image to postgres/100/102

Brouberol requested to merge T364797-pg-uid into main

Set the user/uid of the PG image to postgres/100/102

The operator defaults to using UID/GID 26

~/code/cloudnative-pg #v1.23.3 ?1 ❯ rg 26 -g "*.go"
api/v1/cluster_types.go
105:    defaultPostgresUID = 26
108:    defaultPostgresGID = 26
276:    // The UID of the `postgres` user inside the image, defaults to `26`
277:    // +kubebuilder:default:=26
281:    // The GID of the `postgres` user inside the image, defaults to `26`
282:    // +kubebuilder:default:=26

However, this UID is already taken. On top of that, the postgress user seem to be provisioned by the PG debian packages we install:

postgres:x:100:102:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash

Bug: T364797

Edited by Brouberol

Merge request reports