No description
  • Go 96.5%
  • Nix 2.4%
  • Makefile 1.1%
Find a file
Manuel Ganter f6049fa05c
All checks were successful
ci-main / test (push) Successful in 3m40s
ci: pin golangci-lint via go run @v2.6.2
The runner's preinstalled golangci-lint v1.64.8 cannot load a v2 config
against a Go 1.26 module. Switching the Makefile recipe to a 'go run'
invocation makes the lint version part of the source tree, which lets
the CI step drop the curl install entirely and avoids the older binary
on PATH winning.
2026-05-27 09:18:49 +02:00
.forgejo/workflows ci: pin golangci-lint via go run @v2.6.2 2026-05-27 09:18:49 +02:00
docs chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
pkg chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
.envrc chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
.gitignore chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
.golangci.yml chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
flake.nix chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
go.mod chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
go.sum chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
Makefile ci: pin golangci-lint via go run @v2.6.2 2026-05-27 09:18:49 +02:00
README.md chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00
renovate.json chore: adopt golang-standards/project-layout and ship repo infra 2026-05-27 08:58:35 +02:00

controller-util

Shared helpers for the MMS Kubernetes controllers (tenant-controller, project-controller, zitadel-sso-controller). One source of truth for boilerplate that used to live in each repo independently.

Layout

Follows golang-standards/project-layout: every importable package lives under pkg/. See docs/layout.md for the full file tree.

Packages

All under edp.buildth.ing/DevFW-CICD/controller-util/pkg/<name>.

Package What it gives you
pkg/conditions Set, IsTrue, IsFalse, PersistFailureapimeta-backed condition setters that carry the observedGeneration invariant, plus a status-write helper that surfaces both the original error and the write error via errors.Join.
pkg/retry Policy, Default, Do — bounded retry with jittered exponential backoff.
pkg/kcppath Join, Split, Leaf, OIDCSubjectPrefix — kcp logical-cluster path string ops + the oidc: prefix kcp's WorkspaceAuthenticationConfiguration applies.
pkg/kcputil ResolveOwnerName, ResolvePath — read the kcp LogicalCluster singleton inside a workspace.
pkg/kcpclient Scoper — copy a rest.Config and rewrite Host to /clusters/<path>. IsDiscoveryUnavailable — sniff "API not served here" errors from kcp's discovery chain.
pkg/kcpws Idempotent Ensure* helpers for kcp Workspace, WorkspaceType, APIBinding, ClusterRole, ClusterRoleBinding.
pkg/name DNSSegment, KubeName — DNS-friendly subject sanitizers.
pkg/mctest FakeManager, FakeCluster, NewManager — minimum mcmanager.Manager surface for unit tests.

No prometheus dep, no project-specific CRDs. Consumers wrap the helpers with their own instrumentation at the call site.