Skip to content

podiumd 4.8.4 - PABC seed job en basis dingen (IN-2004) - #404

Open
githubjimmeicatt wants to merge 4 commits into
feature/podiumd-4.8.5from
feature/IN-2004-pabc-seed-4.8.4
Open

podiumd 4.8.4 - PABC seed job en basis dingen (IN-2004)#404
githubjimmeicatt wants to merge 4 commits into
feature/podiumd-4.8.5from
feature/IN-2004-pabc-seed-4.8.4

Conversation

@githubjimmeicatt

@githubjimmeicatt githubjimmeicatt commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

wat er al was

commit 94b07fc (van 4.8.0, zat niet in 4.8.4): pabc-dataset-configmap.yaml +
files/pabc-dataset.json. alleen het e2e-zaaktype, overal
isAllEntityTypes: false, en geen job die de configmap inlas.

wat ik heb toegevoegd

  • templates/pabc-seed-job.yaml: de ontbrekende job, draait pabc-migrations
    eenmalig met JSON_DATASET_PATH
  • 21 mappings met isAllEntityTypes: true in de dataset, per keycloak-groep
    gelijk aan de zac-clientrollen uit het realm-config
  • pabc.seedJob in values, default uit
  • docs/apps/pabc/pabc-iam-migration.md en enabling-pabc.md bijgewerkt

zonder dit blijft pabc leeg en blokkeert zac elke pagina met "u heeft geen
toestemming". getest op ontw-mayk: rev 189 deployed, 41 mappings, zac-login werkt.

@githubjimmeicatt githubjimmeicatt changed the title feat(podiumd): one-shot PABC seed job + basisinrichting (IN-2004) podiumd 4.8.4 - PABC seed job en basis dingen (IN-2004) Aug 4, 2026
@bas-info-nl
bas-info-nl force-pushed the feature/podiumd-4.8.4 branch from cf458ad to b356f97 Compare August 10, 2026 14:14
Base automatically changed from feature/podiumd-4.8.4 to main August 10, 2026 14:54
@infojohn
infojohn self-requested a review August 12, 2026 13:45

@infojohn infojohn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@infojohn

infojohn commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

One correctness concern on pabc-seed-job.yaml's idempotency design:

The Job's name (and therefore the boundary of what Kubernetes treats as immutable) is derived only from a hash of files/pabc-dataset.json:

{{- $jobSuffix := .Files.Get "files/pabc-dataset.json" | sha256sum | trunc 10 }}

But the Job's actual pod spec also depends on pabc.migrations.image (repository/tag/pullPolicy), pabc.seedJob.resources, and any nodeSelector — none of which factor into that name.

Concretely: if pabc.migrations.image.tag gets bumped in a later release (a routine image update) while the dataset itself stays byte-identical, the Job keeps the same name, but its pod template now differs from what's already deployed. spec.template on a batch/v1 Job is immutable, so the next helm upgrade will fail trying to patch it in place (field is immutable) — not a no-op, an actual failed release.

Might be worth hashing the fully-rendered pod spec (or at least including the image tag) into $jobSuffix, so an image bump forces a genuinely new Job name instead of colliding with the old one.

@infojohn
infojohn changed the base branch from main to feature/podiumd-4.8.5 August 14, 2026 11:22
infojohn and others added 4 commits August 14, 2026 13:23
…only)

Render files/pabc-dataset.json into a pabc-dataset ConfigMap when
pabc.datasetConfigMap.enabled is set. Dataset defines the ZAC application,
its six application roles, the six functional roles matching the Keycloak
groups, and an e2e-test domain scoped to zaaktype-voor-e2e-testen only
(no isAllEntityTypes grants).

Intended consumer is a one-shot seed Job running the pabc-migrations image
with JSON_DATASET_PATH, not pabc.migrations.dataSetPath: the migration
service replaces ALL PABC data whenever it runs with a dataset, so wiring
it into the per-upgrade migrations job would wipe PABC UI edits on every
deploy.
De dataset-ConfigMap uit 94b07fc had geen consument: er was geen job die
hem inlas. Daardoor bleef PABC leeg, resolvede ZAC nul application roles
en kreeg elke gebruiker "u heeft geen toestemming om deze pagina te
bekijken" (Maykin PCT / ontw-mayk).

Twee dingen toegevoegd:

1. templates/pabc-seed-job.yaml draait het pabc-migrations image eenmalig
   met JSON_DATASET_PATH op de pabc-dataset ConfigMap. De jobnaam draagt
   een checksum van de dataset, dus een ongewijzigde dataset levert bij
   elke upgrade dezelfde naam op en de bestaande voltooide Job blijft
   staan: geen herhaalde seed. Bewust geen ttlSecondsAfterFinished, want
   dat Job-object is de markering "al geseed". Zonder dat zou de volgende
   upgrade opnieuw seeden en handmatige PABC-UI-aanpassingen weggooien
   (DatabaseInitializer doet ExecuteDeleteAsync op alle zes tabellen voor
   het inserten).

2. files/pabc-dataset.json krijgt 21 mappings met isAllEntityTypes true.
   De dataset had uitsluitend mappings gescoped op het e2e-domein met
   overal isAllEntityTypes false, dus op een echte omgeving gaf hij
   toegang tot precies nul zaaktypes. De nieuwe mappings spiegelen per
   Keycloak-groep exact de zac-clientrollen uit
   keycloak-podiumd-realm-config.yaml, inclusief het equivalent van
   domein_elk_zaaktype. Het e2e-domein blijft ongemoeid.

Beide staan default uit (pabc.datasetConfigMap.enabled en
pabc.seedJob.enabled) zodat omgevingen die PABC al via de UI hebben
ingericht niet overschreven worden.
Nieuwe pabc-iam-migration.md beschrijft de overstap voor omgevingen die ZAC
nog op de oude manier autoriseren: wat er verandert (Keycloak blijft wie je
bent, PABC wordt wat je mag), de twee values die de seed aanzetten, hoe je
verifieert, en de groep-naar-applicatierol-matrix.

Belangrijkste val die erin staat: bij een lege PABC ziet Keycloak er
volkomen gezond uit terwijl elke ZAC-pagina "u heeft geen toestemming om
deze pagina te bekijken" geeft. Dat leidt de diagnose makkelijk de
verkeerde kant op.

enabling-pabc.md sectie 8 wees naar post-deployment-pabc-init-job.yml uit
podiumd-infra. Die route is nu de fallback: hij gebruikt postgres:15 en
curlimages/curl, en de Azure Policy op toegestane images weigert die op de
aks-blue-clusters. Ook gecorrigeerd dat pabc-migrations op een verse
database helemaal niets seedt, niet alleen een applicatie met de verkeerde
naam.

De oude matrix gaf beheerders geen recordmanager-rol; de dataset volgt het
realm-config, dat dat wel doet.
De jobnaam werd afgeleid van de gerenderde pabc-dataset-configmap.yaml, en
die bevat het label helm.sh/chart met de chartversie erin. Daardoor kreeg de
seed-job bij elke versiebump een nieuwe naam en zou hij opnieuw draaien,
precies het scenario waartegen de checksum bedoeld was: een omgeving die via
de PABC-UI was ingericht raakt dan alles kwijt.

Nu wordt files/pabc-dataset.json rechtstreeks gehasht. Geverifieerd: zelfde
naam voor ontw-icat en ontw-mayk, en ongewijzigd na een bump naar chart 4.8.5.
@infojohn
infojohn force-pushed the feature/IN-2004-pabc-seed-4.8.4 branch from 2922a87 to 2fb27f0 Compare August 14, 2026 11:25
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