Compare commits

...

2 Commits

Author SHA1 Message Date
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

@@ -136,7 +136,7 @@ class AuthentikClientResource extends CustomResource<typeof authentikClientSpecS
const authentikService = this.services.get(AuthentikService);
const authentikServer = authentikService.get({
url: {
internal: `http://${serverSecretData.data.host}`,
internal: `http://${serverSecretData.data.host}-server`,
external: serverSecretData.data.url,
},
token: serverSecretData.data.token,

View File

@@ -42,9 +42,9 @@ class PostgresInstance {
const existingRole = await this.#db.raw('SELECT 1 FROM pg_roles WHERE rolname = ?', [role.name]);
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 {
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]);
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 {
await this.#db.raw(`ALTER DATABASE ${database.name} OWNER TO ${database.owner}`);
await this.#db.raw(`ALTER DATABASE "${database.name}" OWNER TO "${database.owner}"`);
}
};
}