- Go 70.5%
- HTML 15.8%
- TypeScript 2.6%
- Svelte 2.5%
- JavaScript 1.9%
- Other 6.7%
| .gitlab/ci | ||
| .gitlab-ci-local | ||
| apps | ||
| data | ||
| deploy | ||
| docs | ||
| images/k8s | ||
| scripts | ||
| walkthrough | ||
| .gitignore | ||
| .gitlab-ci-local-env | ||
| .gitlab-ci-local-variables.yml | ||
| .gitlab-ci.yml | ||
| .gitleaks.toml | ||
| .golangci.yml | ||
| .prettierignore | ||
| .renovaterc.json | ||
| .sops.yaml | ||
| .tool-versions | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| go.work | ||
| go.work.sum | ||
| justfile | ||
| k3d.yaml | ||
| LICENSE | ||
| README.md | ||
| skaffold.yaml | ||
Simulation environment
This repository contains the deployments for the Simulation environment, as well as FDS applications such as the membership administrator.
Repository overview
- Apps: this is where the applications such as the member list administrator are developed.
- Deploy: this is where the simulation environment deployment is configured.
Wanting to join the simulation cluster?
There are multiple options to join the simulation cluster.
Using k8s cluster provided by us (recommended)
Send a message to us in our request channel on Mattermost. Specify the following things:
- Organization name (e.g. Belastingdienst. This will be your name in the simulation cluster)
- The Gitlab usernames that should have access to the repository and the k8s cluster.
If you want a self-managed repository instead of a repository under our control, then also specify where the kustomization file is located. This option is not recommended because you will need to setup and keep the deployment up-to-date yourself (like OpenFSC).
Using your own infrastructure (advanced limited support)
The process of using your own infrastructure and connecting to the FDS Simulation environment is documented in the onboarding guide.
Required tools
Install the required tools via mise (or the unsupported ASDF):
mise install
Available local commands
Run just -l to see the local available commands
Deployment
Local on your pc
- run
just setup - run
just dev
Step 2 can take some time, it needs to start a k8s cluster on your pc. When just dev errors, most of the time running it again will fix it.
Access to K8s cluster
Requirements:
- Pinniped CLI installed
- An account on one of the following providers:
- Gitlab account with access to the Simulation group
Run the following commands to update your kubeconfig to include the required configuration to connect to the cluster.
kubectl config set clusters.datastelsel-simulatie.server https://pinniped.simulatie.datastelsel.nl
kubectl config set clusters.datastelsel-simulatie.certificate-authority-data LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ4RENDQVd1Z0F3SUJBZ0lRSnNINGNMbVV3NU8xeURHSnVwb0ZvakFLQmdncWhrak9QUVFEQWpBeU1UQXcKTGdZRFZRUURFeWRRYVc1dWFYQmxaQ0JKYlhCbGNuTnZibUYwYVc5dUlGQnliM2g1SUZObGNuWnBibWNnUTBFdwpJQmNOTWpZd01USXhNVE0xTmpBeVdoZ1BNakV5TlRFeU1qZ3hOREF4TURKYU1ESXhNREF1QmdOVkJBTVRKMUJwCmJtNXBjR1ZrSUVsdGNHVnljMjl1WVhScGIyNGdVSEp2ZUhrZ1UyVnlkbWx1WnlCRFFUQlpNQk1HQnlxR1NNNDkKQWdFR0NDcUdTTTQ5QXdFSEEwSUFCRnYvSTA0M0w1dFBOY3BtZFp6aDhNa3ZleVg5a2w1UXVsSy9hK2NMSmNRdQpObHhIZ0FxWWU1MnN4K0lmUVQzdUZTRzRaTUVKWS80QnUvdnlFdnplc1NLallUQmZNQTRHQTFVZER3RUIvd1FFCkF3SUNoREFkQmdOVkhTVUVGakFVQmdnckJnRUZCUWNEQWdZSUt3WUJCUVVIQXdFd0R3WURWUjBUQVFIL0JBVXcKQXdFQi96QWRCZ05WSFE0RUZnUVVvK3B1R1hoNkdrbmVQeUxRMHNmM3d0Zzc3MTB3Q2dZSUtvWkl6ajBFQXdJRApSd0F3UkFJZ2FpRmVUOHdPcEhDWXlTdEg3bzNubjlUVHV4NXRTbUtRM09wWXpBNjVnUlFDSUZvVWs5cW5aZzR2CmlLZ2NCNllycEtkdXljTy8vL0pZZ0hMZHJiU3RLay9rCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
kubectl config set-credentials pinniped-datastelsel-simulatie \
--exec-api-version="client.authentication.k8s.io/v1beta1" \
--exec-command="pinniped" \
--exec-arg="login" \
--exec-arg="oidc" \
--exec-arg="--enable-concierge" \
--exec-arg="--concierge-authenticator-name=pinniped-supervisor" \
--exec-arg="--concierge-authenticator-type=jwt" \
--exec-arg="--concierge-endpoint=https://pinniped.simulatie.datastelsel.nl" \
--exec-arg="--concierge-ca-bundle-data=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ4RENDQVd1Z0F3SUJBZ0lRSnNINGNMbVV3NU8xeURHSnVwb0ZvakFLQmdncWhrak9QUVFEQWpBeU1UQXcKTGdZRFZRUURFeWRRYVc1dWFYQmxaQ0JKYlhCbGNuTnZibUYwYVc5dUlGQnliM2g1SUZObGNuWnBibWNnUTBFdwpJQmNOTWpZd01USXhNVE0xTmpBeVdoZ1BNakV5TlRFeU1qZ3hOREF4TURKYU1ESXhNREF1QmdOVkJBTVRKMUJwCmJtNXBjR1ZrSUVsdGNHVnljMjl1WVhScGIyNGdVSEp2ZUhrZ1UyVnlkbWx1WnlCRFFUQlpNQk1HQnlxR1NNNDkKQWdFR0NDcUdTTTQ5QXdFSEEwSUFCRnYvSTA0M0w1dFBOY3BtZFp6aDhNa3ZleVg5a2w1UXVsSy9hK2NMSmNRdQpObHhIZ0FxWWU1MnN4K0lmUVQzdUZTRzRaTUVKWS80QnUvdnlFdnplc1NLallUQmZNQTRHQTFVZER3RUIvd1FFCkF3SUNoREFkQmdOVkhTVUVGakFVQmdnckJnRUZCUWNEQWdZSUt3WUJCUVVIQXdFd0R3WURWUjBUQVFIL0JBVXcKQXdFQi96QWRCZ05WSFE0RUZnUVVvK3B1R1hoNkdrbmVQeUxRMHNmM3d0Zzc3MTB3Q2dZSUtvWkl6ajBFQXdJRApSd0F3UkFJZ2FpRmVUOHdPcEhDWXlTdEg3bzNubjlUVHV4NXRTbUtRM09wWXpBNjVnUlFDSUZvVWs5cW5aZzR2CmlLZ2NCNllycEtkdXljTy8vL0pZZ0hMZHJiU3RLay9rCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K" \
--exec-arg="--issuer=https://pinniped-supervisor.simulatie.datastelsel.nl" \
--exec-arg="--request-audience=k8s-simulation-be8f18f" \
--exec-arg="--upstream-identity-provider-name=GitLab"
kubectl config set-context pinniped-datastelsel-simulatie \
--cluster=datastelsel-simulatie \
--user=pinniped-datastelsel-simulatie
kubectl config use-context pinniped-datastelsel-simulatie
Secret handling
Currently we use SOPS for handling and encrypting secrets.
Public key of the SOPS controller: age1mfv39vgcka46ekdpxyzp9d6da836rnzl44yyncuujcj9t6d3hvusrwnla0
You can encrypt a secret as follows:
- Create a K8s secret yaml, e.g.
# secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: gitlab-client-credentials
type: secrets.pinniped.dev/oidc-client
stringData:
clientID: veryrealclientid
clientSecret: veryrealclientsecret
- Run the following command:
sops --encrypt --encrypted-regex '^(data|stringData)$' --age "age1mfv39vgcka46ekdpxyzp9d6da836rnzl44yyncuujcj9t6d3hvusrwnla0" --in-place secret.yaml
- Your secret is encrypted now and can be commit to git, the secret is decrypted by the SOPS controller running inside the cluster
Overview Simulation
@startuml
'https://plantuml.com/component-diagram
Component "Rol: FSC Directory" as FDS << Federatief Datastelsel>> #lightgreen
Component "Rol: Aanbieder\nservices:\n- handelsregister-zoeken\n- dataservice" as KvK << Kamer van Koophandel >> #lightblue
Component "Rol: Afnemer\n" as UWV << UWV >> #lightgrey
Component "Rol: Aanbieder \nservices:\n- BAG" as Kadaster << Kadaster >> #lightblue
Component "Rol: Aanbieder \nservices:\n- ODataAPI" as CBS << CBS >> #lightblue
Component "Rol: Aanbieder \nservices:\n- BRP-Personen" as RvIG << Rijksdienst voor Identiteitsgegevens >> #lightblue
Component "Rol: Aanbieder \nservices:\n- basisregister-fictieve-kentekens\n" as RvRD<< Rijksdienst voor Realistische Demo's>> #lightblue
Component "Rol: Aanbieder, Afnemer\nservices:\n- parkeerrechten\n" as gemeente_stijns<< Gemeente Stijns >> #lightgrey
Component "Rol: Afnemer" as vergunningsoftware<< Vergunningsoftware B.V. >> #lightgrey
FDS <.. KvK: "service publication Grants:\n- handelsregister-zoeken\n- dataservice"
FDS <..RvIG: "service publication Grants:\n- brp-personen"
KvK <-- UWV: "service connection Grants:\n- handelsregister-zoeken\n- dataservice"
RvIG <-- UWV: "service connection Grants:\n- brp-personen"
RvIG <-- gemeente_stijns: "service connection Grants:\n- brp-personen"
Kadaster <-- gemeente_stijns: "service connection Grants:\n bag"
@enduml