feat: another step in implementing zitadel
This commit is contained in:
parent
63b5bfa35a
commit
410396c215
2 changed files with 78 additions and 13 deletions
|
|
@ -85,15 +85,17 @@ in
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
assertion =
|
assertion = config.services.k3s.enable == true;
|
||||||
config.services.k3s.enable == true;
|
|
||||||
# config.clan.inventory.instances
|
|
||||||
# |> attrValues
|
|
||||||
# |> any ({ module, ... }: module.name == "k3s");
|
|
||||||
message = "This module requires k3s in order to run";
|
message = "This module requires k3s in order to run";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
users.users.zitadel = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "zitadel";
|
||||||
|
};
|
||||||
|
users.groups.zitadel = {};
|
||||||
|
|
||||||
clan.core.vars.generators.zitadel = {
|
clan.core.vars.generators.zitadel = {
|
||||||
share = false;
|
share = false;
|
||||||
|
|
||||||
|
|
@ -114,7 +116,31 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.k3s.autoDeployCharts.zitadel = {
|
services.k3s.autoDeployCharts = {
|
||||||
|
postgres = {
|
||||||
|
name = "postgresql";
|
||||||
|
repo = "https://charts.bitnami.com/bitnami";
|
||||||
|
version = "12.10.0";
|
||||||
|
hash = "sha256-htb+iCfdIV2hNbDvxivQDC1MwF9EDuT2juDEsyrVTrs=";
|
||||||
|
|
||||||
|
targetNamespace = "postgres-system";
|
||||||
|
createNamespace = true;
|
||||||
|
|
||||||
|
values = {
|
||||||
|
image.repository = "bitnamilegacy/postgresql";
|
||||||
|
metrics.image.repository = "bitnamilegacy/postgres-exporter";
|
||||||
|
volumePermissions.image.repository = "bitnamilegacy/os-shell";
|
||||||
|
|
||||||
|
primary = {
|
||||||
|
persistence.enabled = false;
|
||||||
|
pgHbaConfiguration = ''
|
||||||
|
host all all all trust
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
zitadel = {
|
||||||
name = "zitadel";
|
name = "zitadel";
|
||||||
repo = "https://charts.zitadel.com";
|
repo = "https://charts.zitadel.com";
|
||||||
version = "9.12.3";
|
version = "9.12.3";
|
||||||
|
|
@ -125,11 +151,44 @@ in
|
||||||
|
|
||||||
values = config.sops.templates.${valuesYamlKey}.path;
|
values = config.sops.templates.${valuesYamlKey}.path;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
templates.${valuesYamlKey}.content = ''
|
templates.${valuesYamlKey}.content = ''
|
||||||
zitadel:
|
zitadel:
|
||||||
masterKey: ${config.sops.placeholder."vars/zitadel/masterKey"}
|
masterKey: ${config.sops.placeholder."vars/zitadel/masterKey"}
|
||||||
|
|
||||||
|
configmapConfig:
|
||||||
|
ExternalDomain: auth.amarth.cloud
|
||||||
|
ExternalPort: 443
|
||||||
|
TLS:
|
||||||
|
Enabled: false
|
||||||
|
Database:
|
||||||
|
Postgres:
|
||||||
|
Host: db-postgresql
|
||||||
|
Port: 5432
|
||||||
|
Database: zitadel
|
||||||
|
MaxOpenConns: 20
|
||||||
|
MaxIdleConns: 10
|
||||||
|
MaxConnLifetime: 30m
|
||||||
|
MaxConnIdleTime: 5m
|
||||||
|
User:
|
||||||
|
Username: postgres
|
||||||
|
SSL:
|
||||||
|
Mode: disable
|
||||||
|
Admin:
|
||||||
|
Username: postgres
|
||||||
|
SSL:
|
||||||
|
Mode: disable
|
||||||
|
|
||||||
|
# secretConfig:
|
||||||
|
# Database: {}
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
login:
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,12 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
machines = {
|
||||||
|
node1 = {
|
||||||
|
services.k3s.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue