feat(flame-hub): replace Bitnami PostgreSQL subchart with self-hosted Postgres#148
Draft
tada5hi wants to merge 1 commit into
Draft
feat(flame-hub): replace Bitnami PostgreSQL subchart with self-hosted Postgres#148tada5hi wants to merge 1 commit into
tada5hi wants to merge 1 commit into
Conversation
… postgres The Bitnami postgresql subchart's maintained images now require a paid Bitnami subscription. Replace it with a minimal, operator-free single-node PostgreSQL StatefulSet on the official postgres image. It preserves the existing release-scoped contract: the Service is published as "<release>-postgresql-primary" on 5432 and the superuser password is read from the shared flame-hub-auth credentials secret. Harbor's externalDatabase, authup and the server-* services therefore connect with no per-release overrides, and the chart can still be installed multiple times in one namespace. An init ConfigMap pre-creates the core/storage/telemetry/auth/registry databases (and Harbor's schema_migrations table). A lighter-weight alternative to the CloudNativePG migration in #147.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Bitnami's licensing change moved its maintained images behind a paid Bitnami Secure subscription (the chart already pins
bitnamilegacy/*images as a stopgap). We need to drop the Bitnami postgresql subchart.This is a deliberately lighter-weight alternative to the CloudNativePG migration in #147. #147 also switches Harbor Bitnami → goharbor, adds the CNPG operator + migration scripts, and hardcodes shared resource names (
flame-hub-postgresql-primary,flame-hub-postgres-auth, …), so deploying the chart more than once per namespace requires overriding ~9–15 variables "kept in sync". This PR avoids all of that.What
Replace the Bitnami
postgresqlsubchart with a minimal, operator-free single-node PostgreSQLStatefulSetbuilt on the officialpostgresimage, authored directly inflame-hub.It keeps the exact release-scoped contract the rest of the chart already relies on, so nothing else had to change:
{{ .Release.Name }}-postgresql-primaryon5432— the host Harbor'sexternalDatabase,authup, and theserver-core/storage/telemetryservices already point at.flame-hub-authcredentials secret (keypostgresql-password), via the existingflameHub.effectiveSecretNamehelper.ConfigMappre-creates thecore,storage,telemetry,auth, andregistrydatabases (plus Harbor'sschema_migrationsbookkeeping table), mirroring the previous Bitnamiinitdbscript.Result: Bitnami-free Postgres, the single-secret + release-scoped design preserved, and zero-override multi-deploy in one namespace still works. Harbor stays on the Bitnami Harbor chart, which already sources host/port/user from release-templated values + the password from the existing secret.
Changes
Chart.yaml— drop the Bitnamipostgresqldependency.templates/postgresql/{statefulset,service,configmap-init}.yaml— new self-hosted Postgres.values.yaml— swap the Bitnamipostgresql:block for a small self-owned one (image, persistence, init databases,max_connections, secret/key refs).Validation
helm lint→ 0 failed.helm template(full chart) → renders; exactly one PostgresStatefulSet, and all consumers + Harbor still resolve toflame-hub-postgresql-primary:5432.Notes / follow-ups
credentials-secret.yamlstill emits an (now unused)postgresql-replication-passwordkey — harmless single-node leftover; left out of scope to keep this diff focused.readReplicas.replicaCount: 0). If HA/metrics/backups are needed later, that's the heavier CNPG route.