Plugin om Mijn Betaaloverzicht Source Organizations te beheren
  • Go 67.8%
  • JavaScript 21.3%
  • Shell 3.5%
  • CSS 3.1%
  • HTML 2.1%
  • Other 2.2%
Find a file
2026-11-25 09:26:56 +00:00
api/v1alpha1 0.4.7 2026-11-24 16:46:13 +01:00
config/samples One public hostname with a path prefix per service; shared gateway on by default 2026-11-24 09:40:28 +01:00
demo 0.4.7 2026-11-24 16:46:13 +01:00
operator 0.4.7 2026-11-24 16:46:13 +01:00
plugin 0.4.7 2026-11-24 16:46:13 +01:00
.dockerignore init 2026-11-23 16:42:47 +01:00
.gitignore init 2026-11-23 16:42:47 +01:00
go.mod Point module and images at mijnbo-so-plugin 2026-11-23 16:52:12 +01:00
go.sum init 2026-11-23 16:42:47 +01:00
Justfile 0.4.7 2026-11-24 16:46:13 +01:00
LICENCE init 2026-11-23 16:42:47 +01:00
LICENCE-NL init 2026-11-23 16:42:47 +01:00
mise.toml init 2026-11-23 16:42:47 +01:00
README.md 0.4.7 2026-11-24 16:46:13 +01:00
release-fundament.sh 0.4.7 2026-11-24 16:46:13 +01:00

mijnbo-so-plugin

The Mijn Betaaloverzicht operator and its Fundament plugin (proof of concept). One plugin installation is one source organization (bronorganisatie): you fill it in on the plugin's install form, and the operator runs that organization's Mijn Betaaloverzicht components.

Mijn Betaaloverzicht plugin (Fundament)         install form = the organization; installs the operator
  └─ SourceOrganization "default" one per cluster, written by the plugin
       ├─ Component               one per Mijn Betaaloverzicht part, derived by the operator
       │    └─ Helm release       of a chart from the Mijn Betaaloverzicht chart repository
       └─ Component …

The source organization runs everything the development environment runs for one (development-environment/skaffold.source-organization.yaml):

The components are grouped in functional domains. Every domain starts off; each has its own menu item in the console with a switch (top right), and its own cluster-scoped kind with one resource named default:

Domain (menu item) Kind Components
Verbinden ConnectDomain session-process, session-service, hsm-process, vhsm-service, vhsm-db
Diensten ontdekken ServiceDiscoveryDomain service-discovery-process
Financiële gegevens ophalen FinancialClaimsDomain citizen-financial-claim-process, financial-claim-request-service, financial-claim-request-db
Aansluiten OnboardingDomain bk-management-ui, bk-management-process, bk-config-service, bk-config-db, source-organization-keys
Testen TestingDomain fcid-view-validator, demo-simulation-process, demo-source-system, mock-source-system (each with its own switch; the mock starts off)
(Organisatie, always on) public-endpoints (shared gateway) or local-gateway

Domains depend on each other (Financiële gegevens needs Verbinden and Aansluiten, for example); a domain page warns when one it needs is off. citizen-financial-claim-process uses Testen's demo-source-system, else its mock-source-system, else the source system URL under Organisatie. The databases are kept when their domain is switched off. Overzicht shows which domains are on and every running component.

Paths under the hostname: /service-discovery, /session-api, /financial-claim-request-api, /bk-management-process, /hsm-process, /demo-simulation (prefix stripped), and the UIs at /bk-management/ and /fcid-view-validator/. App manager and scheme manager follow as their own role resources on the same Component layer.

How it works

  • SourceOrganization (mijnbo.vorijk.nl/v1alpha1) is a cluster-scoped singleton: the API server only accepts the name default. It holds only what differs per organization: name, OIN, public hostname, the namespace the components run in, and an optional Gateway. Every hostname, internal address and the organization's /.well-known/bk-configuration.json follow from it.
  • Component is the internal layer. The SourceOrganization controller writes one per part, owned by the SourceOrganization, named after its type and carrying the chart values. The Component controller installs each as a Helm release of the same name, waits for its dependsOn, and reports readiness from the release's Deployments. Hand edits are overwritten.
  • Deleting a SourceOrganization deletes its Components (owner references); each Component's finalizer then uninstalls its release, unless its deletionPolicy is Retain (meant for databases).
  • Charts come from the Mijn Betaaloverzicht chart repository at run time (CHART_REPOSITORY, default https://blauwe-knop.gitlab.io/vorderingenoverzicht/charts), checked against its index digest and cached. Each component has a default version (operator/internal/components/sourceorganization.go); a Component's spec.chartVersion overrides it with a version or a constraint such as ~0.26 or *. Only our own charts (operator/charts) are embedded.
  • Secrets: the operator generates an API key per service (mijnbo-api-keys) and the organization's ES256 key pair (mijnbo-organization-key) once; services and their callers read them from there, so no key is in a Component or the console.
  • Readiness: a Component is Ready when its Deployments are rolled out and its Jobs (database migrations, key registration) succeeded; dependents wait for it (dependsOn). Changed values restart its pods.
  • The operator runs anywhere (operator/chart). The plugin is a thin installer around it: on every start it helm upgrade --installs the vendored operator chart, creates the components' namespace and writes the SourceOrganization from its configuration (FUNP_*); its status follows the organization's. A value the CRD rejects (an OIN that is not 20 digits, a changed namespace) shows as Failed in the plugin status. Uninstalling deletes the SourceOrganization, waits for its components to go, and removes the operator; the namespace stays.
  • Publishing: everything shares one public hostname (spec.hostname), each service under its own path prefix (stripped by the gateway), like the other Fundament deployments: the clusters' wildcard DNS and certificates cover one label, so use e.g. mijnbo-bron.cluster-a.fieldlab2026.nl. Service discovery answers on https://<hostname>/service-discovery/.well-known/bk-configuration.json. With spec.sharedGateway (the default from the plugin) the operator adds a public-endpoints component: a ListenerSet on istio-gateway/public-gateway with an HTTPS listener for the hostname and a certificate from the letsencrypt-production ClusterIssuer. A hostname can be claimed once per cluster. spec.gatewayRef attaches to a Gateway of your own instead.
  • CRDs are chart templates marked helm.sh/resource-policy: keep: Helm upgrades them, and uninstalling never deletes them (deleting a CRD deletes the organization's resources with it).
apiVersion: mijnbo.vorijk.nl/v1alpha1
kind: SourceOrganization
metadata:
  name: default                   # the only name allowed
spec:
  organization:
    name: Demo organisatie
    oin: "00000001234567890000"   # 20 digits; immutable
  namespace: mijnbo               # must exist; immutable
  hostname: mijnbo-bron.cluster-a.fieldlab2026.nl # every service on a path under it
  gatewayRef:                     # optional; without it nothing is published
    name: public
    namespace: gateway-system
    sectionName: https
status:
  phase: Ready
  discoveryUrl: https://mijnbo-bron.cluster-a.fieldlab2026.nl/service-discovery/.well-known/bk-configuration.json
  components:
    - name: service-discovery-process
      type: service-discovery-process
      phase: Ready

Layout

Path What
api/v1alpha1 API types; just generate writes deepcopy code and the CRDs
operator/cmd operator entry point
operator/internal/components the component registry: chart and values per component
operator/internal/controller SourceOrganization and Component reconcilers
operator/internal/helm Helm v4 SDK wrapper
operator/internal/chartrepo fetches component charts from the chart repository
operator/charts our own charts: public-endpoints, source-organization-keys
operator/chart the operator's own chart; files/crds is generated
plugin Fundament plugin: lifecycle, definition.yaml, console pages

Development

mise install
just test
just generate        # after changing api/
just run-operator    # operator against $KUBECONFIG (apply `just crds` first)

Adding a component

  1. Add a Definition and its default chart version in operator/internal/components/sourceorganization.go (values, dependsOn, deletionPolicy).
  2. Add the type to the ComponentType enum in api/v1alpha1 and run just generate.
  3. Add the kinds its chart renders to operator/chart/templates/rbac.yaml.

Fundament sandbox

From the Fundament repository, follow "Testing plugins locally" steps 1–3 (sandbox cluster, functl auth login). Then here:

just operator-push                 # prints OPERATOR_IMAGE
just publish --submit              # publishes plugin/definition.yaml; approve it in the marketplace admin

Install it from the console and fill in the organization; under advanced options, set the operator image to the printed OPERATOR_IMAGE.

Without Fundament

just install-operator code.digitaledienst.overheid.nl/mijn-betaaloverzicht/mijnbo-so-plugin/mijnbo-operator:0.2.0
kubectl create namespace mijnbo
kubectl apply -f config/samples/sourceorganization.yaml

Known limits

  • One source organization per cluster (by design), and the charts render fixed object names.
  • A release left pending-* by an interrupted Helm operation needs a manual helm rollback; the Component stays Degraded with Helm's message.
  • No Gateway API on the cluster plus a gatewayRef leaves the Component Degraded ("no matches for kind HTTPRoute") until the Gateway API exists.