This commit is contained in:
2024-05-25 14:55:10 +02:00
parent c492d69be4
commit a9bb67b046
55 changed files with 310 additions and 304 deletions

View File

@@ -10,7 +10,7 @@ locals {
}
module "service" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace
@@ -22,7 +22,7 @@ module "service" {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -38,7 +38,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group
@@ -61,7 +61,7 @@ provider "restapi" {
}
module "forward" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward?ref=0.3.0"
component = var.component
instance = var.instance
domain = var.domain

View File

@@ -10,7 +10,7 @@ locals {
}
module "service" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace
@@ -22,7 +22,7 @@ module "service" {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -38,7 +38,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group
@@ -51,7 +51,7 @@ module "application" {
}
module "oauth2" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//oauth2"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//oauth2?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace

View File

@@ -16,7 +16,7 @@ locals {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -32,7 +32,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group
@@ -45,7 +45,7 @@ module "application" {
}
module "oauth2" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//oauth2"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//oauth2?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace

17
apps/gramo/check.rhai Normal file
View File

@@ -0,0 +1,17 @@
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();
}

View File

@@ -10,7 +10,7 @@ locals {
}
module "service" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace
@@ -22,7 +22,7 @@ module "service" {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -38,7 +38,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group
@@ -61,7 +61,7 @@ provider "restapi" {
}
module "forward" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward?ref=0.3.0"
component = var.component
instance = var.instance
domain = var.domain

17
apps/infisical/check.rhai Normal file
View File

@@ -0,0 +1,17 @@
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();
}

View File

@@ -9,7 +9,7 @@ locals {
}
module "service" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace
@@ -21,7 +21,7 @@ module "service" {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -37,7 +37,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group
@@ -60,7 +60,7 @@ provider "restapi" {
}
module "forward" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward?ref=0.3.0"
component = var.component
instance = var.instance
domain = var.domain

View File

@@ -1,5 +1,5 @@
module "redis" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//redis"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//redis?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace
@@ -11,7 +11,7 @@ module "redis" {
}
}
module "mongo" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//mongo"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//mongo?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace

17
apps/okd/check.rhai Normal file
View File

@@ -0,0 +1,17 @@
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();
}

View File

@@ -10,7 +10,7 @@ locals {
}
module "service" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace
@@ -22,7 +22,7 @@ module "service" {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -38,7 +38,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group
@@ -61,7 +61,7 @@ provider "restapi" {
}
module "forward" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward?ref=0.3.0"
component = var.component
instance = var.instance
domain = var.domain

View File

@@ -0,0 +1,17 @@
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();
}

View File

@@ -16,7 +16,7 @@ locals {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -32,7 +32,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group
@@ -55,7 +55,7 @@ provider "restapi" {
}
module "forward" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//forward?ref=0.3.0"
component = var.component
instance = var.instance
domain = var.domain

View File

@@ -0,0 +1,16 @@
const DOMAIN = config.domain;
fn check_domain() {
assert(have_namespace(`${global::DOMAIN}`), `There is no ${global::DOMAIN} namespace`);
}
fn check_gitea() {
assert(have_namespace(`${global::DOMAIN}-ci`), `There is no ${global::DOMAIN}-ci namespace`);
assert(have_install(`${global::DOMAIN}-ci`, "gitea"), `No gitea installation in ${global::DOMAIN}-ci`);
assert(have_ingress(`${global::DOMAIN}-ci`, "gitea"), `No gitea ingress in ${global::DOMAIN}-ci`);
assert(have_service(`${global::DOMAIN}-ci`, "gitea-ssh"), `No gitea-ssh service in ${global::DOMAIN}-ci`);
assert(have_secret(`${global::DOMAIN}-ci`, "gitea"), `No gitea secret in ${global::DOMAIN}-ci`);
assert(have_secret(`${global::DOMAIN}-ci`, "gitea-admin-user"), `No gitea-admin-user secret in ${global::DOMAIN}-ci`);
}
fn pre_check() {
check_domain();
check_gitea();
}

View File

@@ -11,7 +11,7 @@ locals {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -27,7 +27,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group

View File

@@ -80,7 +80,7 @@ resource "kubectl_manifest" "pre_backup_pod_db" {
namespace: "${var.namespace}"
labels: ${jsonencode(local.secrets_labels)}
spec:
backupCommand: mysqldump --all-databases --password=$$MYSQL_PWD --host=${var.instance}-${var.component}-mysqld.${var.namespace}.svc --no-create-db --add-drop-table
backupCommand: mysqldump --all-databases --password=$$MYSQL_PWD --host=${var.instance}-${var.component}-mysqld.${var.namespace}.svc --no-create-db --add-drop-table
pod:
spec:
containers:

View File

@@ -19,7 +19,7 @@ locals {
}
module "service" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//service?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace
@@ -31,7 +31,7 @@ module "service" {
}
module "ingress" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress?ref=0.3.0"
component = ""
instance = var.instance
namespace = var.namespace
@@ -47,7 +47,7 @@ module "ingress" {
}
module "application" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application?ref=0.3.0"
component = var.component
instance = var.instance
app_group = var.app_group
@@ -60,7 +60,7 @@ module "application" {
}
module "oauth2" {
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//oauth2"
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//oauth2?ref=0.3.0"
component = var.component
instance = var.instance
namespace = var.namespace