Commit Graph

277 Commits

Author SHA1 Message Date
github-actions[bot]
a29238d217 deploy: update catalyst images to fa58cc3 2026-05-04 13:46:18 +00:00
github-actions[bot]
407f37944b deploy: update catalyst images to 35569e2 2026-05-04 13:40:49 +00:00
github-actions[bot]
b1915a9e14 deploy: update catalyst images to 8e57abe 2026-05-04 13:32:38 +00:00
github-actions[bot]
5bb7d45647 deploy: update catalyst images to 5decebf 2026-05-04 13:17:56 +00:00
github-actions[bot]
c69e4987da deploy: update catalyst images to 05065b6 2026-05-04 13:13:50 +00:00
github-actions[bot]
4b659ced17 deploy: update catalyst images to e855ab0 2026-05-04 13:09:40 +00:00
github-actions[bot]
87ffe512c5 deploy: update catalyst images to ceeefd7 2026-05-04 12:03:20 +00:00
github-actions[bot]
fea00720f7 deploy: update catalyst images to 468c3ba 2026-05-04 11:53:06 +00:00
github-actions[bot]
9ee3b2e911 deploy: update catalyst images to b02fc37 2026-05-04 11:37:57 +00:00
github-actions[bot]
20c839efc4 deploy: update catalyst images to 8989ce7 2026-05-04 11:29:07 +00:00
github-actions[bot]
10d1af8c91 deploy: update catalyst images to 7ef5af7 2026-05-04 11:11:10 +00:00
github-actions[bot]
594875ae1e deploy: update catalyst images to 994c2d1 2026-05-04 11:01:53 +00:00
github-actions[bot]
9d9be38b38 deploy: update catalyst images to e085a68 2026-05-04 10:37:16 +00:00
github-actions[bot]
abf9ad4298 deploy: update catalyst images to 69de64b 2026-05-04 10:26:54 +00:00
github-actions[bot]
3d6fe0edda deploy: update catalyst images to 8964d0b 2026-05-04 10:23:47 +00:00
github-actions[bot]
d8f54c9ccf deploy: update catalyst images to 7ec25b9 2026-05-04 09:59:54 +00:00
github-actions[bot]
014e3b78e2 deploy: update catalyst images to 0c2c95c 2026-05-04 09:53:18 +00:00
github-actions[bot]
0efe2be449 deploy: update catalyst images to b17bc21 2026-05-04 09:48:57 +00:00
github-actions[bot]
a070cbf4d8 deploy: update catalyst images to ce1ef35 2026-05-04 09:32:07 +00:00
github-actions[bot]
10c33ed573 deploy: update catalyst images to cfa04bd 2026-05-04 09:08:39 +00:00
github-actions[bot]
d0127d140a deploy: update catalyst images to f85bdce 2026-05-04 08:52:34 +00:00
github-actions[bot]
3960159f2b deploy: update catalyst images to 9adca84 2026-05-04 08:46:42 +00:00
github-actions[bot]
b944fb0138 deploy: update catalyst images to cc7d8a7 2026-05-04 08:13:40 +00:00
github-actions[bot]
21fbf5c435 deploy: update catalyst images to f4f3a45 2026-05-04 08:04:39 +00:00
github-actions[bot]
a78b4e2e51 deploy: update catalyst images to dad5ead 2026-05-04 07:54:28 +00:00
github-actions[bot]
f7365de162 deploy: update sme service images to 2a034a0 2026-05-04 07:38:18 +00:00
github-actions[bot]
84d40a58c7 deploy: update Catalyst marketplace image to 2a034a0 2026-05-04 07:37:45 +00:00
github-actions[bot]
52f68420ac deploy: update Catalyst marketplace image to 73d68d9 2026-05-04 07:31:20 +00:00
github-actions[bot]
f375533ffa deploy: update catalyst images to 88bfa34 2026-05-04 05:44:50 +00:00
github-actions[bot]
4c7e1e6d4c deploy: update catalyst images to 35183af 2026-05-04 03:51:04 +00:00
e3mrah
4946ccd125
feat(bp-catalyst-platform): expose marketplace + tenant wildcard, bump 1.3.0 (closes #710) (#719)
Marketplace exposure for franchised Sovereigns. Otech becomes a SaaS
operator with a single overlay toggle.

Changes
=======

products/catalyst/chart:
- Chart.yaml 1.2.7 → 1.3.0
- values.yaml: ingress.marketplace.enabled toggle (default false) +
  marketplace.{brand,currency,paymentProvider,signupPolicy} surface
- templates/sme-services/marketplace-routes.yaml: HTTPRoute
  marketplace.<sov> with /api/ → marketplace-api, /back-office/ → admin,
  / → marketplace; HTTPRoute *.<sov> → console (per-tenant wildcard)
- templates/sme-services/marketplace-reference-grant.yaml: cross-
  namespace ReferenceGrant from catalyst-system HTTPRoute → sme Services
- .helmignore: stop excluding sme-services/* and marketplace-api/* (only
  *.kustomization.yaml + *.ingress.yaml remain Kustomize-only)
- All sme-services/* + marketplace-api/* manifests wrapped with
  {{ if .Values.ingress.marketplace.enabled }} so non-marketplace
  Sovereigns render the chart unchanged

clusters/_template/bootstrap-kit/13-bp-catalyst-platform.yaml:
- chart version 1.2.7 → 1.3.0
- ingress.hosts.marketplace.host: marketplace.${SOVEREIGN_FQDN}
- ingress.marketplace.enabled: ${MARKETPLACE_ENABLED:-false}

infra/hetzner:
- variables.tf: marketplace_enabled var (string "true"/"false", default "false")
- main.tf: thread var into cloudinit-control-plane.tftpl
- cloudinit-control-plane.tftpl: postBuild.substitute.MARKETPLACE_ENABLED
  on bootstrap-kit, sovereign-tls, infrastructure-config Kustomizations

products/catalyst/bootstrap/api/internal/provisioner/provisioner.go:
- Request.MarketplaceEnabled bool (json:"marketplaceEnabled")
- writeTfvars: marketplace_enabled = "true"|"false"

core/pool-domain-manager/internal/allocator/allocator.go:
- canonicalRecordSet adds "marketplace" prefix → marketplace.<sov>
  resolves via PDM at zone-commit time (PR #710 explicit record so
  caches don't depend on the *.<sov> wildcard alone)

DoD ready
=========
- helm template with ingress.marketplace.enabled=false → identical
  manifest set to 1.2.7 (verified locally)
- helm template with ingress.marketplace.enabled=true → emits 17 extra
  resources: 13 sme-services workloads + 2 marketplace-api + 1
  HTTPRoute pair + 1 ReferenceGrant
- pdm tests: TestCanonicalRecordSet, TestCommitDNSShape green
- catalyst-api builds, provisioner cloudinit_path_test green

Co-authored-by: hatiyildiz <hatiyildiz@openova.io>
2026-05-04 07:47:37 +04:00
github-actions[bot]
3a7fdad13f deploy: update catalyst images to 1b1ea52 2026-05-03 22:47:22 +00:00
e3mrah
1b1ea52c39
fix(bp-catalyst-platform): emit sovereign-fqdn ConfigMap atomically in chart (closes #717) (#718)
* fix(catalyst-api,bp-keycloak): handover 401 root-causes — Reloader annot + realm SA users array (#713)

Closes #713

Two distinct chart bugs surfaced live on otech62 (2026-05-03), both producing
401 on /auth/handover:

1. SOVEREIGN_FQDN race
   api-deployment.yaml reads SOVEREIGN_FQDN from ConfigMap "sovereign-fqdn"
   with optional:true. On Sovereigns, that ConfigMap is rendered by the
   sovereign-tls Flux Kustomization concurrently with bp-catalyst-platform
   HelmRelease. When the Pod starts first, valueFrom collapses to "" and
   stays empty — audience check rejects every valid token as "invalid
   audience". Fix: add Reloader annotations so the Pod rolls when the
   ConfigMap (and the handover-jwt-public Secret) appears.

2. catalyst-api-server SA missing user-level realm-management role mappings
   bp-keycloak realm import granted roles via clientScopeMappings — wrong
   level. The actual service-account user had no clientRoles entry, so KC
   rejected GET /users with 403 when catalyst-api tried to ensure the
   operator user during handover. Fix: add explicit "users" array binding
   service-account-catalyst-api-server to realm-management.{impersonation,
   manage-users, view-users, query-users}.

* fix(catalyst-api,bp-reloader): tofu state on PVC + Reloader annotations strategy (#715)

Closes #715

Two architectural bugs surfaced live on otech64 (2026-05-03), both leading
to a healthy-looking Sovereign that the operator could not reach.

1. catalyst-api tofu workdir on emptyDir
   CATALYST_TOFU_WORKDIR=/tmp/catalyst/tofu (emptyDir). When contabo's
   catalyst-api Pod rolled mid-apply (the PR #714 deploy commit triggered
   a rolling restart 3 minutes into otech64's tofu run), in-progress state
   was lost. Tofu had created LB/network/server/services but not the
   hcloud_load_balancer_target.control_plane resource yet — the cluster
   came up at the k3s level but the public LB had no targets, returning
   TLS handshake failure for every console.<sov> request.

   Move CATALYST_TOFU_WORKDIR to /var/lib/catalyst/tofu (PVC-backed,
   fsGroup=65534 already wires write access). tofu apply resumes from
   where it left off after any Pod restart.

2. bp-reloader env-vars strategy
   reloadStrategy=env-vars only injects checksum env vars for ConfigMaps
   referenced via envFrom. Workloads using valueFrom: configMapKeyRef
   (catalyst-api's SOVEREIGN_FQDN) are silently not reloaded — the
   configmap.reloader.stakater.com/reload annotation added in PR #714
   was a no-op under env-vars.

   Switch to reloadStrategy=annotations. Reloader bumps a pod-template
   annotation, triggering rollout regardless of how the CM/Secret is
   referenced.

* fix(bp-catalyst-platform): emit sovereign-fqdn ConfigMap inside chart, drop sovereign-tls duplicate (#717)

Closes #717

Reloader v1.4.16 is silent on the SOVEREIGN_FQDN race (#713). Tried all
annotation forms (configmap.reloader.stakater.com/reload, reloader/auto)
and both reload strategies (env-vars, annotations). RBAC is correct, watch
coverage is global, but manual CM patches produce zero Reloader log output
and zero Pod rollouts. Abandoning Reloader as the race fix.

Move the sovereign-fqdn ConfigMap into bp-catalyst-platform chart
templates, guarded by {{ if .Values.global.sovereignFQDN }}. Helm install
applies all chart manifests in a single etcd transaction so the ConfigMap
commits before the Pod schedules. valueFrom resolves correctly the first
time. No race possible.

Drop the duplicate from clusters/_template/sovereign-tls/ to avoid
Helm-vs-Flux ownership flapping. The Kustomize path on contabo enumerates
files in templates/kustomization.yaml so this Helm-templated file is never
parsed by Kustomize.

Verified live: deleting the existing CM and re-running Helm install
produced an immediately-correct catalyst-api Pod with SOVEREIGN_FQDN
populated, where the same install with the previous out-of-chart CM had
left the env empty for the Pod's lifetime.

---------

Co-authored-by: hatiyildiz <hatiyildiz@openova.io>
2026-05-04 02:45:24 +04:00
github-actions[bot]
b2f78a81e1 deploy: update catalyst images to 9a58289 2026-05-03 22:06:35 +00:00
e3mrah
9a58289786
fix(catalyst-api,bp-reloader): tofu state on PVC + Reloader annotations strategy (closes #715) (#716)
* fix(catalyst-api,bp-keycloak): handover 401 root-causes — Reloader annot + realm SA users array (#713)

Closes #713

Two distinct chart bugs surfaced live on otech62 (2026-05-03), both producing
401 on /auth/handover:

1. SOVEREIGN_FQDN race
   api-deployment.yaml reads SOVEREIGN_FQDN from ConfigMap "sovereign-fqdn"
   with optional:true. On Sovereigns, that ConfigMap is rendered by the
   sovereign-tls Flux Kustomization concurrently with bp-catalyst-platform
   HelmRelease. When the Pod starts first, valueFrom collapses to "" and
   stays empty — audience check rejects every valid token as "invalid
   audience". Fix: add Reloader annotations so the Pod rolls when the
   ConfigMap (and the handover-jwt-public Secret) appears.

2. catalyst-api-server SA missing user-level realm-management role mappings
   bp-keycloak realm import granted roles via clientScopeMappings — wrong
   level. The actual service-account user had no clientRoles entry, so KC
   rejected GET /users with 403 when catalyst-api tried to ensure the
   operator user during handover. Fix: add explicit "users" array binding
   service-account-catalyst-api-server to realm-management.{impersonation,
   manage-users, view-users, query-users}.

* fix(catalyst-api,bp-reloader): tofu state on PVC + Reloader annotations strategy (#715)

Closes #715

Two architectural bugs surfaced live on otech64 (2026-05-03), both leading
to a healthy-looking Sovereign that the operator could not reach.

1. catalyst-api tofu workdir on emptyDir
   CATALYST_TOFU_WORKDIR=/tmp/catalyst/tofu (emptyDir). When contabo's
   catalyst-api Pod rolled mid-apply (the PR #714 deploy commit triggered
   a rolling restart 3 minutes into otech64's tofu run), in-progress state
   was lost. Tofu had created LB/network/server/services but not the
   hcloud_load_balancer_target.control_plane resource yet — the cluster
   came up at the k3s level but the public LB had no targets, returning
   TLS handshake failure for every console.<sov> request.

   Move CATALYST_TOFU_WORKDIR to /var/lib/catalyst/tofu (PVC-backed,
   fsGroup=65534 already wires write access). tofu apply resumes from
   where it left off after any Pod restart.

2. bp-reloader env-vars strategy
   reloadStrategy=env-vars only injects checksum env vars for ConfigMaps
   referenced via envFrom. Workloads using valueFrom: configMapKeyRef
   (catalyst-api's SOVEREIGN_FQDN) are silently not reloaded — the
   configmap.reloader.stakater.com/reload annotation added in PR #714
   was a no-op under env-vars.

   Switch to reloadStrategy=annotations. Reloader bumps a pod-template
   annotation, triggering rollout regardless of how the CM/Secret is
   referenced.

---------

Co-authored-by: hatiyildiz <hatiyildiz@openova.io>
2026-05-04 02:04:26 +04:00
github-actions[bot]
c179cba12a deploy: update catalyst images to e96e31a 2026-05-03 21:39:29 +00:00
e3mrah
e96e31a781
fix(catalyst-api,bp-keycloak): handover 401 root-causes — Reloader annot + realm SA users array (#713) (#714)
Closes #713

Two distinct chart bugs surfaced live on otech62 (2026-05-03), both producing
401 on /auth/handover:

1. SOVEREIGN_FQDN race
   api-deployment.yaml reads SOVEREIGN_FQDN from ConfigMap "sovereign-fqdn"
   with optional:true. On Sovereigns, that ConfigMap is rendered by the
   sovereign-tls Flux Kustomization concurrently with bp-catalyst-platform
   HelmRelease. When the Pod starts first, valueFrom collapses to "" and
   stays empty — audience check rejects every valid token as "invalid
   audience". Fix: add Reloader annotations so the Pod rolls when the
   ConfigMap (and the handover-jwt-public Secret) appears.

2. catalyst-api-server SA missing user-level realm-management role mappings
   bp-keycloak realm import granted roles via clientScopeMappings — wrong
   level. The actual service-account user had no clientRoles entry, so KC
   rejected GET /users with 403 when catalyst-api tried to ensure the
   operator user during handover. Fix: add explicit "users" array binding
   service-account-catalyst-api-server to realm-management.{impersonation,
   manage-users, view-users, query-users}.

Co-authored-by: hatiyildiz <hatiyildiz@openova.io>
2026-05-04 01:37:36 +04:00
github-actions[bot]
2eb499e9d7 deploy: update catalyst images to f254ff1 2026-05-03 20:27:20 +00:00
github-actions[bot]
4984488b41 deploy: update catalyst images to 4a9b2b2 2026-05-03 20:01:47 +00:00
github-actions[bot]
cdbb617231 deploy: update catalyst images to e4ef4c0 2026-05-03 19:56:21 +00:00
github-actions[bot]
6df37b032c deploy: update catalyst images to 0238a2b 2026-05-03 18:53:12 +00:00
github-actions[bot]
21122116dd deploy: update catalyst images to bceaa20 2026-05-03 18:03:55 +00:00
github-actions[bot]
4ba39c2d60 deploy: update catalyst images to 3144eed 2026-05-03 17:42:30 +00:00
github-actions[bot]
0e6ac5cd29 deploy: update catalyst images to ed2b374 2026-05-03 17:36:22 +00:00
github-actions[bot]
cf9946f4f1 deploy: update catalyst images to 2146deb 2026-05-03 17:10:05 +00:00
e3mrah
2146deb427
fix(catalyst-platform): escape literal Helm-curly in api-deployment.yaml comment (#699)
Helm parses the entire file (including YAML comments) for template
directives BEFORE YAML parsing strips comments. Literal '{{ ... }}'
inside a # comment was treated as a template directive and failed
with 'unexpected <.> in operand' at line 419.

PR #698 introduced this in the explanatory comment for the
SOVEREIGN_FQDN ConfigMap workaround. Reword to avoid the literal
double-curlies — the comment still describes the constraint without
tripping the Helm parser.

Co-authored-by: hatiyildiz <hatice@openova.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 21:08:13 +04:00
github-actions[bot]
7edc4370a3 deploy: update catalyst images to 74d08eb 2026-05-03 16:51:31 +00:00
e3mrah
74d08eb5a6
fix(catalyst-api+sovereign-tls): SOVEREIGN_FQDN via ConfigMap, not Helm template (PR #692 followup) (#698)
PR #692 added an inline Helm-template `value:` for SOVEREIGN_FQDN in
api-deployment.yaml. That broke contabo-mkt's catalyst-platform Flux
Kustomization (path: ./products/catalyst/chart/templates) because Kustomize
parses raw YAML and Helm `{{ ... }}` is not valid YAML syntax. Live error
on contabo at adf8dc7d:

  kustomize build failed: yaml: invalid map key:
  map[string]interface {}{".Values.global.sovereignFQDN | default \"\" | quote":""}

Replace the Helm-template form with `valueFrom.configMapKeyRef.optional:
true` so the same template renders cleanly under both consumers:

- contabo-mkt (Kustomize): ConfigMap `sovereign-fqdn` doesn't exist →
  optional ref → env stays empty → catalyst-api on contabo never validates
  handover JWTs anyway (it's the SIGNER, not the validator). Correct.

- Sovereigns (Helm via bp-catalyst-platform OCI chart): on apply, the
  sovereign-tls Kustomization renders `sovereign-fqdn-configmap.yaml` with
  envsubst on ${SOVEREIGN_FQDN}, creating the ConfigMap with the per-
  Sovereign FQDN. catalyst-api Pod resolves the ref → env populated →
  audience check works.

This restores the bridge between the two consumers without forking the
template. The bp-catalyst-platform 1.2.5 → 1.2.7 bump publishes the new
chart; bootstrap-kit overlay pin updated.

Will be verified on otech49 (next provision after this lands).

Co-authored-by: hatiyildiz <hatice@openova.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 20:49:36 +04:00
github-actions[bot]
01a2e3bdb4 deploy: update catalyst images to 1946e0a 2026-05-03 16:40:41 +00:00
github-actions[bot]
3da196ec42 deploy: update catalyst images to 46c956b 2026-05-03 16:36:40 +00:00