No description
  • JavaScript 54.1%
  • Go 41%
  • Just 2.2%
  • HTML 1.6%
  • Dockerfile 1.1%
Find a file
2026-11-25 15:02:34 +00:00
.forgejo/workflows feat: autodetect release number 2026-11-24 16:55:56 +01:00
console console 2026-11-24 15:52:15 +01:00
console-test console 2026-11-24 15:52:15 +01:00
.dockerignore initial plugin bootstrap 2026-11-24 15:31:14 +01:00
.gitignore initial plugin bootstrap 2026-11-24 15:31:14 +01:00
config.go Current deployment (from Haven) only watches keycloak-instances, this plugin sets nothing, 2026-11-25 15:28:52 +01:00
config_test.go Current deployment (from Haven) only watches keycloak-instances, this plugin sets nothing, 2026-11-25 15:28:52 +01:00
console.go console 2026-11-24 15:52:15 +01:00
definition.yaml Current deployment (from Haven) only watches keycloak-instances, this plugin sets nothing, 2026-11-25 15:28:52 +01:00
definition_test.go initial plugin bootstrap 2026-11-24 15:31:14 +01:00
Dockerfile initial plugin bootstrap 2026-11-24 15:31:14 +01:00
go.mod roles 2026-11-24 16:09:32 +01:00
go.sum initial plugin bootstrap 2026-11-24 15:31:14 +01:00
Justfile initial plugin bootstrap 2026-11-24 15:31:14 +01:00
LICENSE Initial 2026-11-23 15:08:05 +01:00
main.go initial plugin bootstrap 2026-11-24 15:31:14 +01:00
mise.toml initial plugin bootstrap 2026-11-24 15:31:14 +01:00
plugin.go Current deployment (from Haven) only watches keycloak-instances, this plugin sets nothing, 2026-11-25 15:28:52 +01:00
plugin_test.go initial plugin bootstrap 2026-11-24 15:31:14 +01:00
README.md Initial 2026-11-23 15:08:05 +01:00
roles.go roles 2026-11-24 16:09:32 +01:00
roles_test.go roles 2026-11-24 16:09:32 +01:00

Keycloak

A fundament plugin to manage authentication and authorization

A Fundament plugin named keycloak, scaffolded with functl plugin create.

Layout

Path What it is
definition.yaml The plugin manifest: metadata, RBAC, console menu and components
plugin.go The plugin itself
main.go Hands the plugin to the SDK runtime
Justfile Build, test, lint and image recipes
mise.toml Pinned tool versions (Go, just, skaffold, kubectl)
LICENSE EUPL-1.2

Develop

Tool versions are pinned in mise.toml. With mise installed, mise install gets Go, just, skaffold and kubectl at the versions this project expects. Recipes live in the Justfile; run just --list to see them all.

go mod tidy      # needs network access, or a warm module cache
just build
just test

Image builds need the docker buildx plugin (with Homebrew and Colima: brew install docker-buildx):

just docker                         # linux/amd64 image, also on an Apple Silicon Mac
PLATFORM=linux/arm64 just docker    # for an arm64 cluster

Hot reload

functl plugin dev runs the plugin in the Fundament plugin sandbox and rebuilds it when you save Go source, go.mod or go.sum. Changes to definition.yaml need a restart of functl plugin dev. Prerequisites: the sandbox cluster, docker, skaffold, kubectl, and a functl auth login session. Set up the sandbox as described in https://github.com/fundament-oss/fundament/blob/master/docs/developer/plugins/testing-plugins-locally.md.

functl plugin dev                  # deletes the dev installation on Ctrl-C
functl plugin dev --no-cleanup     # keeps it after exit
functl plugin dev-down             # removes a leftover dev installation

Config values for spec.config (the keys in definition.yaml's configSchema) come from --set KEY=VALUE (repeatable) or a --config YAML file; --set wins. functl checks them against the schema before building, including required keys.

functl plugin dev --set MY_KEY=value         # MY_KEY declared in configSchema
functl plugin dev --config dev-config.yaml   # MY_KEY: value

Fill in

  • definition.yaml: spec.permissions.rbac decides what the plugin may do in the cluster. It is materialised verbatim as a ClusterRole, so grant only what the plugin uses. The rules that ship are only what Helm itself needs to install a release; uncomment the commented blocks for the kinds of object your chart creates.
  • plugin.go: point repoURL, chartName and chartVersion at the chart you install, and list its CRDs in expectedCRDs.
  • Every TODO marker in this project.

metadata.license says EUPL-1.2, and LICENSE holds its text. If that file says TODO, functl plugin create had no text for the licence you chose -- paste it in, or re-create with one of MIT, Apache-2.0, GPL-3.0-only or EUPL-1.2.

Publish

Publishing a standalone plugin is not supported yet. Today a plugin definition is published from inside the Fundament monorepo with just plugin-publish, which requires the plugin to live under plugins/ and to have a catalog entry in the appstore. Until functl plugin publish exists, you can build and run this plugin, but not install it into a Fundament cluster.

Docs

https://github.com/fundament-oss/fundament/tree/master/docs/developer/plugins