Compare commits

...

3 Commits

Author SHA1 Message Date
Morten Olsen
295472a028 update 2025-08-15 22:01:18 +02:00
Morten Olsen
91298b3cf7 update 2025-08-15 21:20:23 +02:00
Morten Olsen
638c288a5c update 2025-08-15 20:52:17 +02:00
3 changed files with 14 additions and 5 deletions

9
manifests/client.yaml Normal file
View File

@@ -0,0 +1,9 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: AuthentikClient
metadata:
name: test-client
spec:
server: dev/dev-authentik-server
redirectUris:
- url: https://localhost:3000/api/v1/authentik/oauth2/callback
matchingMode: strict

View File

@@ -153,7 +153,7 @@ class AuthentikServerController extends CustomResource<typeof authentikServerSpe
const secretData = { const secretData = {
url: `https://${this.spec.subdomain}.${domain}`, url: `https://${this.spec.subdomain}.${domain}`,
host: `${this.name}.${this.namespace}.svc.cluster.local`, host: `${this.name}-server.${this.namespace}.svc.cluster.local`,
token: this.#authentikInitSecret.value?.AUTHENTIK_BOOTSTRAP_TOKEN ?? '', token: this.#authentikInitSecret.value?.AUTHENTIK_BOOTSTRAP_TOKEN ?? '',
}; };

View File

@@ -42,9 +42,9 @@ class PostgresInstance {
const existingRole = await this.#db.raw('SELECT 1 FROM pg_roles WHERE rolname = ?', [role.name]); const existingRole = await this.#db.raw('SELECT 1 FROM pg_roles WHERE rolname = ?', [role.name]);
if (existingRole.rows.length === 0) { if (existingRole.rows.length === 0) {
await this.#db.raw(`CREATE ROLE ${role.name} WITH LOGIN PASSWORD '${role.password}'`); await this.#db.raw(`CREATE ROLE "${role.name}" WITH LOGIN PASSWORD '${role.password}'`);
} else { } else {
await this.#db.raw(`ALTER ROLE ${role.name} WITH PASSWORD '${role.password}'`); await this.#db.raw(`ALTER ROLE "${role.name}" WITH PASSWORD '${role.password}'`);
} }
}; };
@@ -52,9 +52,9 @@ class PostgresInstance {
const existingDatabase = await this.#db.raw('SELECT * FROM pg_database WHERE datname = ?', [database.name]); const existingDatabase = await this.#db.raw('SELECT * FROM pg_database WHERE datname = ?', [database.name]);
if (existingDatabase.rows.length === 0) { if (existingDatabase.rows.length === 0) {
await this.#db.raw(`CREATE DATABASE ${database.name} OWNER ${database.owner}`); await this.#db.raw(`CREATE DATABASE "${database.name}" OWNER "${database.owner}"`);
} else { } else {
await this.#db.raw(`ALTER DATABASE ${database.name} OWNER TO ${database.owner}`); await this.#db.raw(`ALTER DATABASE "${database.name}" OWNER TO "${database.owner}"`);
} }
}; };
} }