Skip to content
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

Allow defining Providers and Applications via Kubernetes Resources #4119

Closed
benedikt-bartscher opened this issue Nov 29, 2022 · 9 comments
Closed
Labels
enhancement New feature or request

Comments

@benedikt-bartscher
Copy link

Maybe it's a good idea to add CRDs to define Authentik Providers and Applications with Kubernetes Resources. Applications could provide these Resources in their Helm Charts and pass all secret information via K8 Secrets.
This would be a big improvement for security and useability reasons.

@benedikt-bartscher benedikt-bartscher added the enhancement New feature or request label Nov 29, 2022
@sdimovv
Copy link
Contributor

sdimovv commented Dec 1, 2022

You should already be able to define those via blueprints. Blueprints are just yaml files, so you can store them as config maps and mount them in the worker container.

@genofire
Copy link

That is a good news - i will try to extends the helm-chart with:
https://github.com/kiwigrid/k8s-sidecar

to collect all the different ConfigMap and Secrets in the Cluster and give them Authentik.
(better then patch every time authentik for a new blueprint)

like it does grafana for dashboards and datasources:

Pod:
https://github.com/grafana/helm-charts/blob/a07a658305acd34810b3778e9be741ba74b8b258/charts/grafana/templates/_pod.tpl#L335-L444

Values:
https://github.com/grafana/helm-charts/blob/a07a658305acd34810b3778e9be741ba74b8b258/charts/grafana/values.yaml#L771-L873


Is there an API to force reload (and not to wait 1h till new blueprints take effect)?

@BeryJu
Copy link
Member

BeryJu commented Mar 31, 2023

The authentik worker uses ionotify to get events when a blueprint file is created/updated and will trigger the task to deal with it. Removed files are not automatically removed from this event, but there's a scheduled task that deletes blueprint instances in authentik if the file is not able to be fetched (only blueprints that use file based storage)

@genofire
Copy link

genofire commented Mar 31, 2023

Thats is good to know, theb i have miss understand that:

https://goauthentik.io/developer-docs/blueprints/

As a Blueprint instance, which is a YAML file mounted into the authentik (worker) container. This file is read and applied regularly (every 60 minutes). Multiple instances can be created for a single blueprint file, and instances can be given context key:value attributes to configure the blueprint.

@genofire
Copy link

genofire commented Apr 6, 2023

I solve it with this sidecar see HelmChart PR goauthentik/helm#146

@genofire
Copy link

@BeryJu please review

@genofire
Copy link

genofire commented Apr 17, 2023

@genofire
Copy link

genofire commented Apr 18, 2023

Removing has to change the ConfigMap/Secret ;( - for a easy solution i create this issue #5300

@benedikt-bartscher
Copy link
Author

Closing in favor of #5675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants