Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgTGF-0007IS-DJ for pgadmin-hackers@arkaria.postgresql.org; Thu, 27 Jun 2019 12:12:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hgTGD-0007ro-C1 for pgadmin-hackers@arkaria.postgresql.org; Thu, 27 Jun 2019 12:12:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgTGD-0007rg-2X for pgadmin-hackers@lists.postgresql.org; Thu, 27 Jun 2019 12:12:17 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgTG5-0003nD-Td for pgadmin-hackers@lists.postgresql.org; Thu, 27 Jun 2019 12:12:16 +0000 Received: by mail-wr1-x441.google.com with SMTP id n4so2255776wrw.13 for ; Thu, 27 Jun 2019 05:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=lwdVX2SZX+75XhFQwVRY97DxAOK6IfaFl0ErJSdAm7A=; b=l8tX0VegwX7Z3vxJ1Ehrg6wJQ/cAErFxNK37f0Ue+Yyrt0YQUvtYdhgYectGdZ72rV lGd/ccy6EiJmYgiPJdyW4OLteZJjkHCB56F3sG9B3/t9Oc/w0zcbuFs78fqQY20wLZCk OT8tBLjszp9WwUVMGVghX4NHyd9vGNc9jGlZXqiDHaxio2jVJvFDPTpEdBlDhW1wnqVi p4kfdMW/qAPT6megwvJzOOLBpwsY7ZtIJurSAqD/3R+ZY3i4OrlpMvGMm/ZSWXdrXB5F 2AU3QUNvcsj57ZugNCg6to12A8GYW/IKW/TtfWeFTzxfRB681QxPJDXiLoV8sOWedbO6 S9gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=lwdVX2SZX+75XhFQwVRY97DxAOK6IfaFl0ErJSdAm7A=; b=G3gX3Qg85/c3J7swWqcc1qRYMNsJZj/lqdk9csWvCQgDJLJdLckrReppzACz243GHU s1sA4TZ82njcw8jU6SJU1JmD/WseR2RSN7He6i/mkj55qNiCOWxxn/W7BAnkYFcKqfDn hd7ETZ5OhMw6ffUCTSg3wG2XeWhylv41vTDSNbMczL3PdQTLjWj7r8hUQ7C5A9Xg+x6n 1rMFuVwuRZBdaQk3EoEGgH/0RZv4l3qIVCjqA2NQQv97E0+sMgnTBpEy5q9F6uyEw4+U ZLZGimC1O5LSwE/C6Iz3u0Ly/hKnLOQZABMOqDPMezZdGzx+cSHLYEkvrnHbgCRgI8EO CgbA== X-Gm-Message-State: APjAAAXNW1iiTS2OjU9FdzgdIOnaYBJ8C2ph5FH/3c7pCHz7KpsCMpYR UmBlNigoqNI3VTOLBX75iwxAYUT+hPpuBQVVtRdgGL3q X-Google-Smtp-Source: APXvYqynTxbrqIR03oseGLuqJJgOI8wgKUpeRZ1kqpPKveLbnMN2rDlQ0qhhS+/+oz7oVjRSZaeC2OqcLvEX3YEja1c= X-Received: by 2002:a5d:5189:: with SMTP id k9mr3169377wrv.45.1561637527196; Thu, 27 Jun 2019 05:12:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrew Coleman Date: Thu, 27 Jun 2019 08:11:55 -0400 Message-ID: Subject: Re: change to Docker entrypoint.sh To: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000139939058c4d1293" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000139939058c4d1293 Content-Type: text/plain; charset="UTF-8" On Fri, Jun 21, 2019 at 4:24 AM Dave Page wrote: > Hi > > On Thu, Jun 20, 2019 at 5:31 PM Andrew Coleman > wrote: > >> Hi All! >> >> I am new to this, so I apologize beforehand if it's not entirely kosher, >> but I have a proposed change to the Dockerfile entrypoint.sh to allow for >> configurable servers.json filename path. >> >> The reasoning behind this is that I have a Kubernetes deployment of >> pgadmin where I build a ConfigMap sort of dynamically. I can make the file >> appear in /pgadmin4, but it removes the contents of the directory for me >> (helpful!). Instead, I put it into a separate directory and set a new >> environment variable that defaults to the old pathname >> (backwards-compatible!) but allows me to set a custom environment variable >> in my custom Helm chart for my deployment. >> > > pgAdmin removes the content of the directory? I'm not sure how it would do > that - it doesn't delete anything like that. > pgAdmin does not do that. It behaves as you would expect. Kubernetes removes the contents for me. It basically allows one of two options: file available at /pgadmin4/servers.json/servers.json and pgadmin works, but never loads the file file available at /pgadmin4/servers.json and nothing works because the only file in /pgadmin4 is servers.json > >> >> The code is here: >> >> https://github.com/penguincoder/pgadmin4/commit/0865400385ac0d03bf69d183e8cd9aaec6dcf318 >> >> Is this something that anyone is interested in? >> > > Sure. > > >> Does it meet your coding standards? >> > > Looks fine to me. > > >> What do I do next? >> >> I would love to move back to the "official" pgadmin container. >> > > Please raise a feature request at > https://redmine.postgresql.org/projects/pgadmin4/issues/new and attach > the patch (just use git diff against a checkout of the master branch). You > can send the patch here, but we need the feature request in the tracker > anyway, so it's probably easier to attach it there. > > Thanks! > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --000000000000139939058c4d1293 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Jun 21, 2019 at 4:24 AM Dave = Page <dpage@pgadmin.org> wro= te:
Hi

On Thu, Jun 20, 2019 at 5:31 PM Andrew Coleman <= penguincoder@gm= ail.com> wrote:
Hi All!

I am new to t= his, so I apologize beforehand if it's not entirely kosher, but I have = a proposed change to the Dockerfile entrypoint.sh to allow for configurable= servers.json filename path.

The reasoning behind = this is that I have a Kubernetes deployment of pgadmin where I build a Conf= igMap sort of dynamically. I can make the file appear in /pgadmin4, but it = removes the contents of the directory for me (helpful!). Instead, I put it = into a separate directory and set a new environment variable that defaults = to the old pathname (backwards-compatible!) but allows me to set a custom e= nvironment variable in my custom Helm chart for my deployment.
<= /blockquote>

pgAdmin removes the content of the director= y? I'm not sure how it would do that - it doesn't delete anything l= ike that.

pgAdmin does no= t do that. It behaves as you would expect. Kubernetes removes the contents = for me. It basically allows one of two options:

fi= le available at /pgadmin4/servers.json/servers.json and pgadmin works, but = never loads the file
file available at /pgadmin4/servers.json and= nothing works because the only file in /pgadmin4 is servers.json

=C2=A0

The code is here= :

Sure.
=C2=A0
Does it m= eet your coding standards?

= Looks fine to me.
=C2=A0
What do I do next?

I would love to move back to the "official" pgad= min container.

Please raise a f= eature request at=C2=A0https://redmine.postgresql.org/projec= ts/pgadmin4/issues/new=C2=A0and attach the patch (just use git diff aga= inst a checkout of the master branch). You can send the patch here, but=C2= =A0=C2=A0we need the feature request in the tracker anyway, so it's pro= bably easier to attach it there.

Thanks!


--
Dave Page
Blog: http://pgsnake.blogspot.com
T= witter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise P= ostgreSQL Company
--000000000000139939058c4d1293--