Skip to content

feat(openfga): derive the pc-applications values - #680

Merged
NJona merged 3 commits into
mainfrom
jona/openfga-pc-apps-values
Aug 13, 2026
Merged

feat(openfga): derive the pc-applications values#680
NJona merged 3 commits into
mainfrom
jona/openfga-pc-apps-values

Conversation

@NJona

@NJona NJona commented Aug 12, 2026

Copy link
Copy Markdown
Member

Turns the codesphere.openFga block into values for the openfga application: whether pc-applications deploys OpenFGA here, and the gateway that publishes it, with the certificate following the installation's own cert issuer. The derived values are the base — an explicit pcApps block in config.yaml and --pc-apps-values still win over them.

Authentication is not configured but read off the vault: OpenFGA requires the preshared key exactly when the installation has one. An installation whose vault predates the key stays unauthenticated and keeps working, and the Codesphere services decide the same way from the same entry, so the two cannot disagree. Services that started before the key existed pick it up when their pods roll.

@NJona NJona self-assigned this Aug 12, 2026
@NJona
NJona requested a review from NautiluX August 12, 2026 08:08
One OpenFGA instance serves a whole installation, so in a multi-data-center
setup exactly one data center deploys and publishes it and the others only
point at it. That is an installation-level decision rather than a chart
detail, so operators express it in config.yaml:

  codesphere:
    openFga:
      deploy: true
      apiUrl: https://openfga.1.cs.example.com
      expose:
        enabled: true
        host: openfga.1.cs.example.com

Validation rejects the combinations that cannot work: a data center that
does not deploy OpenFGA has nowhere to fall back to and must name the
instance it uses, an exposed one needs a host, and a data center cannot
expose an OpenFGA it does not deploy.

Nothing reads the block yet; deriving the pc-applications values from it
follows separately.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jona Neef <Jona.Neef.97@gmail.com>
@NJona
NJona force-pushed the jona/openfga-install-config branch from 5d4c44e to c2bc728 Compare August 12, 2026 11:16
Turns the codesphere.openFga block into values for the openfga application:
whether pc-applications deploys OpenFGA here, and the gateway that publishes
it, with the certificate following the installation's own cert issuer. The
derived values are the base — an explicit pcApps block in config.yaml and
--pc-apps-values still win over them.

Authentication is not configured but read off the vault: OpenFGA requires
the preshared key exactly when the installation has one. An installation
whose vault predates the key stays unauthenticated and keeps working, and
the Codesphere services decide the same way from the same entry, so the two
cannot disagree. Services that started before the key existed pick it up
when their pods roll.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jona Neef <Jona.Neef.97@gmail.com>
@NJona
NJona force-pushed the jona/openfga-pc-apps-values branch from 95cda58 to 4b11a1c Compare August 12, 2026 11:17
Comment thread internal/installer/openfga_pc_apps.go Outdated
Comment thread internal/installer/openfga_pc_apps.go Outdated
Base automatically changed from jona/openfga-install-config to main August 13, 2026 09:35
The doc comment on OpenFgaPcAppsValues explained three things at once. Two of
them belong to the parts they describe, so authnValues is now its own
function next to gatewayValues and takes the paragraph about following the
vault with it, leaving the entry point with what it actually does.

It also says so when it finds no key: an installation that keeps running
unauthenticated should hear about it while that is still optional.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jona Neef <Jona.Neef.97@gmail.com>
@NJona
NJona requested a review from NautiluX August 13, 2026 09:42
@NJona
NJona merged commit ef278cf into main Aug 13, 2026
6 checks passed
@NJona
NJona deleted the jona/openfga-pc-apps-values branch August 13, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants