feat: add helm chart - #161
Open
Panaetius wants to merge 2 commits into
Open
Conversation
caviri
added a commit
that referenced
this pull request
Aug 14, 2026
Files taken from `origin/feat/add-helm-chart` with `git archive`, not merged — that branch is based on `main`, which diverges from ours by hundreds of commits and deleted the Capability entity this branch is built on. ## The gap that mattered The chart said nothing about storage, and our backend gates the store on `cfg.Storage.Endpoint != ""` whose DEFAULT is `http://rustfs:9000` with the committed dev keys. So a chart that stays silent does not deploy "no storage" — it deploys a backend pointed at a dev host that does not exist in the cluster. The chart now always writes a `storage:` block, and `enabled: false` writes `endpoint: ""` EXPLICITLY: an honest off that answers Unavailable, rather than an omission that falls back to the dev default. Credentials never appear in values. `storage.existingSecret` is `required`, and the keys are `HACKAGON_STORAGE_ACCESSKEY`/`SECRETKEY` with no separator, because the loader lowercases and turns `_` into `.` — `ACCESS_KEY` would arrive as `storage.access.key` and be silently ignored. **No store is deployed and there is no in-cluster option.** A bucket is the one piece of state that must outlive the release, and a StatefulSet in an application chart invites `helm uninstall` to take the uploads with it. ## The Host rewrite, which is the part that would have failed in production SigV4 signs the Host header and the backend signs the STORE's hostname, so a proxy that passes the incoming host through makes every presigned PUT answer 403 SignatureDoesNotMatch while public reads keep working — the asymmetry that hid this bug for days here. Expressed for ingress-nginx (the chart's default class is the AKS app-routing addon, which is ingress-nginx) as a SEPARATE Ingress, because `rewrite-target` and `upstream-vhost` are per-Ingress and would mangle every application URL if attached to the frontend's rules. `hackagon.storageSignHost` mirrors `signHost` in internal/storage/client.go exactly — port included, bucket-qualified under virtual-hosted style. `proxy-body-size: 64m` because the largest signed rule is a 50 MiB attachment and nginx defaults to 1m. Traefik cannot express this in a core Ingress; values.yaml says so and says what to do instead. ## Other drift against our branch An `audit:` block (optional, off); `replay` and `plausible` as optional frontend blocks that render nothing when off; the backend hostname defaulting to the release's own service instead of a hard-coded `hackagon-backend`; and the realm rewrite emitting SCHEME-FULL redirect URIs — it produced `app.example.org/*`, which Keycloak reads as a relative path and rejects at login. ## Verified helm lint (also --strict) clean. Renders for storage external / off / optionals on / virtual-hosted / objects-ingress off / with the real realm JSON, all parsing as YAML including the embedded config.yaml and realm JSON. The rendered frontend config was validated by THE APP'S OWN zod schema, which is what proves the optional blocks disappear rather than rendering empty keys. Every `required` failure was triggered and its message read. No trycloudflare host, dev password or rustfs default survives in any render. ## Pre-existing problems found, deliberately not fixed here `backend.config.database.postgresPassword` renders into a ConfigMap in plaintext, and the DB/Keycloak passwords come from values.yaml — the same class as the storage credentials, decided the other way. `keycloak.realmImport. existingConfigMap` is static while the template names it `<fullname>-realm`, so the chart only works when the release is named `hackagon`. And `--set-file realmJson=…/realm-hackagon.json` imports alice/bob/charles with their dev password hashes. Not verified without a cluster: regex-path precedence over the frontend's `/` rule, ingress-nginx accepting an ExternalName upstream, and a real presigned PUT surviving the hop — argued from the rendered manifest, not observed.
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.
add a helm chart for deployment