Repository navigation
Conversation
Carry upstream deeplethe#1552 and deeplethe#1553 onto re-dev
|
@WaylandYang the core chart from #1516 is ready for a look whenever suits you. The network policies and optional parts will follow once this one is in shape. Thank you! |
WaylandYang
left a comment
There was a problem hiding this comment.
Thanks, this matches what we agreed in #1516 closely: deploy/chart, one replica with Recreate and RWO, the image tag tied to compose, external Postgres with CloudNativePG optional, and community-maintained in the README. A few things before it merges:
- CI doesn't check the intended failure.
helm linttreats a missingrequiredvalue as information only, so the no-settings lint passes and nothing verifies that an unconfigured render fails. Could the job addhelm templatesteps (one with minimal values that must succeed, one with none that must fail), and ideally kubeconform on the output? - The CNPG password is regenerated under GitOps. It comes from
lookup(templates/database.yaml:30), which returns nothing underhelm template,--dry-run, Argo CD and Flux, so the role password is rebuilt on every render. Please accept an existing Secret (database.cnpg.existingSecretor similar), or at least document it. - CNPG image.
ghcr.io/cloudnative-pg/postgresql:16-bookwormis the legacy tag. pgvector is only guaranteed in the-standard-images, so please default to16-standard-bookworm, pinned to a minor version. - README notes:
- The pod runs as uid 1000 but compose runs as root, so a data directory moved from compose is root-owned and not writable.
- With
ingress.tlsSecretNameset,UTOPIA_COOKIE_SECUREshould betrue. Setting it automatically when TLS is on would be even better.
7e5b3e2 to
1ce4e3b
Compare
|
@WaylandYang thank you for the careful review, these were all good catches.
Thanks again! |
WaylandYang
left a comment
There was a problem hiding this comment.
Thanks, everything is addressed, and the image tag and the secure cookie look right. One small gap left in CI:
"Render and validate" can miss a failed render. It pipes helm template into kubeconform, and the default shell has no pipefail, so only kubeconform's exit code counts. Please add set -o pipefail at the top of that step. Then it's ready.
…nst your own Postgres or a CloudNativePG one Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
1ce4e3b to
cb0117c
Compare
|
@WaylandYang thank you for catching that! |
WaylandYang
left a comment
There was a problem hiding this comment.
Thanks, this is good to merge. Because each merge puts your other branches behind dev, we'll bring the approved PRs in together through one combined PR, with one commit per PR credited to you. No more rebases needed on this one.
Thank you for welcoming the chart, and for the clear constraints on #1516. This is the first of the three PRs: the core chart under
deploy/chartand a CI check.The chart runs one replica with a
Recreaterollout on a single ReadWriteOnce volume for the data directory. The image isghcr.io/deeplethe/utopiawith the tag taken fromappVersion, which is0.1.0-rc9like thedocker-compose.ymldefault. By default it uses an external Postgres, through a Secret you name or URLs the chart writes into one. CloudNativePG is an optional mode, off by default, that creates the database with pgvector and theutopia_approle before the first migration. For an external database the README shows the SQL to createutopia_appthe waydocker/init-app-role.shdoes. The Ingress is off by default, and the README says the chart is community-maintained.A new
chartjob in CI runshelm lintin both database modes and checks thatappVersionmatches the compose image tag.Two small choices you may want to change. The pod runs as uid 1000 with a read-only root filesystem, which is how we have run this image on our cluster for a while, though compose runs it as root. And a render with no database settings fails on purpose rather than producing a chart that cannot start. Network policies and the other optional parts will follow in the next two PRs.
Part of #1516