mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 12:43:32 +09:00
Render a per-release Secret carrying the structured kube-apiserver `AuthenticationConfiguration` (apiserver.config.k8s.io/v1beta1) and mount it into the KamajiControlPlane. For `mode: System` the Secret is chart-owned: one JWT entry pointing at the `cozy` realm issuer with the per-cluster audience, plus the standard `preferred_username`/`groups` claim mappings. For `mode: CustomConfig` the chart either writes the operator-supplied inline config into a Secret, or — when `secretRef.name` is set — mounts an existing operator-owned Secret directly (mutually exclusive; the chart fails the render if neither or both are set). The `--authentication-config=` flag, mount, and volume on the KamajiControlPlane are kept orthogonal to the user-supplied `controlPlane.apiServer.extra*` knobs: the OIDC additions are appended, and the chart-managed volume name `cozy-oidc-authn-config` is reserved (only when `mode` is not None) so user-supplied volumes cannot collide. Switches from the legacy `--oidc-*` flag form to the file form so multiple issuers, inline private-CA PEM, and future Phase-2 issuers extend the same Secret without rewiring the chart. Signed-off-by: Ivan Okhotnikov <ivan.okhotnikov@aenix.io>
How to test packages local
cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd