2 Commits

Author SHA1 Message Date
41de38613c Switch to authelia-controller
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 8m6s
2025-04-18 03:45:47 +02:00
e0812f28aa Output json logs except when running through cargo
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 5m25s
2025-04-17 16:54:37 +02:00
4 changed files with 21 additions and 16 deletions

View File

@@ -0,0 +1,7 @@
apiVersion: authelia.huizinga.dev/v1
kind: AccessControlRule
metadata:
name: tunnel
spec:
domain: "*.tunnel.${domain}"
policy: one_factor

View File

@@ -1,10 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: authelia-acl
annotations:
config.huizinga.dev/fragment: authelia-acl
data:
rules: |
- domain: "*.tunnel.${domain}"
policy: one_factor

View File

@@ -9,4 +9,4 @@ resources:
- ./service.yaml - ./service.yaml
- ./certificate.yaml - ./certificate.yaml
- ./ingress-route.yaml - ./ingress-route.yaml
- ./config-map-authelia-acl.yaml - ./access-control-rule.yaml

View File

@@ -24,11 +24,19 @@ async fn main() -> color_eyre::Result<()> {
let env_filter = EnvFilter::try_from_default_env().or_else(|_| EnvFilter::try_new("info"))?; let env_filter = EnvFilter::try_from_default_env().or_else(|_| EnvFilter::try_new("info"))?;
if std::env::var("CARGO").is_ok() {
let logger = tracing_subscriber::fmt::layer().compact(); let logger = tracing_subscriber::fmt::layer().compact();
tracing_subscriber::Registry::default() tracing_subscriber::Registry::default()
.with(logger) .with(logger)
.with(env_filter) .with(env_filter)
.init(); .init();
} else {
let logger = tracing_subscriber::fmt::layer().json();
tracing_subscriber::Registry::default()
.with(logger)
.with(env_filter)
.init();
}
info!( info!(
"Starting {} ({})", "Starting {} ({})",