CrunchyData / crunchy-containers

Containers for Managing PostgreSQL on Kubernetes by Crunchy Data
https://www.crunchydata.com/
Apache License 2.0
1.02k stars 327 forks source link

Unable to start crunchy-pgadmin4 version 8-4.30-13 and byond #1545

Open sjoerdschunselaar opened 10 months ago

sjoerdschunselaar commented 10 months ago

When I try to start the docker container described on the website: https://www.crunchydata.com/developers/download-postgres/containers/pgadmin4 it will not start. It exists without any message. The last version which started correctly is ubi8-4.30-10.

$ docker run --publish 5050:5050   --volume=pgadmin4:/var/lib/pgadmin   --env-file=postgres-env.list   --name="pgadmin4"   --hostname="pgadmin4"   --network="pgnetwork"   --detach registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-7.8-0
7171d05543c58f424e0c3c5585b5a097988a32048f1a887bab48eb78afeb7eb3

$ docker ps -a
CONTAINER ID   IMAGE                                                                         COMMAND       CREATED              STATUS                          PORTS     NAMES
7171d05543c5   registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-7.8-0   "/bin/bash"   4 seconds ago        Exited (0) 3 seconds ago                  pgadmin4

What is the current behavior? It exited without any information.

What is the expected behavior? It should start.

Other information (e.g. detailed explanation, related issues, etc)

Please tell us about your environment: We tried on OpenShift and Local machine (Mac).

miberecz commented 10 months ago

We encounter the same issue with the ubi8-7.8-0 image

We are using the PGO with this yaml bit:

  userInterface:
    pgAdmin:
      image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-7.8-0
      dataVolumeClaimSpec:
        accessModes:
        - "ReadWriteOnce"
        resources:
          requests:
            storage: 1Gi

But we get the error

Thu Jan 25 15:51:06 UTC 2024 INFO: TLS disabled. Applying http configuration..
cp: cannot stat '/opt/crunchy/conf/pgadmin-http.conf': No such file or directory
cp: cannot stat '/opt/crunchy/conf/config_local.py': No such file or directory
sed: can't read /var/lib/pgadmin/pgadmin.conf: No such file or directory
sed: can't read /var/lib/pgadmin/pgadmin.conf: No such file or directory
sed: can't read /var/lib/pgadmin/pgadmin.conf: No such file or directory
sed: can't read /var/lib/pgadmin/config_local.py: No such file or directory
bash: line 85: PGVERSION: parameter null or not set
hrytskivr commented 7 months ago

We encounter the same issue with the ubi8-7.8-0 image

We are using the PGO with this yaml bit:

  userInterface:
    pgAdmin:
      image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-7.8-0
      dataVolumeClaimSpec:
        accessModes:
        - "ReadWriteOnce"
        resources:
          requests:
            storage: 1Gi

But we get the error

Thu Jan 25 15:51:06 UTC 2024 INFO: TLS disabled. Applying http configuration..
cp: cannot stat '/opt/crunchy/conf/pgadmin-http.conf': No such file or directory
cp: cannot stat '/opt/crunchy/conf/config_local.py': No such file or directory
sed: can't read /var/lib/pgadmin/pgadmin.conf: No such file or directory
sed: can't read /var/lib/pgadmin/pgadmin.conf: No such file or directory
sed: can't read /var/lib/pgadmin/pgadmin.conf: No such file or directory
sed: can't read /var/lib/pgadmin/config_local.py: No such file or directory
bash: line 85: PGVERSION: parameter null or not set

you should use namespaced-scoped pgadmin instead of cluster-scoped:

Also, please note that the PostgresCluster-scoped pgAdmin solution currently utilizes pgAdmin 4.30, which does not support versions of Postgres greater than 14 or ARM architectures. The Namespace-scoped pgAdmin solution (which uses a more recent version of pgAdmin, as shown below) should be utilized instead for full compatibility with ARM and all actively maintained versions of Postgres.

vmandrychenko commented 7 months ago

We have the same problem with images on the official page: https://www.crunchydata.com/developers/download-postgres/containers/postgresql16

We inspected the images, and it appears that docker-entrypoint is missing from the image, so it does nothing.

vmandrychenko commented 7 months ago

We have the same problem with images on the official page: https://www.crunchydata.com/developers/download-postgres/containers/postgresql16

We inspected the images, and it appears that docker-entrypoint is missing from the image, so it does nothing.

Crunchy guys got back to me on this. Their images are not supposed to be used standalone without their operator. The instructions are outdated and will be fixed.