mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
rewrite2
This commit is contained in:
@@ -17,7 +17,7 @@ import { authentikServerSecretSchema } from '../authentik-server/authentik-serve
|
||||
|
||||
import { authentikClientSecretSchema, type authentikClientSpecSchema } from './authentik-client.schemas.ts';
|
||||
|
||||
class AuthentikClientResource extends CustomResource<typeof authentikClientSpecSchema> {
|
||||
class AuthentikClientController extends CustomResource<typeof authentikClientSpecSchema> {
|
||||
#serverSecret: ResourceReference<V1Secret>;
|
||||
#clientSecretResource: Resource<V1Secret>;
|
||||
|
||||
@@ -172,4 +172,4 @@ class AuthentikClientResource extends CustomResource<typeof authentikClientSpecS
|
||||
};
|
||||
}
|
||||
|
||||
export { AuthentikClientResource };
|
||||
export { AuthentikClientController };
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createCustomResourceDefinition } from '../../services/custom-resources/custom-resources.ts';
|
||||
import { GROUP } from '../../utils/consts.ts';
|
||||
|
||||
import { AuthentikClientResource } from './authentik-client.resource.ts';
|
||||
import { AuthentikClientController } from './authentik-client.controller.ts';
|
||||
import { authentikClientSpecSchema } from './authentik-client.schemas.ts';
|
||||
|
||||
const authentikClientDefinition = createCustomResourceDefinition({
|
||||
@@ -12,7 +12,7 @@ const authentikClientDefinition = createCustomResourceDefinition({
|
||||
plural: 'authentikclients',
|
||||
singular: 'authentikclient',
|
||||
},
|
||||
create: (options) => new AuthentikClientResource(options),
|
||||
create: (options) => new AuthentikClientController(options),
|
||||
spec: authentikClientSpecSchema,
|
||||
});
|
||||
|
||||
|
||||
@@ -93,10 +93,11 @@ class AuthentikServerController extends CustomResource<typeof authentikServerSpe
|
||||
this.#redisServer = new ResourceReference();
|
||||
this.#postgresSecret = new ResourceReference();
|
||||
this.#authentikSecret.on('changed', this.queueReconcile);
|
||||
this.#authentikInitSecret.resource.on('deleted', this.queueReconcile);
|
||||
this.#authentikInitSecret.resource.on('changed', this.queueReconcile);
|
||||
this.#environment.on('changed', this.queueReconcile);
|
||||
this.#authentikRelease.on('changed', this.queueReconcile);
|
||||
this.#postgresSecret.on('changed', this.queueReconcile);
|
||||
this.#postgresDatabase.on('changed', this.queueReconcile);
|
||||
this.#httpService.on('changed', this.queueReconcile);
|
||||
this.#redisServer.on('changed', this.queueReconcile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user