ballj / terraform-kubernetes-postgresql

Terraform module to create a PostgreSQL server
4 stars 10 forks source link

"operation not permitted" starting pod #1

Open gabrielg-dev opened 2 years ago

gabrielg-dev commented 2 years ago

Hi, I getting an error on "terraform apply" with this tf code:

module "postgresql" {
  source  = "ballj/postgresql/kubernetes"
  version = "~> 1.0"

  image_tag = "9.6.24"
  name = "test"
  username = "test"
  password_secret = "test"
  namespace     = "test1"
  object_prefix = "test-db"
  labels        = {
    "app.kubernetes.io/part-of" = "test1"
  }
}

Error log on OpenShift:

chmod: /var/lib/postgresql/data: Operation not permitted
chmod: /var/run/postgresql: Operation not permitted
The files belonging to this database system will be owned by user "1000700000".
This user must also own the server process.

User number is variable. Did I missed something? Best regards.

ballj commented 1 year ago

Sorry for not updating. I ran this on my cluster and it ran fine. It is likely because of the user permissions on the bitnami image (maybe linked to https://github.com/bitnami/bitnami-docker-postgresql/issues/242 for the version of the code).