Files
domain-incoming/apps/gramo/check.rhai
2024-05-25 14:55:10 +02:00

18 lines
826 B
Plaintext

const DOMAIN = config.domain;
fn check_domain() {
assert(have_namespace(`${global::DOMAIN}`), `There is no ${global::DOMAIN} namespace`);
}
fn check_authentik() {
assert(have_namespace(`${global::DOMAIN}-auth`), `There is no ${global::DOMAIN}-auth namespace`);
assert(have_install(`${global::DOMAIN}-auth`, "authentik"), `No authentik installation in ${global::DOMAIN}-auth`);
assert(have_secret(`${global::DOMAIN}-auth`, "authentik"), `No authentik secret in ${global::DOMAIN}-auth`);
}
fn check_authentik_forward() {
assert(have_install(`${global::DOMAIN}-auth`, "authentik-forward"), `No authentik-forward installation in ${global::DOMAIN}-auth`);
}
fn pre_check() {
check_domain();
check_authentik();
check_authentik_forward();
}