Skip to content

outposts: Create separate metrics service in Kubernetes - #21229

Merged
BeryJu merged 8 commits into
mainfrom
outposts/k8s-separate-metrics-service
Mar 29, 2026
Merged

BeryJu merged 8 commits into
mainfrom
outposts/k8s-separate-metrics-service

Conversation

@BeryJu

@BeryJu BeryJu commented Mar 29, 2026 •

Copy link
Copy Markdown
Member

Currently our outpost controller only creates a single service, however with outposts providing a non-http protocol (radius, ldap) they might be load balancer services and don't have the metrics port defined. RAC does not create a service at all due to how it works so its metrics cannot be automatically scraped.

This PR reworks service generation to create a separate service for the metrics endpoint (which is generated for all non-embedded outposts) and remove the metrics port from the "dataplane" service.

Tested on a real kubernetes cluter with real outposts and real prometheus

@BeryJu
BeryJu requested a review from a team as a code owner March 29, 2026 19:09
@netlify

netlify Bot commented Mar 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 0d88596
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69c97976f0dab70008a7eb94
😎 Deploy Preview https://deploy-preview-21229--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@BeryJu
BeryJu requested a review from a team as a code owner March 29, 2026 19:11
@netlify

netlify Bot commented Mar 29, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 0d88596
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69c97976d64d42000799c830
😎 Deploy Preview https://deploy-preview-21229--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Mar 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.18182% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.83%. Comparing base (d1c997b) to head (c2390b9).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...hentik/outposts/controllers/k8s/service_monitor.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21229      +/-   ##
==========================================
- Coverage   92.83%   92.83%   -0.01%     
==========================================
  Files        1004     1004              
  Lines       56926    56968      +42     
  Branches      425      425              
==========================================
+ Hits        52849    52885      +36     
- Misses       4077     4083       +6     
Flag Coverage Δ
conformance 37.19% <34.09%> (-0.01%) ⬇️
e2e 42.66% <34.09%> (-0.01%) ⬇️
integration 22.11% <68.18%> (+0.03%) ⬆️
rust 0.23% <ø> (ø)
unit 91.82% <93.18%> (+0.08%) ⬆️
unit-migrate 91.90% <93.18%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BeryJu
BeryJu force-pushed the outposts/k8s-separate-metrics-service branch from e9590c8 to c7491d5 Compare March 29, 2026 19:48
BeryJu added 6 commits March 29, 2026 21:58
Signed-off-by: Jens Langhammer <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
@BeryJu
BeryJu force-pushed the outposts/k8s-separate-metrics-service branch from d235373 to 2462b70 Compare March 29, 2026 19:58
@netlify

netlify Bot commented Mar 29, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 2462b70
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69c9847b80f14a000853447e
😎 Deploy Preview https://deploy-preview-21229--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Mar 29, 2026 •

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-c2390b93277af4ccad6a0d84ad5469487ff716ab
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-c2390b93277af4ccad6a0d84ad5469487ff716ab

Afterwards, run the upgrade commands from the latest release notes.

@BeryJu
BeryJu merged commit 1848c6c into main Mar 29, 2026
100 checks passed
@BeryJu
BeryJu deleted the outposts/k8s-separate-metrics-service branch March 29, 2026 21:51
kensternberg-authentik added a commit that referenced this pull request Apr 8, 2026
* main: (52 commits)
  stages/authenticator_webauthn: save attestation certificate when creating credential (#20095)
  web/admin: fix missing icon on app view page (#21251)
  web/elements: allow table per-column options (#21250)
  ci: bump actions/setup-go from 6.3.0 to 6.4.0 (#21245)
  web: bump knip from 6.0.6 to 6.1.0 in /web (#21241)
  web: bump globby from 16.1.1 to 16.2.0 in /web (#21242)
  core: bump types-requests from 2.32.4.20260324 to 2.33.0.20260327 (#21236)
  core: bump types-docker from 7.1.0.20260322 to 7.1.0.20260328 (#21237)
  core: bump aws-cdk-lib from 2.244.0 to 2.245.0 (#21238)
  ci: bump int128/docker-manifest-create-action from 2.16.0 to 2.17.0 (#21244)
  ci: bump astral-sh/setup-uv from 7.6.0 to 8.0.0 in /.github/actions/setup (#21246)
  ci: bump taiki-e/install-action from 2.69.12 to 2.70.2 in /.github/actions/setup (#21247)
  ci: bump actions/setup-go from 6.3.0 to 6.4.0 in /.github/actions/setup (#21248)
  core, web: update translations (#21233)
  translate: Updates for project authentik and language fr_FR (#21214)
  web/admin: polish recent events, various button alignments and labels (#21232)
  outposts: Create separate metrics service in Kubernetes (#21229)
  events: fix exception in volume endpoint, adjust simple table size (#21230)
  core: Application stats, device events & cleanup (#21225)
  core: bump axllent/mailpit from v1.29.4 to v1.29.5 in /tests/e2e (#21226)
  ...
davepgreene pushed a commit to davepgreene/authentik that referenced this pull request Apr 13, 2026
…21229)

* outposts: create separate metrics service

Signed-off-by: Jens Langhammer <[email protected]>

* fix service monitor plumbing

Signed-off-by: Jens Langhammer <[email protected]>

* update docs

Signed-off-by: Jens Langhammer <[email protected]>

* format

Signed-off-by: Jens Langhammer <[email protected]>

* fix

Signed-off-by: Jens Langhammer <[email protected]>

* add some static tests

Signed-off-by: Jens Langhammer <[email protected]>

* make metrics service ClusterIP

Signed-off-by: Jens Langhammer <[email protected]>

* update service monitor when labels mismatch

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
davepgreene pushed a commit to davepgreene/authentik that referenced this pull request Apr 13, 2026
…21229)

* outposts: create separate metrics service

Signed-off-by: Jens Langhammer <[email protected]>

* fix service monitor plumbing

Signed-off-by: Jens Langhammer <[email protected]>

* update docs

Signed-off-by: Jens Langhammer <[email protected]>

* format

Signed-off-by: Jens Langhammer <[email protected]>

* fix

Signed-off-by: Jens Langhammer <[email protected]>

* add some static tests

Signed-off-by: Jens Langhammer <[email protected]>

* make metrics service ClusterIP

Signed-off-by: Jens Langhammer <[email protected]>

* update service monitor when labels mismatch

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant