-
-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
website/docs: fix nginx ingress proxy example #8245
Conversation
👋 Hey, I was trying to add an ingress for my k8s cluster to setup a proxy application and copy-pasting the example clearly did not work. Here is a fix for that Signed-off-by: Eliott Bouhana <47679741+eliottness@users.noreply.github.com>
✅ Deploy Preview for authentik-storybook canceled.
|
✅ Deploy Preview for authentik ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Elliot, fancy seeing you here! Thank you for your contribution!
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8245 +/- ##
==========================================
+ Coverage 92.29% 92.31% +0.01%
==========================================
Files 608 608
Lines 30262 30262
==========================================
+ Hits 27929 27935 +6
+ Misses 2333 2327 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
* main: (21 commits) stages/authenticator_validate: use friendly_name for stage selector when enrolling (#8255) web: bump vite from 5.0.10 to 5.0.12 in /web (#8241) web: bump the wdio group in /tests/wdio with 4 updates (#8253) web: bump rollup from 4.9.5 to 4.9.6 in /web (#8251) web: bump core-js from 3.35.0 to 3.35.1 in /web (#8250) web: bump the sentry group in /web with 1 update (#8249) core: bump ruff from 0.1.13 to 0.1.14 (#8247) website: bump react-tooltip from 5.25.2 to 5.26.0 in /website (#8248) Update applications.md website/docs: fix nginx ingress proxy example (#8245) website/blog: add Rebecca's byline, add links for Reddit screenshots (#8238) website/blog: Security hygiene Blog (#8225) translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN (#8235) translate: Updates for file web/xliff/en.xlf in zh-Hans (#8232) web: bump the storybook group in /web with 7 updates (#8231) core: bump drf-spectacular from 0.27.0 to 0.27.1 (#8230) translate: Updates for file web/xliff/en.xlf in zh_CN (#8233) translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans (#8234) web/components: improve error handling in ak-search-select (#8228) rbac: fix invitations listing with restricted permissions (#8227) ...
@eliottness Do you have any working example of a nginx ingress with authentik on it ? (Authentik deployed with helm on a different cluster, external Outpost) |
I don't have an external outpost but I have this if it can help: apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app
namespace: app
annotations:
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/auth-url: http://ak-outpost-authentik-embedded-outpost.authentik.svc.cluster.local:9000/outpost.goauthentik.io/auth/nginx
nginx.ingress.kubernetes.io/auth-signin: https://app.domain.com/outpost.goauthentik.io/start?rd=$escaped_request_uri
nginx.ingress.kubernetes.io/auth-response-headers: Set-Cookie,X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid
nginx.ingress.kubernetes.io/auth-snippet: |
proxy_set_header X-Forwarded-Host $http_host;
labels:
name: app
spec:
rules:
- host: app.domain.com
http:
paths:
- pathType: Prefix
path: "/outpost.goauthentik.io"
backend:
service:
name: authentik
port:
number: 9000
- pathType: Prefix
path: "/"
backend:
service:
name: app
port:
number: 80
tls:
- hosts:
- app.domain.com
secretName: letsencrypt I had to add |
Thank you, but for this to work you need to have the app and the authentik in same namespace or am i wrong ?
|
@drg-tanasescu Ah yes, you made me remember that there is a little trickery: an apiVersion: v1
kind: Service
metadata:
name: authentik
namespace: app
spec:
externalName: ak-outpost-authentik-embedded-outpost.authentik.svc.cluster.local
type: ExternalName |
I tried with a service like this and didn't work.
This svc is not created automatically: ak-outpost-authentik-embedded-outpost
And this worked (with traefik ingress)
I will create tomorrow an issue if i get no answers on the Discord channel and ping you there, hope we can create a working example like this one with traefik. |
@drg-tanasescu All the mentions to |
Details
👋 Hey,
I was trying to add an ingress for my k8s cluster to setup a proxy application and copy-pasting the example clearly did not work. Here is a fix for that.
Checklist
ak test authentik/
)make lint-fix
)If an API change has been made
make gen-build
)If changes to the frontend have been made
make web
)make i18n-extract
)If applicable
make website
)