No description
  • Python 87.4%
  • Go Template 5.6%
  • Dockerfile 4.1%
  • HCL 1.8%
  • Shell 1.1%
Find a file
2026-05-27 14:04:25 +02:00
controller feat: better startup error handling 2026-05-27 13:59:05 +02:00
helm release: 2.7.1 2026-04-21 11:59:54 +02:00
tests publish 2025-10-17 09:47:16 +02:00
.dockerignore uv 2026-04-09 12:07:56 +02:00
.gitignore publish 2025-10-17 09:47:16 +02:00
config.py feat: ruff rules 2026-04-13 13:02:01 +02:00
docker-bake.hcl fix build cache 2025-10-24 10:28:48 +02:00
Dockerfile uv 2026-04-09 12:07:56 +02:00
entrypoint.sh fix: entrypoint otel correct command 2026-04-27 11:25:52 +02:00
LICENSE publish 2025-10-17 09:47:16 +02:00
log_conf.yaml feat: fastAPI rewrite 2026-04-08 15:15:04 +02:00
pyproject.toml feat: ruff rules 2026-04-13 13:02:01 +02:00
README.md docker bake 2025-10-22 13:42:20 +02:00
skaffold.yaml uv 2026-04-09 12:07:56 +02:00
sonar-project.properties Github sonarqube 2025-10-20 13:49:51 +02:00
test_requirements.txt publish 2025-10-17 09:47:16 +02:00
uv.lock uv 2026-04-09 12:07:56 +02:00

Config controller

The config-controller is a python application that manages application jobs in a Kubernetes environment.

To run this in a cluster you can use the provided helm chart and install it. Alternatively you can make use of Skaffold to run with auto-reload for development.

Registering application templates

The config-controller uses configmaps to create and list instances of applications.

The configmap needs to have the label config-controller.semafor.ch/template, and contain a yaml file with the job template (what you'd put into the /spec/template key in a job object) to be recognized by the config-controller.

It will also only look for the configmaps within the same namespace it's deployed in.

Example:

apiVersion: v1
kind: ConfigMap
metadata:
  name: scim-config
  labels:
    config-controller.semafor.ch/template: 'true'
data:
  scim-intens.yaml: |-
    metadata:
      labels:
        app.kubernetes.io/name: scim
        app.kubernetes.io/instance: scim
    spec:
      terminationGracePeriodSeconds: 0
      restartPolicy: Never
      containers:
        - image: "semafor/scim:latest"
        ...
    

The label needed to search for the config-controller is also adjustable via the value customConfigSelector in the helm chart.

Changes done to the template in the configmap will apply to future applications started with it. Already running applications will not be affected by changes to the template.

Removing an application type requires you to just delete the configmap itself. Please note that already running applications are still deletable and listed via the API.

REST API

The REST API consists of 4 routes:

  • GET /app: Return a list of all available app types to deploy.
  • GET /app/<type>: Return a list of all running instances of a specific app type. It includes information like ip address and startup time.
  • GET /app/<type>/<name>: Get the address of the app of a type and name. If no instance of said name is running, a new app will be started.
  • PATCH /app/<type>/<name>: Add labels to a running instance. For example username, sessionID
  • DELETE /app/<type>/<name>: Stop a running app with said type and name.

If you try to start an app that does not exist as a type or the template contains errors, a relevant error message will be shown.

Jobs started with the config-controller have relevant labels applied under the config-controller.semafor.ch/ namespace.