Suppress successful Authentik shell logs
This commit is contained in:
@@ -12,9 +12,15 @@ if [ -z "$version" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pins=$(kubectl --namespace authentik exec deployment/authentik-worker -- \
|
||||
shell_log=$(mktemp)
|
||||
trap 'rm -f "$shell_log"' EXIT HUP INT TERM
|
||||
if ! pins=$(kubectl --namespace authentik exec deployment/authentik-worker -- \
|
||||
ak shell --command \
|
||||
'from authentik.outposts.models import Outpost; [print(f"{o.name}={o.config.container_image}") for o in Outpost.objects.filter(name__in=["ldap", "radius", "rac"]).order_by("name")]')
|
||||
'from authentik.outposts.models import Outpost; [print(f"{o.name}={o.config.container_image}") for o in Outpost.objects.filter(name__in=["ldap", "radius", "rac"]).order_by("name")]' \
|
||||
2>"$shell_log"); then
|
||||
cat "$shell_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
pin_lines=$(printf '%s\n' "$pins" | grep -E '^(ldap|rac|radius)=' || true)
|
||||
printf '%s\n' "$pin_lines"
|
||||
if [ "$(printf '%s\n' "$pin_lines" | wc -l)" -ne 3 ] || \
|
||||
|
||||
Reference in New Issue
Block a user